Skip to content

Commit

Permalink
Backport of remove macos runners from buildworkflow into release/1.5.x (
Browse files Browse the repository at this point in the history
#570)

* backport of commit 40a5939

* backport of commit 2b6e8e0

* backport of commit 8ba7848

* backport of commit a7ebdae

---------

Co-authored-by: NicoletaPopoviciu <[email protected]>
Co-authored-by: NicoletaPopoviciu <[email protected]>
  • Loading branch information
3 people authored Jun 28, 2024
1 parent 7d6fd90 commit 2b06661
Showing 1 changed file with 3 additions and 32 deletions.
35 changes: 3 additions & 32 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ jobs:
- {goos: "linux", goarch: "amd64"}
- {goos: "linux", goarch: "amd64", gotags: "fips", env: "CGO_ENABLED=1 GOEXPERIMENT=boringcrypto", fips: "+fips1402", pkg_suffix: "-fips" }
- {goos: "linux", goarch: "arm64", gotags: "fips", env: "CGO_ENABLED=1 GOEXPERIMENT=boringcrypto CC=aarch64-linux-gnu-gcc", fips: "+fips1402", pkg_suffix: "-fips" }
- {goos: "darwin", goarch: "amd64"}
- {goos: "darwin", goarch: "arm64"}

fail-fast: true

Expand All @@ -98,6 +100,7 @@ jobs:
${{ matrix.env }} go build -tags=${{ matrix.gotags }} -trimpath -buildvcs=false -ldflags="-X github.com/hashicorp/consul-dataplane/pkg/version.GitCommit=${GITHUB_SHA::8}" -o $BIN_PATH ./cmd/$BIN_NAME
- name: Copy license file
if: ${{ matrix.goos == 'linux' }}
env:
LICENSE_DIR: ".release/linux/package/usr/share/doc/${{ env.PKG_NAME }}"
run: |
Expand Down Expand Up @@ -138,38 +141,6 @@ jobs:
name: ${{ env.DEB_PACKAGE }}
path: out/${{ env.DEB_PACKAGE }}

build-darwin:
needs:
- get-go-version
- get-product-version
runs-on: macos-latest
strategy:
matrix:
goos: [darwin]
goarch: ["amd64", "arm64"]
fail-fast: true

name: Go ${{ needs.get-go-version.outputs.go-version }} ${{ matrix.goos }} ${{ matrix.goarch }} build

env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- uses: hashicorp/actions-go-build@v1
with:
product_name: ${{ env.PKG_NAME }}
product_version: ${{ needs.get-product-version.outputs.product-version }}
go_version: ${{ needs.get-go-version.outputs.go-version }}
os: ${{ matrix.goos }}
arch: ${{ matrix.goarch }}
reproducible: assert
instructions: |
cp LICENSE $TARGET_DIR/LICENSE.txt
CGO_ENABLED=0 go build -trimpath -buildvcs=false -ldflags="-X github.com/hashicorp/consul-dataplane/pkg/version.GitCommit=${GITHUB_SHA::8}" -o $BIN_PATH ./cmd/$BIN_NAME
build-docker-default:
name: Docker ${{ matrix.arch }} ${{ matrix.fips }} default release build
needs:
Expand Down

0 comments on commit 2b06661

Please sign in to comment.