From 282c5bf2f929cd1e13e81121f0ab66a61b7169a3 Mon Sep 17 00:00:00 2001 From: grvvy Date: Fri, 26 Apr 2024 14:07:01 -0600 Subject: [PATCH] ci: use python venv for firmware builds --- .github/workflows/build.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34cfdd62..e2cc0d1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -150,18 +150,23 @@ jobs: - name: Install dependencies (macOS) run: | brew install dfu-util - pip3 install PyYAML + python3 -m venv environment && source environment/bin/activate + python3 -m pip install PyYAML if: matrix.os == 'macos-latest' - name: Install dependencies (Ubuntu) run: | + python3 -m venv environment && source environment/bin/activate + python3 -m pip install PyYAML sudo apt install dfu-util if: matrix.os == 'ubuntu-latest' - name: Build libopencm3 shell: bash working-directory: ${{github.workspace}}/firmware/libopencm3/ - run: make + run: | + source ../../environment/bin/activate + make - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/firmware/build @@ -174,5 +179,6 @@ jobs: - name: Build working-directory: ${{github.workspace}}/firmware/build shell: bash - run: cmake --build . --config Release - + run: | + source ../../environment/bin/activate + cmake --build . --config Release