Skip to content

Commit e44ad98

Browse files
authored
ARM test runners for SQLite (#9224)
## What changed? WISOTT ## Why? Speed up SQLite test execution. PS: Some other setups actually became slower (mysql) or were incompatible (ES) ## How did you test it? - [ ] built - [ ] run locally and tested manually - [x] covered by existing tests - [ ] added new unit test(s) - [ ] added new functional test(s) Runtime comparison of sqlite jobs: | main | branch | |--------|--------| | [22min](https://github.com/temporalio/temporal/actions/runs/21691334709/job/62551794926) | [18min](https://github.com/temporalio/temporal/actions/runs/21718435411/job/62641377429?pr=9224) | | [20min](https://github.com/temporalio/temporal/actions/runs/21691334709/job/62551794949) | [16min](https://github.com/temporalio/temporal/actions/runs/21718435411/job/62641377387?pr=9224) | | [16min](https://github.com/temporalio/temporal/actions/runs/21691334709/job/62551794939) | [14min](https://github.com/temporalio/temporal/actions/runs/21718435411/job/62641377462?pr=9224) |
1 parent 6e176bd commit e44ad98

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

.github/workflows/run-tests.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -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:
@@ -87,8 +105,8 @@ jobs:
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

Comments
 (0)