Skip to content

Commit

Permalink
ci: Use Ubuntu 22.04 to ensure compatibility with older LLVM versions (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
kateinoigakukun authored Jan 20, 2025
1 parent 574b88d commit 930d16d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-22.04, macos-latest, windows-latest]
clang_version: [10.0.0]
# use different LLVM versions among oses because of the lack of
# official assets on github.
include:
- os: ubuntu-latest
- os: ubuntu-22.04
clang_version: 10.0.0
llvm_asset_suffix: x86_64-linux-gnu-ubuntu-18.04
- os: macos-latest
clang_version: 10.0.0
llvm_asset_suffix: x86_64-apple-darwin
- os: windows-latest
clang_version: 10.0.0
- os: ubuntu-latest
- os: ubuntu-22.04
clang_version: 16.0.0
llvm_asset_suffix: x86_64-linux-gnu-ubuntu-18.04
enable_pic: true
Expand All @@ -40,7 +40,7 @@ jobs:
set -ex
sudo apt-get update
sudo apt-get install -y libtinfo5
if: matrix.os == 'ubuntu-latest'
if: startsWith(matrix.os, 'ubuntu-')

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

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

- uses: actions/[email protected]
with:
Expand Down

0 comments on commit 930d16d

Please sign in to comment.