Skip to content

Commit fd3faa4

Browse files
committed
only install awscli when required
1 parent 03804e6 commit fd3faa4

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
sudo apt-get update
7474
sudo apt-get install -y eatmydata
7575
sudo eatmydata apt-get install -y gettext gcc-aarch64-linux-gnu mingw-w64
76-
pip install -r requirements-ci.txt -r requirements-dev.txt
76+
pip install -r requirements-dev.txt
7777
- name: Versions
7878
run: |
7979
gcc --version
@@ -136,13 +136,14 @@ jobs:
136136
with:
137137
name: mpy-cross.static-x64-windows
138138
path: mpy-cross/mpy-cross.static.exe
139-
- name: Upload mpy-cross builds to S3
139+
- name: Upload to S3
140140
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
141141
env:
142142
AWS_PAGER: ''
143143
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
144144
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
145145
run: |
146+
pip install awscli
146147
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1
147148
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
148149
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
@@ -286,7 +287,7 @@ jobs:
286287
sudo apt-get update
287288
sudo apt-get install -y eatmydata
288289
sudo eatmydata apt-get install -y latexmk librsvg2-bin texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
289-
pip install -r requirements-ci.txt -r requirements-doc.txt
290+
pip install -r requirements-doc.txt
290291
- name: Build and Validate Stubs
291292
run: make check-stubs -j2
292293
- uses: actions/upload-artifact@v3
@@ -306,13 +307,14 @@ jobs:
306307
with:
307308
name: docs
308309
path: _build/latex
309-
- name: Upload stubs to S3
310+
- name: Upload to S3
310311
if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
311312
env:
312313
AWS_PAGER: ''
313314
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
314315
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
315316
run: |
317+
pip install awscli
316318
zip -9r circuitpython-stubs.zip circuitpython-stubs
317319
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
318320
- name: Upload stubs to PyPi
@@ -363,7 +365,7 @@ jobs:
363365
- name: Install dependencies
364366
run: |
365367
sudo apt-get install -y gettext mtools
366-
pip install -r requirements-ci.txt -r requirements-dev.txt
368+
pip install -r requirements-dev.txt
367369
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
368370
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
369371
- uses: carlosperate/arm-none-eabi-gcc-action@v1
@@ -400,7 +402,9 @@ jobs:
400402
name: ${{ matrix.board }}
401403
path: bin/${{ matrix.board }}
402404
- name: Upload to S3
403-
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
405+
run: |
406+
pip install awscli
407+
"[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
404408
env:
405409
AWS_PAGER: ''
406410
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -448,7 +452,7 @@ jobs:
448452
- name: Install dependencies
449453
run: |
450454
sudo apt-get install -y gettext
451-
pip install -r requirements-ci.txt -r requirements-dev.txt
455+
pip install -r requirements-dev.txt
452456
- name: Versions
453457
run: |
454458
gcc --version
@@ -469,7 +473,9 @@ jobs:
469473
name: ${{ matrix.board }}
470474
path: bin/${{ matrix.board }}
471475
- name: Upload to S3
472-
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
476+
run: |
477+
pip install awscli
478+
"[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
473479
env:
474480
AWS_PAGER: ''
475481
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -539,7 +545,7 @@ jobs:
539545
run: |
540546
source $IDF_PATH/export.sh
541547
sudo apt-get install -y gettext ninja-build
542-
pip install -r requirements-ci.txt -r requirements-dev.txt
548+
pip install -r requirements-dev.txt
543549
env:
544550
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
545551
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
@@ -574,7 +580,9 @@ jobs:
574580
name: ${{ matrix.board }}
575581
path: bin/${{ matrix.board }}
576582
- name: Upload to S3
577-
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
583+
run: |
584+
pip install awscli
585+
"[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
578586
env:
579587
AWS_PAGER: ''
580588
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -619,7 +627,7 @@ jobs:
619627
- name: Install dependencies
620628
run: |
621629
sudo apt-get install -y gettext
622-
pip install -r requirements-ci.txt -r requirements-dev.txt
630+
pip install -r requirements-dev.txt
623631
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
624632
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
625633
- name: Versions
@@ -642,7 +650,9 @@ jobs:
642650
name: ${{ matrix.board }}
643651
path: bin/${{ matrix.board }}
644652
- name: Upload to S3
645-
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
653+
run: |
654+
pip install awscli
655+
"[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
646656
env:
647657
AWS_PAGER: ''
648658
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}

requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# For uploading artifacts
2-
awscli
2+
# awscli

0 commit comments

Comments
 (0)