Skip to content

Commit

Permalink
Merge pull request cockroachdb#128 from tcchawla/arm64-workflow
Browse files Browse the repository at this point in the history
Enable ARM64 Workflow
  • Loading branch information
ahrtr authored Jan 20, 2024
2 parents 19cfa21 + 3276219 commit e22adc0
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 7 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test_amd64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test AMD64
permissions: read-all
on: [push, pull_request]
jobs:
test-linux-amd64:
uses: ./.github/workflows/test_template.yaml
with:
targets: "['linux-amd64-unit-4-cpu-race']"
test-linux-386:
uses: ./.github/workflows/test_template.yaml
with:
targets: "['linux-386-unit-1-cpu']"

coverage:
needs:
- test-linux-amd64
- test-linux-386
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: goversion
run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- uses: actions/setup-go@v5
with:
go-version: "1.21.6"
- run: make test
9 changes: 9 additions & 0 deletions .github/workflows/test_arm64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Test ARM64
permissions: read-all
on: [push, pull_request]
jobs:
test-linux-arm64-cpu-race:
uses: ./.github/workflows/test_template.yaml
with:
runs-on: actuated-arm64-8cpu-8gb
targets: "['linux-arm64-unit-4-cpu-race']"
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
name: Test
on: [push, pull_request]
name: Workflow Test Template
on:
workflow_call:
inputs:
runs-on:
required: false
type: string
default: ubuntu-latest
targets:
required: false
type: string
default: "[]"
permissions: read-all

jobs:
run:
runs-on: ubuntu-latest
runs-on: ${{ inputs.runs-on }}
strategy:
fail-fast: false
matrix:
target:
- linux-amd64-unit-4-cpu-race
- linux-386-unit-1-cpu
target: ${{ fromJSON(inputs.targets) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.6"
- env:
- env:
TARGET: ${{ matrix.target }}
run: |
go clean -testcache
case "${TARGET}" in
linux-amd64-unit-4-cpu-race)
GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2
;;
linux-386-unit-1-cpu)
GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./scripts/test.sh -p=4
;;
linux-arm64-unit-4-cpu-race)
GOARCH=arm64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2
;;
*)
echo "Failed to find target"
exit 1
Expand Down

0 comments on commit e22adc0

Please sign in to comment.