Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

github wokflow: use large runner, remove limits #612

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions .github/workflows/tests-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ on:
runs-on:
required: false
type: string
default: "['ubuntu-latest']"
default: ubuntu-latest
targets:
required: false
type: string
default: "['linux-unit-test-1-cpu','linux-unit-test-2-cpu','linux-unit-test-4-cpu']"
permissions: read-all

jobs:
test-linux:
strategy:
fail-fast: false
matrix:
target:
- linux-unit-test-1-cpu
- linux-unit-test-2-cpu
- linux-unit-test-4-cpu
- linux-unit-test-4-cpu-race
runs-on: ${{ fromJson(inputs.runs-on) }}
target: ${{ fromJSON(inputs.targets) }}
runs-on: ${{ inputs.runs-on }}
steps:
- uses: actions/checkout@v4
- id: goversion
Expand All @@ -42,13 +42,7 @@ jobs:
CPU=4 make test
;;
linux-unit-test-4-cpu-race)
# XXX: By default, the Github Action runner will terminate the process
# if it has high resource usage. Try to use GOGC to limit memory and
# cpu usage here to prevent unexpected terminating. It can be replaced
# with GOMEMLIMIT=2048MiB if the go-version is updated to >=1.19.x.
#
# REF: https://github.com/actions/runner-images/issues/6680#issuecomment-1335778010
GOGC=30 CPU=4 ENABLE_RACE=true make test
CPU=4 ENABLE_RACE=true make test
;;
*)
echo "Failed to find target"
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/tests_amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on: [push, pull_request]
jobs:
test-linux-amd64:
uses: ./.github/workflows/tests-template.yml
test-linux-amd64-race:
uses: ./.github/workflows/tests-template.yml
with:
runs-on: ubuntu-latest-8-cores
targets: "['linux-unit-test-4-cpu-race']"

coverage:
needs: ["test-linux-amd64"]
runs-on: ubuntu-latest
needs:
- test-linux-amd64
- test-linux-amd64-race
runs-on: ubuntu-latest-8-cores
steps:
- uses: actions/checkout@v4
- id: goversion
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/tests_arm64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,9 @@ jobs:
test-linux-arm64:
uses: ./.github/workflows/tests-template.yml
with:
runs-on: "['actuated-arm64-4cpu-16gb']"
runs-on: actuated-arm64-4cpu-16gb
test-linux-arm64-race:
uses: ./.github/workflows/tests-template.yml
with:
runs-on: actuated-arm64-8cpu-16gb
targets: "['linux-unit-test-4-cpu-race']"