From 46a1d10fc5c587c1c8102712fa0fe228b3c9e0ff Mon Sep 17 00:00:00 2001 From: notgitika Date: Tue, 22 Sep 2026 16:12:55 -0400 Subject: [PATCH] ci(release): skip macOS verification safely --- .../workflows/release-main-and-preview.yml | 1 + .github/workflows/verify.yml | 46 +++++++++++-------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release-main-and-preview.yml b/.github/workflows/release-main-and-preview.yml index 5998003a1..91b94fda0 100644 --- a/.github/workflows/release-main-and-preview.yml +++ b/.github/workflows/release-main-and-preview.yml @@ -49,6 +49,7 @@ jobs: contents: read with: ref: ${{ github.sha }} + skip_macos: true publish: needs: verify diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 85273ba5f..f842bcbab 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -7,6 +7,10 @@ on: ref: required: true type: string + skip_macos: + required: false + default: false + type: boolean secrets: CODECOV_TOKEN: required: false @@ -16,30 +20,32 @@ env: jobs: verify: - name: ${{ matrix.name }} - runs-on: ${{ fromJSON(matrix.runner) }} + name: >- + ${{ + matrix.target == 'linux-x64' && 'Linux' + || matrix.target == 'windows-x64' && 'Windows' + || 'macOS' + }} + # Per-job labels stop GitHub from routing a job to the runner CodeBuild created for another job. + # https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-action-runners-update-labels.html + runs-on: >- + ${{ + fromJSON( + matrix.target == 'linux-x64' + && format('["codebuild-agentcore-e2e-{0}-{1}", "verify-linux"]', github.run_id, github.run_attempt) + || matrix.target == 'windows-x64' + && format('["codebuild-agentcore-e2e-{0}-{1}", "image:windows-1.0", "verify-windows"]', github.run_id, github.run_attempt) + || '["macos-latest"]' + ) + }} permissions: contents: read strategy: fail-fast: false matrix: - include: - # Per-job labels stop GitHub from routing a job to the runner CodeBuild created for another job. - # https://docs.aws.amazon.com/codebuild/latest/userguide/sample-github-action-runners-update-labels.html - - name: Linux - runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}", "verify-linux"]' - target: linux-x64 - binary: ./dist/bin/agentcore-linux-x64 - - name: Windows - runner: '["codebuild-agentcore-e2e-${{ github.run_id }}-${{ github.run_attempt }}", "image:windows-1.0", "verify-windows"]' - target: windows-x64 - binary: ./dist/bin/agentcore-windows-x64.exe - # CodeBuild does not support macOS. - # https://docs.aws.amazon.com/codebuild/latest/userguide/action-runner-questions.html#action-runner-platform - - name: macOS - runner: '["macos-latest"]' - target: darwin-arm64 - binary: ./dist/bin/agentcore-darwin-arm64 + # CodeBuild does not support macOS. + # https://docs.aws.amazon.com/codebuild/latest/userguide/action-runner-questions.html#action-runner-platform + target: ${{ fromJSON(inputs.skip_macos && '["linux-x64", "windows-x64"]' || '["linux-x64", "windows-x64", "darwin-arm64"]') }} steps: - uses: actions/checkout@v7 with: @@ -64,7 +70,7 @@ jobs: - run: bun pm pack --ignore-scripts - run: bun run compile:${{ matrix.target }} - name: Smoke test binary - run: ${{ matrix.binary }} --help + run: ./dist/bin/agentcore-${{ matrix.target }}${{ matrix.target == 'windows-x64' && '.exe' || '' }} --help # TODO: investigate sharding as repo grows: https://bun.com/blog/release-notes/bun-v1.3.13#bun-test-shard-m-n-for-splitting-tests-across-ci-jobs - run: bun test --coverage --coverage-reporter=lcov