72
72
- uses : actions/checkout@v4
73
73
with :
74
74
fetch-depth : 0
75
- - run : git fetch --tags --force
76
- name : Force-fetch tags to work around actions/checkout#290
77
- # We can't use `--depth 1` here sadly because the GNU config
78
- # submodule is not pinned to a particular tag/branch. Please
79
- # bump depth (or even better, the submodule), in case of "error:
80
- # Server does not allow request for unadvertised object" in the
81
- # future.
82
- - run : git submodule update --init --depth 64 --jobs 3
75
+ - uses : ./.github/actions/checkout
76
+ - uses : ./.github/actions/install-deps
83
77
84
78
# Persist ccache-based caches across builds. This directory is configured
85
79
# via the CCACHE_DIR env var below for ccache to use.
@@ -110,21 +104,6 @@ jobs:
110
104
echo WASI_SDK_CI_TOOLCHAIN_CMAKE_ARGS="$cmake_args" >> $GITHUB_ENV
111
105
shell: bash
112
106
113
- # Add some extra installed software on each runner as necessary.
114
- - name : Setup `wasmtime` for tests
115
- uses : bytecodealliance/actions/wasmtime/setup@v1
116
- with :
117
- version : " 18.0.2"
118
- - name : Install ccache, ninja (macOS)
119
- run : brew install ccache ninja
120
- if : runner.os == 'macOS'
121
- - name : Install ccache, ninja (Windows)
122
- run : choco install ccache ninja
123
- if : runner.os == 'Windows'
124
- - name : Install ccache, ninja (Linux)
125
- run : sudo apt install ccache
126
- if : runner.os == 'Linux'
127
-
128
107
- name : Clear ccache statistics
129
108
run : ccache --zero-stats
130
109
@@ -191,6 +170,30 @@ jobs:
191
170
path : ${{ runner.tool_cache }}/ccache
192
171
key : 0-cache-${{ matrix.artifact }}-${{ github.run_id }}
193
172
173
+ build-only-sysroot :
174
+ name : Build only sysroot
175
+ runs-on : ubuntu-latest
176
+ steps :
177
+ - uses : actions/checkout@v4
178
+ with :
179
+ fetch-depth : 0
180
+ - uses : ./.github/actions/checkout
181
+ - uses : ./.github/actions/install-deps
182
+ - run : |
183
+ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
184
+ name=$(lsb_release -s -c)
185
+ sudo add-apt-repository -y "deb http://apt.llvm.org/$name/ llvm-toolchain-$name-18 main"
186
+ sudo add-apt-repository -y "deb-src http://apt.llvm.org/$name/ llvm-toolchain-$name-18 main"
187
+ sudo apt-get install -y clang-18 llvm-18 lld-18
188
+ -
run :
cargo install [email protected]
189
+ - run : |
190
+ cmake -G Ninja -B build -S . \
191
+ -DCMAKE_C_COMPILER=/usr/lib/llvm-18/bin/clang \
192
+ -DCMAKE_SYSTEM_NAME=WASI \
193
+ -DWASI_SDK_INCLUDE_TESTS=ON
194
+ - run : ninja -C build
195
+ - run : ctest --output-on-failure --parallel 10 --test-dir build/tests
196
+
194
197
# Once all of the above matrix entries have completed this job will run and
195
198
# assemble the final `wasi-sdk-*` artifacts by fusing the toolchain/sysroot
196
199
# artifacts.
@@ -202,8 +205,7 @@ jobs:
202
205
- uses : actions/checkout@v4
203
206
with :
204
207
fetch-depth : 0
205
- - run : git fetch --tags --force
206
- name : Force-fetch tags to work around actions/checkout#290
208
+ - uses : ./.github/actions/checkout
207
209
208
210
# Download all artifacts from all platforms in `build`, merge them into
209
211
# final wasi-sdk-* artifacts, and then upload them.
@@ -263,16 +265,8 @@ jobs:
263
265
- uses : actions/checkout@v4
264
266
with :
265
267
fetch-depth : 0
266
- - run : git fetch --tags --force
267
- name : Force-fetch tags to work around actions/checkout#290
268
- - run : git submodule update --init --depth 64 --jobs 3
269
- - name : Setup `wasmtime` for tests
270
- uses : bytecodealliance/actions/wasmtime/setup@v1
271
- with :
272
- version : " 18.0.2"
273
- - name : Install ninja
274
- run : sudo apt-get install -y ninja-build
275
- if : runner.os == 'Linux'
268
+ - uses : ./.github/actions/checkout
269
+ - uses : ./.github/actions/install-deps
276
270
- uses : actions/download-artifact@v4
277
271
with :
278
272
name : dist-x86_64-linux
0 commit comments