65
65
- uses : actions/checkout@v4
66
66
with :
67
67
fetch-depth : 0
68
- - run : git fetch --tags --force
69
- name : Force-fetch tags to work around actions/checkout#290
70
- # We can't use `--depth 1` here sadly because the GNU config
71
- # submodule is not pinned to a particular tag/branch. Please
72
- # bump depth (or even better, the submodule), in case of "error:
73
- # Server does not allow request for unadvertised object" in the
74
- # future.
75
- - run : git submodule update --init --depth 64 --jobs 3
68
+ - uses : ./.github/actions/checkout
69
+ - uses : ./.github/actions/install-deps
76
70
77
71
# Persist ccache-based caches across builds. This directory is configured
78
72
# via the CCACHE_DIR env var below for ccache to use.
@@ -103,21 +97,6 @@ jobs:
103
97
echo WASI_SDK_CI_TOOLCHAIN_CMAKE_ARGS="$cmake_args" >> $GITHUB_ENV
104
98
shell: bash
105
99
106
- # Add some extra installed software on each runner as necessary.
107
- - name : Setup `wasmtime` for tests
108
- uses : bytecodealliance/actions/wasmtime/setup@v1
109
- with :
110
- version : " 18.0.2"
111
- - name : Install ccache, ninja (macOS)
112
- run : brew install ccache ninja
113
- if : runner.os == 'macOS'
114
- - name : Install ccache, ninja (Windows)
115
- run : choco install ccache ninja
116
- if : runner.os == 'Windows'
117
- - name : Install ccache, ninja (Linux)
118
- run : sudo apt install ccache
119
- if : runner.os == 'Linux'
120
-
121
100
- name : Clear ccache statistics
122
101
run : ccache --zero-stats
123
102
@@ -184,6 +163,30 @@ jobs:
184
163
path : ${{ runner.tool_cache }}/ccache
185
164
key : 0-cache-${{ matrix.artifact }}-${{ github.run_id }}
186
165
166
+ build-only-sysroot :
167
+ name : Build only sysroot
168
+ runs-on : ubuntu-latest
169
+ steps :
170
+ - uses : actions/checkout@v4
171
+ with :
172
+ fetch-depth : 0
173
+ - uses : ./.github/actions/checkout
174
+ - 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]
182
+ - run : |
183
+ cmake -G Ninja -B build -S . \
184
+ -DCMAKE_C_COMPILER=/usr/lib/llvm-18/bin/clang \
185
+ -DCMAKE_SYSTEM_NAME=WASI \
186
+ -DWASI_SDK_INCLUDE_TESTS=ON
187
+ - run : ninja -C build
188
+ - run : ctest --output-on-failure --parallel 10 --test-dir build/tests
189
+
187
190
# Once all of the above matrix entries have completed this job will run and
188
191
# assemble the final `wasi-sdk-*` artifacts by fusing the toolchain/sysroot
189
192
# artifacts.
@@ -195,8 +198,7 @@ jobs:
195
198
- uses : actions/checkout@v4
196
199
with :
197
200
fetch-depth : 0
198
- - run : git fetch --tags --force
199
- name : Force-fetch tags to work around actions/checkout#290
201
+ - uses : ./.github/actions/checkout
200
202
201
203
# Download all artifacts from all platforms in `build`, merge them into
202
204
# final wasi-sdk-* artifacts, and then upload them.
@@ -256,16 +258,8 @@ jobs:
256
258
- uses : actions/checkout@v4
257
259
with :
258
260
fetch-depth : 0
259
- - run : git fetch --tags --force
260
- name : Force-fetch tags to work around actions/checkout#290
261
- - run : git submodule update --init --depth 64 --jobs 3
262
- - name : Setup `wasmtime` for tests
263
- uses : bytecodealliance/actions/wasmtime/setup@v1
264
- with :
265
- version : " 18.0.2"
266
- - name : Install ninja
267
- run : sudo apt-get install -y ninja-build
268
- if : runner.os == 'Linux'
261
+ - uses : ./.github/actions/checkout
262
+ - uses : ./.github/actions/install-deps
269
263
- uses : actions/download-artifact@v4
270
264
with :
271
265
name : dist-x86_64-linux
0 commit comments