Merge pull request #7584 from MicroDev1/ci

Fix upload to aws & Refactor mpy-cross-mac path
This commit is contained in:
Scott Shawcroft 2023-02-15 11:17:42 -08:00 committed by GitHub
commit fd3c691af5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 11 deletions

View File

@ -6,14 +6,17 @@ on:
platform: platform:
required: true required: true
type: string type: string
boards: boards:
required: true required: true
type: string type: string
cp-version: cp-version:
required: true required: true
type: string type: string
secrets:
AWS_ACCESS_KEY_ID:
required: false
AWS_SECRET_ACCESS_KEY:
required: false
jobs: jobs:
build: build:

View File

@ -6,6 +6,11 @@ on:
cp-version: cp-version:
required: true required: true
type: string type: string
secrets:
AWS_ACCESS_KEY_ID:
required: false
AWS_SECRET_ACCESS_KEY:
required: false
jobs: jobs:
build: build:

View File

@ -96,15 +96,14 @@ jobs:
with: with:
cp-version: ${{ needs.scheduler.outputs.cp-version }} cp-version: ${{ needs.scheduler.outputs.cp-version }}
mpy-cross: mpy-cross:
needs: scheduler needs: scheduler
if: needs.scheduler.outputs.build-boards == 'True' if: needs.scheduler.outputs.build-boards == 'True'
uses: ./.github/workflows/build-mpy-cross.yml uses: ./.github/workflows/build-mpy-cross.yml
secrets: inherit
with: with:
cp-version: ${{ needs.scheduler.outputs.cp-version }} cp-version: ${{ needs.scheduler.outputs.cp-version }}
mpy-cross-mac: mpy-cross-mac:
runs-on: macos-11 runs-on: macos-11
needs: scheduler needs: scheduler
@ -152,9 +151,9 @@ jobs:
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (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')) (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
run: | run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-universal --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross-macos-universal s3://adafruit-circuit-python/bin/mpy-cross/macos-11/mpy-cross-macos-11-${{ env.CP_VERSION }}-universal --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross-arm64 s3://adafruit-circuit-python/bin/mpy-cross/macos-11/mpy-cross-macos-11-${{ env.CP_VERSION }}-arm64 --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-11-${{ env.CP_VERSION }}-x64 --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/macos-11/mpy-cross-macos-11-${{ env.CP_VERSION }}-x64 --no-progress --region us-east-1
env: env:
AWS_PAGER: '' AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@ -201,6 +200,11 @@ jobs:
with: with:
name: docs name: docs
path: _build/latex path: _build/latex
- name: Zip stubs
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'))
run: zip -9r circuitpython-stubs.zip circuitpython-stubs
- name: Upload to S3 - name: Upload to S3
uses: ./.github/actions/upload_aws uses: ./.github/actions/upload_aws
with: with:
@ -218,41 +222,41 @@ jobs:
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi" [ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/* [ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
aarch: aarch:
needs: [scheduler, mpy-cross, tests] needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-aarch != '[]' }} if: ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
uses: ./.github/workflows/build-boards.yml uses: ./.github/workflows/build-boards.yml
secrets: inherit
with: with:
platform: aarch platform: aarch
boards: ${{ needs.scheduler.outputs.boards-aarch }} boards: ${{ needs.scheduler.outputs.boards-aarch }}
cp-version: ${{ needs.scheduler.outputs.cp-version }} cp-version: ${{ needs.scheduler.outputs.cp-version }}
arm: arm:
needs: [scheduler, mpy-cross, tests] needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-arm != '[]' }} if: ${{ needs.scheduler.outputs.boards-arm != '[]' }}
uses: ./.github/workflows/build-boards.yml uses: ./.github/workflows/build-boards.yml
secrets: inherit
with: with:
platform: arm platform: arm
boards: ${{ needs.scheduler.outputs.boards-arm }} boards: ${{ needs.scheduler.outputs.boards-arm }}
cp-version: ${{ needs.scheduler.outputs.cp-version }} cp-version: ${{ needs.scheduler.outputs.cp-version }}
esp: esp:
needs: [scheduler, mpy-cross, tests] needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-esp != '[]' }} if: ${{ needs.scheduler.outputs.boards-esp != '[]' }}
uses: ./.github/workflows/build-boards.yml uses: ./.github/workflows/build-boards.yml
secrets: inherit
with: with:
platform: esp platform: esp
boards: ${{ needs.scheduler.outputs.boards-esp }} boards: ${{ needs.scheduler.outputs.boards-esp }}
cp-version: ${{ needs.scheduler.outputs.cp-version }} cp-version: ${{ needs.scheduler.outputs.cp-version }}
riscv: riscv:
needs: [scheduler, mpy-cross, tests] needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-riscv != '[]' }} if: ${{ needs.scheduler.outputs.boards-riscv != '[]' }}
uses: ./.github/workflows/build-boards.yml uses: ./.github/workflows/build-boards.yml
secrets: inherit
with: with:
platform: riscv platform: riscv
boards: ${{ needs.scheduler.outputs.boards-riscv }} boards: ${{ needs.scheduler.outputs.boards-riscv }}
@ -262,6 +266,7 @@ jobs:
needs: [scheduler, mpy-cross, tests] needs: [scheduler, mpy-cross, tests]
if: ${{ needs.scheduler.outputs.boards-rpi != '[]' }} if: ${{ needs.scheduler.outputs.boards-rpi != '[]' }}
uses: ./.github/workflows/build-boards.yml uses: ./.github/workflows/build-boards.yml
secrets: inherit
with: with:
platform: arm platform: arm
boards: ${{ needs.scheduler.outputs.boards-rpi }} boards: ${{ needs.scheduler.outputs.boards-rpi }}