Skip to content

Commit fd3c691

Browse files
authored
Merge pull request #7584 from MicroDev1/ci
Fix upload to aws & Refactor mpy-cross-mac path
2 parents 32d86c3 + 9de039b commit fd3c691

File tree

3 files changed

+24
-11
lines changed

3 files changed

+24
-11
lines changed

.github/workflows/build-boards.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ on:
66
platform:
77
required: true
88
type: string
9-
109
boards:
1110
required: true
1211
type: string
13-
1412
cp-version:
1513
required: true
1614
type: string
15+
secrets:
16+
AWS_ACCESS_KEY_ID:
17+
required: false
18+
AWS_SECRET_ACCESS_KEY:
19+
required: false
1720

1821
jobs:
1922
build:

.github/workflows/build-mpy-cross.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
cp-version:
77
required: true
88
type: string
9+
secrets:
10+
AWS_ACCESS_KEY_ID:
11+
required: false
12+
AWS_SECRET_ACCESS_KEY:
13+
required: false
914

1015
jobs:
1116
build:

.github/workflows/build.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,14 @@ jobs:
9696
with:
9797
cp-version: ${{ needs.scheduler.outputs.cp-version }}
9898

99-
10099
mpy-cross:
101100
needs: scheduler
102101
if: needs.scheduler.outputs.build-boards == 'True'
103102
uses: ./.github/workflows/build-mpy-cross.yml
103+
secrets: inherit
104104
with:
105105
cp-version: ${{ needs.scheduler.outputs.cp-version }}
106106

107-
108107
mpy-cross-mac:
109108
runs-on: macos-11
110109
needs: scheduler
@@ -152,9 +151,9 @@ jobs:
152151
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
153152
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
154153
run: |
155-
[ -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
156-
[ -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
157-
[ -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
154+
[ -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
155+
[ -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
156+
[ -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
158157
env:
159158
AWS_PAGER: ''
160159
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
@@ -201,6 +200,11 @@ jobs:
201200
with:
202201
name: docs
203202
path: _build/latex
203+
- name: Zip stubs
204+
if: >-
205+
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
206+
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
207+
run: zip -9r circuitpython-stubs.zip circuitpython-stubs
204208
- name: Upload to S3
205209
uses: ./.github/actions/upload_aws
206210
with:
@@ -218,41 +222,41 @@ jobs:
218222
[ -z "$TWINE_USERNAME" ] || echo "Uploading dev release to PyPi"
219223
[ -z "$TWINE_USERNAME" ] || twine upload circuitpython-stubs/dist/*
220224
221-
222225
aarch:
223226
needs: [scheduler, mpy-cross, tests]
224227
if: ${{ needs.scheduler.outputs.boards-aarch != '[]' }}
225228
uses: ./.github/workflows/build-boards.yml
229+
secrets: inherit
226230
with:
227231
platform: aarch
228232
boards: ${{ needs.scheduler.outputs.boards-aarch }}
229233
cp-version: ${{ needs.scheduler.outputs.cp-version }}
230234

231-
232235
arm:
233236
needs: [scheduler, mpy-cross, tests]
234237
if: ${{ needs.scheduler.outputs.boards-arm != '[]' }}
235238
uses: ./.github/workflows/build-boards.yml
239+
secrets: inherit
236240
with:
237241
platform: arm
238242
boards: ${{ needs.scheduler.outputs.boards-arm }}
239243
cp-version: ${{ needs.scheduler.outputs.cp-version }}
240244

241-
242245
esp:
243246
needs: [scheduler, mpy-cross, tests]
244247
if: ${{ needs.scheduler.outputs.boards-esp != '[]' }}
245248
uses: ./.github/workflows/build-boards.yml
249+
secrets: inherit
246250
with:
247251
platform: esp
248252
boards: ${{ needs.scheduler.outputs.boards-esp }}
249253
cp-version: ${{ needs.scheduler.outputs.cp-version }}
250254

251-
252255
riscv:
253256
needs: [scheduler, mpy-cross, tests]
254257
if: ${{ needs.scheduler.outputs.boards-riscv != '[]' }}
255258
uses: ./.github/workflows/build-boards.yml
259+
secrets: inherit
256260
with:
257261
platform: riscv
258262
boards: ${{ needs.scheduler.outputs.boards-riscv }}
@@ -262,6 +266,7 @@ jobs:
262266
needs: [scheduler, mpy-cross, tests]
263267
if: ${{ needs.scheduler.outputs.boards-rpi != '[]' }}
264268
uses: ./.github/workflows/build-boards.yml
269+
secrets: inherit
265270
with:
266271
platform: arm
267272
boards: ${{ needs.scheduler.outputs.boards-rpi }}

0 commit comments

Comments
 (0)