From bf28d8e9dcf2eb4810ddfc4355596d8f978f5993 Mon Sep 17 00:00:00 2001 From: Shunsuke Suzuki Date: Sat, 27 Apr 2024 02:22:14 +0900 Subject: [PATCH] ci: pin GitHub Actions macos runner version and build for darwin/amd64 Fixes: #6720 Signed-off-by: Shunsuke Suzuki --- .github/workflows/post-merge.yaml | 6 ++++-- .github/workflows/post-tag.yaml | 6 ++++-- .github/workflows/pull-request.yaml | 22 ++++++++++++++-------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/post-merge.yaml b/.github/workflows/post-merge.yaml index 884c45ec89..47b95773f9 100644 --- a/.github/workflows/post-merge.yaml +++ b/.github/workflows/post-merge.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/post-tag.yaml b/.github/workflows/post-tag.yaml index 375a088e71..0fd94114ff 100644 --- a/.github/workflows/post-tag.yaml +++ b/.github/workflows/post-tag.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index fec32708e7..722032ec9f 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -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 @@ -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 @@ -282,9 +283,14 @@ jobs: arch: amd64 wasm: disabled - os: darwin - run: macos-latest + run: macos-13 exec: opa_darwin_amd64 arch: amd64 + - os: darwin + run: macos-14 + exec: opa_darwin_arm64_static + arch: arm64 + wasm: disabled - os: windows run: windows-latest exec: opa_windows_amd64.exe @@ -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