Skip to content

Commit

Permalink
Templated arm64 integration workflows for main and release-3.5.
Browse files Browse the repository at this point in the history
Signed-off-by: James Blair <[email protected]>
  • Loading branch information
jmhbnz committed Jun 29, 2023
1 parent bda68d8 commit 4ea8da7
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 10 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/tests-arm64-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Integration Arm64 Nightly
permissions: read-all
on:
# schedules always run against the main branch, hence we have to create separate jobs
# with individual checkout actions for each of the active release branches
schedule:
- cron: '30 2 * * *' # runs daily at 2:30 am.
jobs:
main-arm64:
uses: ./.github/workflows/tests-arm64-template.yaml
with:
etcdBranch: main
integrationTestCmd: make test-integration
unitTestCmd: GO_TEST_FLAGS='-p=2' make test-unit
release-35-arm64:
uses: ./.github/workflows/tests-arm64-template.yaml
with:
etcdBranch: release-3.5
integrationTestCmd: PASSES='integration' RACE='false' ./test.sh
unitTestCmd: PASSES='unit' CPU='4' ./test.sh -p=2
gofailMake: "no"
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
---
name: Tests-arm64
name: Reusable Arm64 Integration Workflow
on:
schedule:
- cron: '30 1 * * *' # runs daily at 1:30 am.
workflow_call:
inputs:
etcdBranch:
required: true
type: string
integrationTestCmd:
required: true
type: string
unitTestCmd:
required: true
type: string
gofailMake:
required: false
type: string
default: "yes"
permissions: read-all

jobs:
test:
# this is to prevent the job to run at forked projects
Expand All @@ -23,6 +37,8 @@ jobs:
- linux-arm64-unit-4-cpu-race
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
ref: "${{ inputs.etcdBranch }}"
# https://github.com/actions/checkout/issues/1169
- run: git config --system --add safe.directory '*'
- id: goversion
Expand All @@ -40,19 +56,19 @@ jobs:
export JUNIT_REPORT_DIR=$(realpath ${TARGET})
case "${TARGET}" in
linux-arm64-integration-1-cpu)
make gofail-enable
GOOS=linux GOARCH=arm64 CPU=1 make test-integration
if [ "${{ inputs.gofailMake }}" == "yes" ]; then make gofail-enable; fi
GOOS=linux GOARCH=arm64 CPU=1 ${{ inputs.integrationTestCmd }}
;;
linux-arm64-integration-2-cpu)
make gofail-enable
GOOS=linux GOARCH=arm64 CPU=2 make test-integration
if [ "${{ inputs.gofailMake }}" == "yes" ]; then make gofail-enable; fi
GOOS=linux GOARCH=arm64 CPU=2 ${{ inputs.integrationTestCmd }}
;;
linux-arm64-integration-4-cpu)
make gofail-enable
GOOS=linux GOARCH=arm64 CPU=4 make test-integration
if [ "${{ inputs.gofailMake }}" == "yes" ]; then make gofail-enable; fi
GOOS=linux GOARCH=arm64 CPU=4 ${{ inputs.integrationTestCmd }}
;;
linux-arm64-unit-4-cpu-race)
GOOS=linux GOARCH=arm64 CPU=4 RACE=true GO_TEST_FLAGS='-p=2' make test-unit
GOOS=linux GOARCH=arm64 CPU=4 RACE=true ${{ inputs.unitTestCmd }}
;;
*)
echo "Failed to find target"
Expand Down

0 comments on commit 4ea8da7

Please sign in to comment.