Skip to content

Commit

Permalink
ad arm64 testing (hashicorp#16876)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret authored Apr 5, 2023
1 parent 671d582 commit dcb9da2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
52 changes: 30 additions & 22 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,29 +179,37 @@ jobs:
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

# TODO(JM): - linux arm64 is not available in our self-hosted runners
# they are currently on the roadmap.
# # create a development build for arm64
# dev-build-arm64:
# needs:
# - setup
# uses: ./.github/workflows/reusable-dev-build.yml
# with:
# uploaded-binary-name: 'consul-bin-arm64'
# # runs-on: ${{ needs.setup.outputs.compute-xl-arm64 }}
dev-build-arm64:
# only run on enterprise because GHA does not have arm64 runners in OSS
if: ${{ endsWith(github.repository, '-enterprise') }}
needs:
- setup
uses: ./.github/workflows/reusable-dev-build.yml
with:
uploaded-binary-name: 'consul-bin-arm64'
runs-on: ${{ needs.setup.outputs.compute-xl }}
go-arch: "arm64"
repository-name: ${{ github.repository }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}

# go-test-arm64:
# # TODO(JM): Fix to run on arm64
# needs:
# - setup
# - dev-build-arm64
# uses: ./.github/workflows/reusable-unit-split.yml
# with:
# directory: .
# uploaded-binary-name: 'consul-bin-arm64'
# runner-count: 12
# # runs-on: ${{ needs.setup.outputs.compute-xl-arm64 }}
# go-test-flags: 'if ! [[ "$GITHUB_REF_NAME" =~ ^main$|^release/ ]]; then export GO_TEST_FLAGS="-short"; fi'
go-test-arm64:
# only run on enterprise because GHA does not have arm64 runners in OSS
if: ${{ endsWith(github.repository, '-enterprise') }}
needs:
- setup
- dev-build-arm64
uses: ./.github/workflows/reusable-unit-split.yml
with:
directory: .
uploaded-binary-name: 'consul-bin-arm64'
runner-count: 12
runs-on: "['self-hosted', 'ondemand', 'os=macos-arm', 'arm64']"
go-test-flags: 'if ! [[ "$GITHUB_REF_NAME" =~ ^main$|^release/ ]]; then export GO_TEST_FLAGS="-short"; fi'
repository-name: ${{ github.repository }}
secrets:
elevated-github-token: ${{ secrets.ELEVATED_GITHUB_TOKEN }}
consul-license: ${{secrets.CONSUL_LICENSE}}

go-test:
needs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable-dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
repository-name:
required: true
type: string
go-arch:
required: false
type: string
default: ""
secrets:
elevated-github-token:
required: true
Expand All @@ -30,6 +34,8 @@ jobs:
with:
go-version-file: 'go.mod'
- name: Build
env:
GOARCH: ${{ inputs.goarch }}
run: make dev
# save dev build to pass to downstream jobs
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # [email protected]
Expand Down

0 comments on commit dcb9da2

Please sign in to comment.