Skip to content

Commit 1df61f1

Browse files
authoredDec 7, 2024··
Vanilla-LLVM GHA: Bump Linux jobs to Ubuntu 24 and use distro LLVM 15/18 packages (#4797)
1 parent 82878ef commit 1df61f1

File tree

1 file changed

+18
-35
lines changed

1 file changed

+18
-35
lines changed
 

‎.github/workflows/supported_llvm_versions.yml

+18-35
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
include:
18-
- job_name: Ubuntu 20.04, LDC-LLVM 18, bootstrap LDC
19-
os: ubuntu-20.04
18+
- job_name: Ubuntu 24.04, LLVM 18, bootstrap LDC
19+
os: ubuntu-24.04
2020
host_dc: ldc-1.19.0
21-
# FIXME: no usable official package available yet
22-
llvm_version: https://github.com/ldc-developers/llvm-project/releases/download/ldc-v18.1.8/llvm-18.1.8-linux-x86_64.tar.xz
21+
llvm_version: 18
2322
cmake_flags: -DRT_SUPPORT_SANITIZERS=ON -DPHOBOS_SYSTEM_ZLIB=ON
2423
- job_name: macOS 14, LLVM 17, latest LDC beta
2524
os: macos-14
@@ -31,10 +30,10 @@ jobs:
3130
host_dc: ldc-beta
3231
llvm_version: 16.0.5
3332
cmake_flags: -DBUILD_SHARED_LIBS=OFF -DCMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/opt/zstd/lib -DCMAKE_C_COMPILER=/usr/bin/cc -DCMAKE_CXX_COMPILER=/usr/bin/c++
34-
- job_name: Ubuntu 20.04, LLVM 15, latest DMD beta
35-
os: ubuntu-20.04
33+
- job_name: Ubuntu 24.04, LLVM 15, latest DMD beta
34+
os: ubuntu-24.04
3635
host_dc: dmd-beta
37-
llvm_version: 15.0.6
36+
llvm_version: 15
3837
cmake_flags: -DBUILD_SHARED_LIBS=ON -DRT_SUPPORT_SANITIZERS=ON -DLIB_SUFFIX=64 -DLDC_LINK_MANUALLY=ON
3938
name: ${{ matrix.job_name }}
4039
runs-on: ${{ matrix.os }}
@@ -63,21 +62,22 @@ jobs:
6362
python3 -m pip install --user lit
6463
fi
6564
python3 -c "import lit.main; lit.main.main();" --version . | head -n 1
66-
- name: 'Linux: Install gdb, llvm-symbolizer, libzstd, zlib1g-dev'
65+
- name: 'Linux: Install gdb, lld, llvm-dev and libclang-common-dev'
6766
if: runner.os == 'Linux'
6867
run: |
6968
set -eux
7069
sudo apt-get update
71-
# Don't use latest gdb v10+ from Ubuntu toolchain PPA with regressions, use official v9
72-
sudo apt-get install gdb=9.1-0ubuntu1 llvm libzstd-dev zlib1g-dev
70+
sudo apt-get install gdb lld-${{ matrix.llvm_version }} llvm-${{ matrix.llvm_version }}-dev libclang-common-${{ matrix.llvm_version }}-dev
7371
74-
- name: Try to restore cached LLVM
72+
- name: 'macOS: Try to restore cached LLVM'
73+
if: runner.os == 'macOS'
7574
uses: actions/cache@v4
7675
with:
7776
path: llvm
7877
key: llvm-${{ matrix.llvm_version }}-${{ runner.os }}
7978

80-
- name: Download & extract prebuilt vanilla LLVM ${{ matrix.llvm_version }}
79+
- name: 'macOS: Download & extract prebuilt vanilla LLVM ${{ matrix.llvm_version }}'
80+
if: runner.os == 'macOS'
8181
run: |
8282
set -eux
8383
if [[ -d llvm ]]; then
@@ -89,19 +89,7 @@ jobs:
8989
if [[ "$version" =~ ^https:// ]]; then
9090
url="$version"
9191
else
92-
if [[ '${{ runner.os }}' == macOS ]]; then
93-
if [[ "$version" =~ ^1[6-9]\. ]]; then
94-
suffix='arm64-apple-darwin22.0'
95-
else
96-
suffix='x86_64-apple-darwin'
97-
fi
98-
elif [[ "$version" =~ ^1[7-9]\. ]]; then
99-
suffix='x86_64-linux-gnu-ubuntu-22.04' # LLVM 17+
100-
else
101-
suffix='x86_64-linux-gnu-ubuntu-18.04' # LLVM 14+
102-
fi
103-
104-
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-$suffix.tar.xz"
92+
url="https://github.com/llvm/llvm-project/releases/download/llvmorg-$version/clang+llvm-$version-arm64-apple-darwin22.0.tar.xz"
10593
fi
10694
10795
curl -fL --retry 3 --max-time 300 -o llvm.tar.xz "$url"
@@ -110,24 +98,22 @@ jobs:
11098
rm llvm.tar.xz
11199
112100
# don't link lib{c++,unwind} libs from LLVM package, they'd need RPATH fiddling
113-
if [[ '${{ runner.os }}' == macOS ]]; then
114-
rm -f llvm/lib/lib{c++,unwind}.*
115-
fi
101+
rm -f llvm/lib/lib{c++,unwind}.*
116102
117103
- name: 'Linux: Make lld the default linker'
118104
if: runner.os == 'Linux'
119105
run: |
120106
set -eux
121107
echo "Using lld to work around sporadic failures"
122-
sudo ln -sf "$PWD/llvm/bin/ld.lld" /usr/bin/ld
108+
sudo ln -sf ld.lld-${{ matrix.llvm_version }} /usr/bin/ld
123109
ld --version
124110
125111
- name: Build LDC & LDC D unittests & defaultlib unittest runners with extra '${{ matrix.cmake_flags }}'
126112
run: |
127113
set -eux
128114
cmake -G Ninja . \
129115
-DCMAKE_BUILD_TYPE=Release \
130-
-DLLVM_ROOT_DIR="$PWD/llvm" \
116+
-DLLVM_ROOT_DIR=${{ runner.os == 'Linux' && format('/usr/lib/llvm-{0}', matrix.llvm_version) || '"$PWD/llvm"' }} \
131117
-DLDC_LINK_MANUALLY=OFF \
132118
${{ matrix.cmake_flags }}
133119
ninja obj/ldc2.o all ldc2-unittest all-test-runners
@@ -140,14 +126,11 @@ jobs:
140126
if: success() || failure()
141127
run: |
142128
set -eux
143-
# Linux: don't use vanilla llvm-symbolizer (no support for zlib-compressed debug sections => failing ASan tests)
144129
if [[ '${{ runner.os }}' == 'Linux' ]]; then
145-
mv llvm/bin/llvm-symbolizer llvm/bin/llvm-symbolizer.bak
130+
# FIXME: lsan_interceptors.cpp:82 "((!lsan_init_is_running)) != (0)"
131+
rm tests/sanitizers/lsan_memleak.d
146132
fi
147133
ctest -V -R "lit-tests"
148-
if [[ -f llvm/bin/llvm-symbolizer.bak ]]; then
149-
mv llvm/bin/llvm-symbolizer.bak llvm/bin/llvm-symbolizer
150-
fi
151134
- name: Run DMD testsuite
152135
if: success() || failure()
153136
run: ctest -V -R "dmd-testsuite"

0 commit comments

Comments
 (0)
Please sign in to comment.