Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: pin GitHub Actions macos runner version and build for darwin/amd64 #6721

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/post-merge.yaml
Expand Up @@ -108,7 +108,7 @@ jobs:

release-build-darwin:
name: Release Build (darwin)
runs-on: macos-latest
runs-on: macos-14
needs: generate
steps:
- name: Check out code
Expand All @@ -124,7 +124,9 @@ jobs:
go-version: ${{ steps.go_version.outputs.go_version }}

- name: Build Darwin
run: make ci-build-darwin ci-build-darwin-arm64-static
run: |
make ci-build-darwin GOARCH=amd64
make ci-build-darwin-arm64-static
timeout-minutes: 30
env:
TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/post-tag.yaml
Expand Up @@ -48,7 +48,7 @@ jobs:

release-build-darwin:
name: Release Build (darwin)
runs-on: macos-latest
runs-on: macos-14
needs: generate
steps:
- name: Check out code
Expand All @@ -64,7 +64,9 @@ jobs:
go-version: ${{ steps.go_version.outputs.go_version }}

- name: Build Darwin
run: make ci-build-darwin ci-build-darwin-arm64-static
run: |
make ci-build-darwin GOARCH=amd64
make ci-build-darwin-arm64-static
timeout-minutes: 30
env:
TELEMETRY_URL: ${{ secrets.TELEMETRY_URL }}
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/pull-request.yaml
Expand Up @@ -55,13 +55,14 @@ jobs:
run: ubuntu-22.04
targets: ci-go-ci-build-windows
arch: amd64
# Note(philipc): The underlying make targets also build arm64_static,
# but the downstream targets only want the amd64 binaries, so amd64 is
# the artifact name we upload the darwin target to.
- os: darwin
run: macos-latest
targets: ci-build-darwin ci-build-darwin-arm64-static
run: macos-13
targets: ci-build-darwin
arch: amd64
- os: darwin
run: macos-14
targets: ci-build-darwin-arm64-static
arch: arm64
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -112,7 +113,7 @@ jobs:
- os: linux
run: ubuntu-22.04
- os: darwin
run: macos-latest
run: macos-14
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -282,9 +283,14 @@ jobs:
arch: amd64
wasm: disabled
- os: darwin
run: macos-latest
run: macos-13
exec: opa_darwin_amd64
arch: amd64
Comment on lines 285 to 288
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CPU architecture of macos-13 is amd64.

Should we test opa_darwin_arm64_static too?

# Note(philipc): We only run the amd64 targets.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if we were consistent with the macos version. If we just used macos-13 then we don't need to change anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To test opa_darwin_amd64, we have to use macos-13.
And to test test opa_darwin_arm64_static, we have to use macos-14.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a test of opa_darwin_arm64_static.

f41eccd

This means to run smoke test of both opa_darwin_amd64 and opa_darwin_arm64_static.

- os: darwin
run: macos-14
exec: opa_darwin_arm64_static
arch: arm64
wasm: disabled
- os: windows
run: windows-latest
exec: opa_windows_amd64.exe
Expand Down Expand Up @@ -314,7 +320,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-latest]
os: [ubuntu-22.04, macos-14]
version: ["1.20"]
steps:
- uses: actions/checkout@v4
Expand Down