Skip to content

Commit e6a8337

Browse files
authored
Pin CI runner images to explicit versions (#507)
* Pin CI runner images to explicit versions CI is run infrequently enough on this repository that there's a nontrivial chance that GitHub updates the definition of `ubuntu-latest` for example between two CI runs. This can be confusing for contributors as PRs seemingly break CI when in reality they have nothing to do with the breakage and it's due to the image changing. This PR pins all images to the definition of `*-latest` at this time. The one exception is that one builder was pinned to 22.04 and I'm going to update it to 24.04 here and see if I can't fix CI issues that come up. This'll require explicit PRs to update these images in the future, but hopefully that's only once every few ~years so not too much of a burden. * Try not custom-installing clang 18 * Try to fix CI issue * Fix CI again (attempt) * Further try to fix CI * Another fix for CI Surely if I keep making commits that say "another fix" eventually I'll run out of fixes. Surely, right? I'd put this in limerick form to be more amusing if someone comes to read this but I'm not clever enough to do that, so instead I'll just abruptly
1 parent 67283cc commit e6a8337

File tree

2 files changed

+19
-17
lines changed

2 files changed

+19
-17
lines changed

.github/workflows/main.yml

+12-16
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
matrix:
2020
include:
2121
- artifact: x86_64-linux
22-
os: ubuntu-latest
22+
os: ubuntu-24.04
2323

2424
- artifact: arm64-linux
25-
os: ubuntu-latest
25+
os: ubuntu-24.04
2626
rust_target: aarch64-unknown-linux-gnu
2727
env:
2828
# Don't build a sysroot for this cross-compiled target since it
@@ -41,15 +41,15 @@ jobs:
4141
-DRUST_TARGET=aarch64-unknown-linux-gnu
4242
4343
- artifact: arm64-macos
44-
os: macos-latest
44+
os: macos-14
4545
rust_target: aarch64-apple-darwin
4646
env:
4747
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS: >-
4848
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.12
4949
-DCMAKE_OSX_ARCHITECTURES=arm64
5050
5151
- artifact: x86_64-macos
52-
os: macos-latest
52+
os: macos-14
5353
rust_target: x86_64-apple-darwin
5454
env:
5555
WASI_SDK_CI_SKIP_SYSROOT: 1
@@ -58,7 +58,7 @@ jobs:
5858
-DCMAKE_OSX_ARCHITECTURES=x86_64
5959
6060
- artifact: x86_64-windows
61-
os: windows-latest
61+
os: windows-2022
6262

6363
env: ${{ matrix.env || fromJSON('{}') }}
6464
steps:
@@ -165,25 +165,21 @@ jobs:
165165

166166
build-only-sysroot:
167167
name: Build only sysroot
168-
runs-on: ubuntu-22.04
168+
runs-on: ubuntu-24.04
169169
steps:
170170
- uses: actions/checkout@v4
171171
with:
172172
fetch-depth: 0
173173
- uses: ./.github/actions/checkout
174174
- uses: ./.github/actions/install-deps
175-
- run: |
176-
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
177-
name=$(lsb_release -s -c)
178-
sudo add-apt-repository -y "deb http://apt.llvm.org/$name/ llvm-toolchain-$name-18 main"
179-
sudo add-apt-repository -y "deb-src http://apt.llvm.org/$name/ llvm-toolchain-$name-18 main"
180-
sudo apt-get install -y clang-18 llvm-18 lld-18
181-
- run: cargo install [email protected]
175+
- run: cargo install [email protected]
182176
- run: |
183177
cmake -G Ninja -B build -S . \
184178
-DCMAKE_C_COMPILER=/usr/lib/llvm-18/bin/clang \
185179
-DCMAKE_SYSTEM_NAME=WASI \
186-
-DWASI_SDK_INCLUDE_TESTS=ON
180+
-DWASI_SDK_INCLUDE_TESTS=ON \
181+
-DCMAKE_C_LINKER_DEPFILE_SUPPORTED=OFF \
182+
-DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=OFF
187183
- run: ninja -C build
188184
- run: ctest --output-on-failure --parallel 10 --test-dir build/tests
189185

@@ -193,7 +189,7 @@ jobs:
193189
finalize:
194190
name: Finalize wasi-sdk artifacts
195191
needs: build
196-
runs-on: ubuntu-latest
192+
runs-on: ubuntu-24.04
197193
steps:
198194
- uses: actions/checkout@v4
199195
with:
@@ -253,7 +249,7 @@ jobs:
253249
test-standalone:
254250
name: Test standalone toolchain
255251
needs: build
256-
runs-on: ubuntu-latest
252+
runs-on: ubuntu-24.04
257253
steps:
258254
- uses: actions/checkout@v4
259255
with:

cmake/wasi-sdk-sysroot.cmake

+7-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,13 @@ set(default_cmake_args
4747
-DCMAKE_C_COMPILER_WORKS=ON
4848
-DCMAKE_CXX_COMPILER_WORKS=ON
4949
-DCMAKE_SYSROOT=${wasi_sysroot}
50-
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake)
50+
-DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake
51+
# CMake detects this based on `CMAKE_C_COMPILER` alone and when that compiler
52+
# is just a bare "clang" installation then it can mistakenly deduce that this
53+
# feature is supported when it's not actually supported for WASI targets.
54+
# Currently `wasm-ld` does not support the linker flag for this.
55+
-DCMAKE_C_LINKER_DEPFILE_SUPPORTED=OFF
56+
-DCMAKE_CXX_LINKER_DEPFILE_SUPPORTED=OFF)
5157

5258
if(CMAKE_C_COMPILER_LAUNCHER)
5359
list(APPEND default_cmake_args -DCMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER})

0 commit comments

Comments
 (0)