Skip to content

Commit a62d5a2

Browse files
committed
ci: override ImageOS env var for aarch linux
The Elixir job has started failing because it says the `ImageOS` env var is no longer one of a set of blessed values (it wants `ubuntu24` but sees `ubuntu24-arm`). I'm guessing GitHub changed how they name the runner images recently. This value is used to select the dependency bundle to download from Hex, so overriding it like this is fine, at least until the maintainers of the BEAM action update their infrastructure to catch up with the GitHub rename, which will probably cause this to break again. Signed-off-by: Nathan Perry <nathan@tailscale.com> Change-Id: I3cc65790ad65130486bb98c434b9c2f46a6a6964
1 parent 86c2e06 commit a62d5a2

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/elixir.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,29 @@ jobs:
8484
ts_elixir/deps/
8585
key: ${{ matrix.platform.triple }}-mix-${{ env.cache_key }}-elixir-${{ matrix.elixir.version }}-otp-${{ matrix.otp.version }}-${{ hashFiles('**/mix.lock') }}
8686

87+
# The setup-beam action uses the `ImageOS` env var to select the dependency bundle to
88+
# download from Hex, and so it needs to be one of a few blessed values. GitHub seems
89+
# to have changed how they set this variable recently, including `-arm` for aarch64
90+
# linux. This broke `setup-beam`, so we put it back how it was here and restore
91+
# afterwards.
92+
- name: Override ImageOS
93+
if: ${{ matrix.platform.runner == 'linux-arm64-16cpu' }}
94+
run: |-
95+
echo ImageOSPrev="$ImageOS" >> $GITHUB_ENV
96+
echo ImageOS=ubuntu24 >> $GITHUB_ENV
97+
8798
- name: Install elixir
8899
id: install-elixir
89100
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # 1.24.0
90101
with:
91102
otp-version: ${{ matrix.otp.version }}
92103
elixir-version: ${{ matrix.elixir.version }}
93104

105+
- name: Restore ImageOS
106+
if: ${{ matrix.platform.runner == 'linux-arm64-16cpu' }}
107+
run: |-
108+
echo ImageOS="$ImageOSPrev" >> $GITHUB_ENV
109+
94110
- name: Setup rust
95111
id: setup-rust
96112
uses: ./.github/actions/setup-rust

0 commit comments

Comments
 (0)