From 7ec932f717c68fbe37d202c92accb65866b50f2b Mon Sep 17 00:00:00 2001 From: Mike Beaton Date: Wed, 1 May 2024 20:41:23 +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 fe65dc5..4e6c265 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 gitpython requests pyyaml - 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 gitpython requests pyyaml - 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 gitpython requests pyyaml - 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 0fcbb7c..daf4faa 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 gitpython prospector pyyaml requests - 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