@@ -113,280 +113,3 @@ jobs:
113113 - name : test
114114 run : python check.py --binaryen-bin=out/bin
115115
116- build-clang :
117- name : clang (LTO)
118- runs-on : ubuntu-latest
119- steps :
120- - uses : actions/setup-python@v5
121- with :
122- python-version : ' 3.x'
123- - uses : actions/checkout@v4
124- with :
125- submodules : true
126- - name : install ninja
127- run : sudo apt-get install ninja-build
128- - name : install Python dev dependencies
129- run : pip3 install -r requirements-dev.txt
130- - name : cmake
131- run : |
132- mkdir -p out
133- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBYN_ENABLE_LTO=ON
134- - name : build
135- run : cmake --build out -v
136- - name : test binaryen-lit
137- run : python out/bin/binaryen-lit -vv test/lit/parse-error.wast
138- - name : test
139- run : python check.py --binaryen-bin=out/bin
140-
141- # TODO(sbc): Find a way to reduce the duplicate between these sanitizer jobs
142- build-asan :
143- name : asan
144- runs-on : ubuntu-latest
145- env :
146- ASAN_OPTIONS : " symbolize=1"
147- COMPILER_FLAGS : " -fsanitize=address"
148- CC : " clang-18"
149- CXX : " clang++-18"
150- steps :
151- - uses : actions/setup-python@v5
152- with :
153- python-version : ' 3.x'
154- - uses : actions/checkout@v4
155- with :
156- submodules : true
157- - name : install clang 18
158- run : |
159- wget https://apt.llvm.org/llvm.sh
160- chmod +x llvm.sh
161- sudo ./llvm.sh 18
162- - name : install ninja
163- run : sudo apt-get install ninja-build
164- - name : install Python dev dependencies
165- run : pip3 install -r requirements-dev.txt
166- - name : cmake
167- run : |
168- mkdir -p out
169- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS"
170- - name : build
171- run : cmake --build out
172- - name : test
173- run : python check.py --binaryen-bin=out/bin
174-
175- # Build with gcc 6.3 and run tests on Alpine Linux (inside chroot).
176- # Note: Alpine uses musl libc.
177- # Keep in sync with build_release.yml
178- build-alpine :
179- name : alpine
180- runs-on : ubuntu-latest
181- steps :
182- - uses : actions/setup-python@v5
183- with :
184- python-version : ' 3.x'
185- - uses : actions/checkout@v4
186- with :
187- submodules : true
188- - name : start docker
189- run : |
190- docker run -w /src -dit --name alpine -v $PWD:/src node:lts-alpine
191- echo 'docker exec alpine "$@";' > ./alpine.sh
192- chmod +x ./alpine.sh
193-
194- - name : install packages
195- run : |
196- ./alpine.sh apk update
197- ./alpine.sh apk add build-base cmake git python3 py3-pip clang ninja
198-
199- - name : install python dev dependencies
200- run : ./alpine.sh pip3 install --break-system-packages -r requirements-dev.txt
201-
202- - name : cmake
203- run : |
204- ./alpine.sh cmake . -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_CXX_FLAGS="-static" -DCMAKE_C_FLAGS="-static" -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIB=ON -DCMAKE_INSTALL_PREFIX=install
205-
206- - name : build
207- run : |
208- ./alpine.sh ninja install
209-
210- - name : test
211- run : ./alpine.sh python3 ./check.py
212-
213- # Duplicates build-asan. Please keep in sync
214- build-ubsan :
215- name : ubsan
216- runs-on : ubuntu-latest
217- env :
218- COMPILER_FLAGS : " -fsanitize=undefined -fno-sanitize-recover=all"
219- CC : " clang"
220- CXX : " clang++"
221- steps :
222- - uses : actions/setup-python@v5
223- with :
224- python-version : ' 3.x'
225- - uses : actions/checkout@v4
226- with :
227- submodules : true
228- - name : install ninja
229- run : sudo apt-get install ninja-build
230- - name : install Python dev dependencies
231- run : pip3 install -r requirements-dev.txt
232- - name : cmake
233- run : |
234- mkdir -p out
235- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS -fsanitize-blacklist=$PWD/ubsan.blacklist"
236- - name : build
237- run : cmake --build out
238- - name : test
239- run : python check.py --binaryen-bin=out/bin
240-
241- # Duplicates build-asan. Please keep in sync
242- build-tsan :
243- name : tsan
244- runs-on : ubuntu-latest
245- env :
246- COMPILER_FLAGS : " -fsanitize=thread"
247- LINKER_FLAGS : " -fsanitize=thread"
248- CC : " clang-18"
249- CXX : " clang++-18"
250- steps :
251- - uses : actions/setup-python@v5
252- with :
253- python-version : ' 3.x'
254- - uses : actions/checkout@v4
255- with :
256- submodules : true
257- - name : install clang 18
258- run : |
259- wget https://apt.llvm.org/llvm.sh
260- chmod +x llvm.sh
261- sudo ./llvm.sh 18
262- - name : install ninja
263- run : sudo apt-get install ninja-build
264- - name : install Python dev dependencies
265- run : pip3 install -r requirements-dev.txt
266- - name : cmake
267- run : |
268- mkdir -p out
269- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LINKER_FLAGS"
270- - name : build
271- run : cmake --build out
272- - name : test
273- run : python check.py --binaryen-bin=out/bin
274-
275- # Build the .js outputs using emcc
276- build-emscripten :
277- name : emscripten
278- runs-on : ubuntu-latest
279- env :
280- # Set this environment variable to test a specific Emscripten branch.
281- # Format: https://github.com/<fork>/emscripten/tree/<refspec>
282- EMSCRIPTEN_REPO : " "
283- steps :
284- - uses : actions/setup-python@v5
285- with :
286- python-version : ' 3.x'
287- - uses : actions/checkout@v4
288- with :
289- submodules : true
290- - name : install ninja
291- run : sudo apt-get install ninja-build
292- - name : emsdk install
293- run : |
294- mkdir $HOME/emsdk
295- git clone --depth 1 https://github.com/emscripten-core/emsdk.git $HOME/emsdk
296- $HOME/emsdk/emsdk update-tags
297- $HOME/emsdk/emsdk install tot
298- $HOME/emsdk/emsdk activate tot
299- - name : override emscripten repository
300- if : ${{ env.EMSCRIPTEN_REPO != '' }}
301- run : |
302- $HOME/emsdk/emsdk install emscripten-main-64bit \
303- --override-repository emscripten-main-64bit@$EMSCRIPTEN_REPO
304- $HOME/emsdk/emsdk activate emscripten-main-64bit
305- - name : update path
306- run : echo "PATH=$PATH:$HOME/emsdk" >> $GITHUB_ENV
307- - name : emcc-tests
308- run : |
309- source $HOME/emsdk/emsdk_env.sh
310- ./scripts/emcc-tests.sh
311-
312- # Windows + gcc needs work before the tests will run, so just test the compile
313- build-mingw :
314- name : mingw
315- runs-on : windows-latest
316- steps :
317- - uses : actions/setup-python@v5
318- with :
319- python-version : ' 3.x'
320- - uses : actions/checkout@v4
321- with :
322- submodules : true
323- - name : cmake
324- run : |
325- mkdir -p out
326- cmake -S . -B out -G "MSYS Makefiles"
327- - name : build
328- run : cmake --build out
329-
330- # Duplicates build-asan. Please keep in sync
331- build-gcov :
332- name : coverage
333- runs-on : ubuntu-latest
334- env :
335- COMPILER_FLAGS : " -fprofile-arcs -ftest-coverage"
336- CC : " gcc"
337- CXX : " g++"
338- steps :
339- - uses : actions/setup-python@v5
340- with :
341- python-version : ' 3.x'
342- - uses : actions/checkout@v4
343- with :
344- submodules : true
345- - name : install ninja
346- run : sudo apt-get install ninja-build
347- - name : install Python dev dependencies
348- run : pip3 install -r requirements-dev.txt
349- - name : cmake
350- run : |
351- mkdir -p out
352- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_C_FLAGS="$COMPILER_FLAGS" -DCMAKE_CXX_FLAGS="$COMPILER_FLAGS -DCMAKE_BUILD_TYPE=Debug"
353- - name : build
354- run : cmake --build out
355- - name : test
356- run : |
357- python check.py --binaryen-bin=out/bin lit
358- python check.py --binaryen-bin=out/bin gtest
359- - name : upload coverage
360- uses : codecov/codecov-action@v3
361- with :
362- gcov : true
363-
364- # Duplicates build-asan. Please keep in sync
365- build-cxx20 :
366- name : c++20
367- # Make sure we can still build on older Ubuntu
368- runs-on : ubuntu-20.04
369- env :
370- CC : " gcc"
371- CXX : " g++"
372- steps :
373- - uses : actions/setup-python@v5
374- with :
375- python-version : ' 3.x'
376- - uses : actions/checkout@v4
377- with :
378- submodules : true
379- - name : install ninja
380- run : sudo apt-get install ninja-build
381- - name : install Python dev dependencies
382- run : pip3 install -r requirements-dev.txt
383- - name : cmake
384- run : |
385- mkdir -p out
386- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=20
387- - name : build
388- run : cmake --build out
389- - name : test
390- run : |
391- python check.py --binaryen-bin=out/bin lit
392- python check.py --binaryen-bin=out/bin gtest
0 commit comments