Skip to content

Commit 49d4ff4

Browse files
committed
ci: run aarch64 jobs on GitHub-hosted runners
The main idea behind this switch is to have less of our own infrastructure to support. We added our own aarch64 runners before GitHub started to provide them natively [1] and, in fact, never wanted to spend time on them. A big advantage of GitHub-hosted runners is that they're created per job. Ours are long-lived machines, and a bad job may break the jobs after it. This is a constant source of problems we have to work around: the CodeQL workflow has to clean up the CodeQL bundles it downloads so as not to fill the whole disk; the environment action kills test processes left by earlier jobs and cleans up the git repository. We even have the special `prepare-checkout` action that does some black magic, so that `actions/checkout` works on a git repository left by a previous job. In fact, the runner-per-job approach can be implemented for self-hosted runners too, see [2] and [3]. But that's the infrastructure work we want to avoid. I'd also note that there are providers of GitHub Actions runners besides GitHub itself, including ones that offer aarch64 runners. So if we find ourselves in need of more resources, we have options that don't require managing our own Kubernetes cluster. All of the above applies to the x86_64 runners too, and I hope we will move them as well, just later. Besides `debug_aarch64` and `packaging_build_test_deploy`, which run in tarantool CI, this commit adjusts `luajit-integration`, which is called from tarantool/luajit CI (as is `debug_aarch64`). This way we move part of LuaJIT's CI to GitHub-hosted runners. [1]: https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/ [2]: https://github.blog/changelog/2021-09-20-github-actions-ephemeral-self-hosted-runners-new-webhooks-for-auto-scaling/ [3]: actions/actions-runner-controller#2174 Drafted by an LLM, conducted and corrected by the commit author. NO_DOC=ci NO_TEST=ci NO_CHANGELOG=ci
1 parent 2f0e52d commit 49d4ff4

4 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎.github/actions/environment/action.yml‎

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,19 @@ runs:
102102
git clean -xffd
103103
git submodule foreach --recursive 'git clean -xffd'
104104
105+
# Limit the size of the LuaJIT tests' work directory on self-hosted
106+
# runners.
107+
#
108+
# The reason is that in bad circumstances a profiler test (sysprof
109+
# or memprof) may write a huge profile file.
110+
#
111+
# Generally, it is harmless (only the job fails), but our
112+
# self-hosted runners are reused between jobs and a filled disk may
113+
# cause other jobs to fail.
114+
#
105115
# See for details: https://github.com/tarantool/tarantool/issues/7472.
106-
# However, this workaround doesn't work on our aarch64 runners due to
107-
# the following error:
108-
# mount: /tmp/luajit-test-vardir: mount failed: Operation not permitted
109-
# Looks like it happens because our aarch64 runners are LXD containers.
110-
if ${{ runner.os == 'Linux' && runner.arch != 'ARM64' &&
111-
!contains(runner.name, 'GitHub Actions') }}; then
116+
if ${{ runner.os == 'Linux' &&
117+
runner.environment == 'self-hosted' }}; then
112118
LUAJIT_TEST_VARDIR=/tmp/luajit-test-vardir
113119
LUAJIT_TEST_VARDIR_DISK=/tmp/luajit-test-vardir-disk/disk.ext4
114120

‎.github/workflows/debug_aarch64.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
( github.event_name != 'pull_request' ||
5454
contains(github.event.pull_request.labels.*.name, 'full-ci') )
5555

56-
runs-on: graviton
56+
runs-on: ubuntu-26.04-arm
5757

5858
timeout-minutes: 60
5959

‎.github/workflows/luajit-integration.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ on:
4949

5050
jobs:
5151
luajit-integration:
52-
runs-on: [self-hosted, regular, '${{ inputs.os }}', '${{ inputs.arch }}']
52+
runs-on: ${{ inputs.os == 'Linux' && inputs.arch == 'ARM64' &&
53+
'ubuntu-26.04-arm' ||
54+
fromJSON(format('["self-hosted", "regular", "{0}", "{1}"]',
55+
inputs.os, inputs.arch)) }}
5356
timeout-minutes: 60
5457
steps:
5558
- name: Prepare checkout

‎.github/workflows/packaging_build_test_deploy.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ on:
1616

1717
jobs:
1818
build:
19-
runs-on: [ self-hosted, Linux, '${{ inputs.arch }}', regular ]
19+
runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-26.04-arm' ||
20+
fromJSON('["self-hosted", "Linux", "x86_64", "regular"]') }}
2021

2122
timeout-minutes: 60
2223

@@ -71,7 +72,8 @@ jobs:
7172
bot-token: ${{ secrets.VKTEAMS_BOT_TOKEN }}
7273

7374
test:
74-
runs-on: [ self-hosted, Linux, '${{ inputs.arch }}', regular ]
75+
runs-on: ${{ inputs.arch == 'aarch64' && 'ubuntu-26.04-arm' ||
76+
fromJSON('["self-hosted", "Linux", "x86_64", "regular"]') }}
7577

7678
timeout-minutes: 60
7779

0 commit comments

Comments
 (0)