Skip to content

Commit

Permalink
Github workflows: Fix platformio to use venv
Browse files Browse the repository at this point in the history
Otherwise gets "This environment is externally managed"
  • Loading branch information
PetteriAimonen committed Oct 18, 2024
1 parent 4543647 commit 6d0cc46
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/platformio_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,25 @@ jobs:
- name: Install and setup PlatformIO
run: |
pip3 install -U platformio
export PATH=~/.local/bin:$PATH
python3 -m venv venv
venv/bin/pip3 install -U platformio
- name: Build PlatformIO package
run: |
source venv/bin/activate
cd nanopb
pio package pack
- name: Example - Extract PlatformIO package to example dir
run: |
source venv/bin/activate
cp -R nanopb/examples/platformio example
mkdir -p example/lib/nanopb
tar -xzf nanopb/Nanopb-*.tar.gz -C example/lib/nanopb
- name: Example - Build
run: |
source venv/bin/activate
cd example
pio run
Expand All @@ -58,6 +61,7 @@ jobs:

- name: Build in subdirectory with space characters
run: |
source venv/bin/activate
cp -R nanopb/examples/platformio "example with spaces"
mkdir -p "example with spaces/lib/nanopb"
tar -xzf nanopb/Nanopb-*.tar.gz -C "example with spaces/lib/nanopb"
Expand All @@ -66,6 +70,7 @@ jobs:
- name: Build with default platformio.ini
run: |
source venv/bin/activate
mkdir -p test_default_pio_conf
cd test_default_pio_conf
pio project init
Expand Down

0 comments on commit 6d0cc46

Please sign in to comment.