Skip to content

Commit

Permalink
Update CodeBuild Runner integration to include the run id and attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
popematt committed Apr 9, 2024
1 parent 55f0614 commit 7feae44
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-rust'
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, codebuild-ion-rust-arm-3.0-large, codebuild-ion-rust-al2-5.0-large ]
os: [
ubuntu-latest,
windows-latest,
macos-latest,
# Unfortunately, we must include the run id and run attempt for codebuild runners.
# See https://docs.aws.amazon.com/codebuild/latest/userguide/action-runner.html
codebuild-ion-rust-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large,
codebuild-ion-rust-${{ github.run_id }}-${{ github.run_attempt }}-al2-5.0-large
]
# build and test for different and interesting crate features
features: ['default', 'all', 'experimental-ion-hash', 'experimental']
# Forks cannot use the codebuild runners. The job will hang indefinitely waiting to be picked up by a worker.
isFork:
- ${{ github.repository_owner != 'amazon-ion' }}
exclude:
- isFork: true
os: codebuild-ion-rust-arm-3.0-large
os: codebuild-ion-rust-${{ github.run_id }}-${{ github.run_attempt }}-arm-3.0-large
- isFork: true
os: codebuild-ion-rust-al2-5.0-large
os: codebuild-ion-rust-${{ github.run_id }}-${{ github.run_attempt }}-al2-5.0-large
permissions:
checks: write

Expand Down Expand Up @@ -92,3 +100,13 @@ jobs:
with:
command: doc
args: --document-private-items --all-features
confirm_build:
# This job is just a "join" on all parallel strategies for the `build` job so that we can require it in our branch protection rules.
needs: build
name: Build and Test (all) Success
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'amazon-ion/ion-rust'
runs-on: ubuntu-latest
steps:
- name: Pass
run: echo "ok"

0 comments on commit 7feae44

Please sign in to comment.