Skip to content

Commit 930d16d

Browse files
ci: Use Ubuntu 22.04 to ensure compatibility with older LLVM versions (#561)
GitHub Actions is migrating ubuntu-latest to Ubuntu 24.04, which no longer provides the libtinfo5 package. Since older LLVM versions depend on libtinfo5 and do not offer pre-built binaries for recent Ubuntu versions, we explicitly specify ubuntu-22.04 in the workflow to maintain compatibility.
1 parent 574b88d commit 930d16d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ jobs:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [ubuntu-latest, macos-latest, windows-latest]
10+
os: [ubuntu-22.04, macos-latest, windows-latest]
1111
clang_version: [10.0.0]
1212
# use different LLVM versions among oses because of the lack of
1313
# official assets on github.
1414
include:
15-
- os: ubuntu-latest
15+
- os: ubuntu-22.04
1616
clang_version: 10.0.0
1717
llvm_asset_suffix: x86_64-linux-gnu-ubuntu-18.04
1818
- os: macos-latest
1919
clang_version: 10.0.0
2020
llvm_asset_suffix: x86_64-apple-darwin
2121
- os: windows-latest
2222
clang_version: 10.0.0
23-
- os: ubuntu-latest
23+
- os: ubuntu-22.04
2424
clang_version: 16.0.0
2525
llvm_asset_suffix: x86_64-linux-gnu-ubuntu-18.04
2626
enable_pic: true
@@ -40,7 +40,7 @@ jobs:
4040
set -ex
4141
sudo apt-get update
4242
sudo apt-get install -y libtinfo5
43-
if: matrix.os == 'ubuntu-latest'
43+
if: startsWith(matrix.os, 'ubuntu-')
4444

4545
- name: Install LLVM tools (Windows)
4646
shell: bash
@@ -82,7 +82,7 @@ jobs:
8282
echo "CC=$CLANG_DIR/clang" >> $GITHUB_ENV
8383
echo "AR=$CLANG_DIR/llvm-ar" >> $GITHUB_ENV
8484
echo "NM=$CLANG_DIR/llvm-nm" >> $GITHUB_ENV
85-
if: matrix.os == 'ubuntu-latest'
85+
if: startsWith(matrix.os, 'ubuntu-')
8686

8787
- name: Disable libsetjmp for old LLVM
8888
shell: bash
@@ -137,7 +137,7 @@ jobs:
137137
# test entrypoints: `undefined symbol: __main_argc_argv`.
138138
# The older (<15.0.7) version of wasm-ld does not provide `__heap_end`,
139139
# which is required by our malloc implementation.
140-
if: matrix.os == 'ubuntu-latest' && matrix.clang_version != '10.0.0'
140+
if: startsWith(matrix.os, 'ubuntu-') && matrix.clang_version != '10.0.0'
141141

142142
- uses: actions/upload-artifact@v4.4.0
143143
with:

0 commit comments

Comments
 (0)