From 10a26512152df22ef168875745b06c01b45ef13d Mon Sep 17 00:00:00 2001 From: Mike Beaton Date: Wed, 1 May 2024 20:54:52 +0100 Subject: [PATCH] Build: Move pip installs to Python venv Required due to brew adopting PEP 668 https://github.com/orgs/Homebrew/discussions/3404 --- .github/workflows/build_uncrustify.yml | 9 +++++++++ .github/workflows/main.yml | 6 +++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_uncrustify.yml b/.github/workflows/build_uncrustify.yml index 1e1d7a8..4c60450 100644 --- a/.github/workflows/build_uncrustify.yml +++ b/.github/workflows/build_uncrustify.yml @@ -21,6 +21,8 @@ jobs: - name: Install Dependencies run: | + python3 -m venv ~/pyenv + source ~/pyenv/bin/activate python3 -m pip install -r requirements.txt - name: CI Bootstrap @@ -29,6 +31,7 @@ jobs: - name: Build Uncrustify run: | + source ~/pyenv/bin/activate cd uncstrap && python3 ./uncstrap.py -b echo "UNC_SHA=$(cat unc-sha.txt)" >> $GITHUB_ENV @@ -49,6 +52,8 @@ jobs: run: | sudo apt-get update sudo apt-get install cmake curl git + python3 -m venv ~/pyenv + source ~/pyenv/bin/activate sudo python3 -m pip install -r requirements.txt - name: CI Bootstrap @@ -57,6 +62,7 @@ jobs: - name: Build Uncrustify run: | + source ~/pyenv/bin/activate cd uncstrap && python3 ./uncstrap.py -b echo "UNC_SHA=$(cat unc-sha.txt)" >> $GITHUB_ENV @@ -79,6 +85,8 @@ jobs: - name: Install Dependencies run: | choco install cmake make --no-progress + python3 -m venv ~/pyenv + source ~/pyenv/bin/activate python3 -m pip install -r requirements.txt - name: CI Bootstrap @@ -87,6 +95,7 @@ jobs: - name: Build Uncrustify run: | + source ~/pyenv/bin/activate cd uncstrap && python3 ./uncstrap.py -b echo "UNC_SHA=$(cat unc-sha.txt)" >> $GITHUB_ENV diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 187d224..0e7f148 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,10 +35,14 @@ jobs: - name: Install Dependencies run: | + python3 -m venv ~/pyenv + source ~/pyenv/bin/activate python3 -m pip install -r requirements.txt - name: Run prospector - run: python3 -m prospector . -P ./prospector/profile.yml > prospector_result.txt || exit 1 + run: | + source ~/pyenv/bin/activate + python3 -m prospector . -P ./prospector/profile.yml > prospector_result.txt || exit 1 - name: Upload prospector result to Artifacts uses: actions/upload-artifact@v3