@@ -35,23 +35,41 @@ jobs:
3535 github_timeout : ${{ steps.generate_output.outputs.github_timeout }}
3636 test_timeout : ${{ steps.generate_output.outputs.test_timeout }}
3737 runs_on : ${{ steps.generate_output.outputs.runs_on }}
38+ runner_x64 : ${{ steps.generate_output.outputs.runner_x64 }}
39+ runner_arm : ${{ steps.generate_output.outputs.runner_arm }}
3840 steps :
3941 - id : generate_output
4042 run : |
4143 shards=3
4244 timeout=35 # update this to TEST_TIMEOUT if you update the Makefile
43- runs_on='["ubuntu-latest-8-cores"]'
45+
46+ # Runner configuration: use 8-core runners for temporalio org, standard runners for forks
47+ if [[ "${{ github.repository_owner }}" == "temporalio" ]]; then
48+ runner_x64="ubuntu-latest-8-cores"
49+ runner_arm="ubuntu-24.04-arm64-8-cores"
50+ else
51+ runner_x64="ubuntu-latest"
52+ runner_arm="ubuntu-24.04-arm"
53+ fi
54+ runs_on="[\"${runner_x64}\"]"
55+
4456 {
4557 echo "shard_indices=[ $(seq -s, 0 $((shards-1))) ]"
4658 echo "shards=$shards"
4759 echo "github_timeout=$((timeout+5))"
4860 echo "test_timeout=${timeout}m"
4961 echo "runs_on=$runs_on"
62+ echo "runner_x64=$runner_x64"
63+ echo "runner_arm=$runner_arm"
5064 } >> "$GITHUB_OUTPUT"
5165
5266 pre-build :
53- name : Pre-build for cache
54- runs-on : ubuntu-latest
67+ name : Pre-build for cache (${{ matrix.arch }})
68+ needs : set-up-functional-test
69+ strategy :
70+ matrix :
71+ arch : [x64, arm]
72+ runs-on : ${{ matrix.arch == 'arm' && needs.set-up-functional-test.outputs.runner_arm || needs.set-up-functional-test.outputs.runner_x64 }}
5573 steps :
5674 - uses : actions/checkout@v6
5775 with :
87105
88106 misc-checks :
89107 name : Misc checks
90- needs : pre-build
91- runs-on : ubuntu-latest
108+ needs : [ pre-build, set-up-functional-test]
109+ runs-on : ${{ needs.set-up-functional-test.outputs.runner_x64 }}
92110 steps :
93111 - uses : actions/checkout@v6
94112 with :
@@ -127,7 +145,7 @@ jobs:
127145 unit-test :
128146 name : Unit test
129147 needs : [pre-build, set-up-functional-test]
130- runs-on : ubuntu-latest
148+ runs-on : ${{ needs.set-up-functional-test.outputs.runner_x64 }}
131149 steps :
132150 - uses : actions/checkout@v6
133151 with :
@@ -200,7 +218,7 @@ jobs:
200218 integration-test :
201219 name : Integration test
202220 needs : [pre-build, set-up-functional-test]
203- runs-on : ubuntu-latest
221+ runs-on : ${{ needs.set-up-functional-test.outputs.runner_x64 }}
204222 steps :
205223 - uses : actions/checkout@v6
206224 with :
@@ -328,6 +346,7 @@ jobs:
328346 persistence_type : sql
329347 persistence_driver : sqlite
330348 containers : []
349+ arch : arm
331350 - name : mysql8
332351 persistence_type : sql
333352 persistence_driver : mysql8
@@ -340,8 +359,7 @@ jobs:
340359 persistence_type : sql
341360 persistence_driver : postgres12_pgx
342361 containers : [postgresql]
343- # For forks, fall back to ubuntu-latest since custom runners are not available.
344- runs-on : ${{ github.repository_owner == 'temporalio' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
362+ runs-on : ${{ matrix.arch == 'arm' && needs.set-up-functional-test.outputs.runner_arm || needs.set-up-functional-test.outputs.runner_x64 }}
345363 env :
346364 TEST_TOTAL_SHARDS : ${{ needs.set-up-functional-test.outputs.total_shards }}
347365 TEST_SHARD_INDEX : ${{ matrix.shard_index }}
@@ -491,8 +509,7 @@ jobs:
491509 persistence_driver : postgres12_pgx
492510 parallel_flags : " -parallel=2" # reduce parallelism for postgres
493511 containers : [postgresql]
494- # For forks, fall back to ubuntu-latest since custom runners are not available.
495- runs-on : ${{ github.repository_owner == 'temporalio' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
512+ runs-on : ${{ needs.set-up-functional-test.outputs.runner_x64 }}
496513 env :
497514 PERSISTENCE_TYPE : ${{ matrix.persistence_type }}
498515 PERSISTENCE_DRIVER : ${{ matrix.persistence_driver }}
@@ -633,8 +650,7 @@ jobs:
633650 persistence_type : sql
634651 persistence_driver : postgres12_pgx
635652 containers : [postgresql]
636- # For forks, fall back to ubuntu-latest since custom runners are not available.
637- runs-on : ${{ github.repository_owner == 'temporalio' && 'ubuntu-latest-8-cores' || 'ubuntu-latest' }}
653+ runs-on : ${{ needs.set-up-functional-test.outputs.runner_x64 }}
638654 env :
639655 PERSISTENCE_TYPE : ${{ matrix.persistence_type }}
640656 PERSISTENCE_DRIVER : ${{ matrix.persistence_driver }}
0 commit comments