@@ -15,210 +15,6 @@ concurrency:
1515
1616jobs :
1717
18- lint :
19- name : lint
20- if : ${{ github.event_name == 'pull_request' }}
21- runs-on : ubuntu-latest
22- env :
23- # Keep this in sync with clang-format-diff.sh
24- LLVM_VERSION : 21
25- steps :
26- - uses : actions/setup-python@v5
27- with :
28- python-version : ' 3.x'
29- - uses : actions/checkout@v4
30- with :
31- submodules : true
32- fetch-depth : 0
33- - name : install tools
34- run : |
35- pip3 install -r requirements-dev.txt
36- sudo apt install lsb-release wget software-properties-common gnupg
37- wget https://apt.llvm.org/llvm.sh
38- sudo chmod +x llvm.sh
39- sudo ./llvm.sh ${LLVM_VERSION}
40- sudo apt-get install clang-format clang-format-${LLVM_VERSION} clang-tidy-${LLVM_VERSION}
41- - run : flake8
42- - run : ruff check
43- - run : ./scripts/clang-format-diff.sh
44- - name : clang-tidy
45- run : |
46- # clang-tidy requires compile_commands.json generated by cmake
47- cmake . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
48- ./scripts/clang-tidy-diff.sh
49-
50- build :
51- name : build
52- runs-on : ${{ matrix.os }}
53- strategy :
54- matrix :
55- # Test on the oldest support Ubuntu version in addition to `latest`.
56- os : [ubuntu-22.04, ubuntu-latest, macos-latest, windows-latest, windows-11-arm]
57- steps :
58- - uses : actions/setup-python@v5
59- with :
60- python-version : ' 3.x'
61- - uses : actions/checkout@v4
62- with :
63- submodules : true
64-
65- - name : install Python dev dependencies
66- run : pip3 install -r requirements-dev.txt
67-
68- - name : gen-s-parser
69- run : ./scripts/gen-s-parser.py | diff src/gen-s-parser.inc -
70- if : startsWith(matrix.os, 'ubuntu')
71-
72- - name : install ninja (linux)
73- run : sudo apt-get install ninja-build
74- if : startsWith(matrix.os, 'ubuntu')
75-
76- - name : install ninja (macos)
77- run : brew install ninja
78- if : matrix.os == 'macos-latest'
79-
80- - name : install ninja (win)
81- run : choco install ninja
82- if : startsWith(matrix.os, 'windows')
83-
84- - name : install v8
85- run : |
86- npm install jsvu -g
87- jsvu --os=default --engines=v8
88-
89- - name : mkdir
90- run : mkdir -p out
91-
92- - name : cmake (linux)
93- run : cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out/install
94- if : startsWith(matrix.os, 'ubuntu')
95-
96- - name : cmake (macos)
97- run : cmake -S . -B out -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=out/install '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'
98- if : matrix.os == 'macos-latest'
99-
100- - name : cmake (win)
101- # -G "Visual Studio 15 2017"
102- run : cmake -S . -B out -DCMAKE_INSTALL_PREFIX=out/install
103- if : startsWith(matrix.os, 'windows')
104-
105- - name : build
106- run : cmake --build out --config Release -v
107-
108- - name : install
109- run : cmake --install out --config Release
110-
111- - name : strip
112- run : find out/install/ -type f -perm -u=x -exec strip -x {} +
113- if : ${{ !startsWith(matrix.os, 'windows') }}
114-
115- - name : Upload artifacts
116- uses : actions/upload-artifact@v4
117- with :
118- name : build-${{ matrix.os }}
119- path : out/install
120-
121- - name : test binaryen-lit
122- run : python out/bin/binaryen-lit -vv test/lit/parse-error.wast
123-
124- - name : test
125- run : python check.py --binaryen-bin=out/bin
126-
127- build-clang :
128- name : clang (LTO)
129- runs-on : ubuntu-latest
130- steps :
131- - uses : actions/setup-python@v5
132- with :
133- python-version : ' 3.x'
134- - uses : actions/checkout@v4
135- with :
136- submodules : true
137- - name : install ninja
138- run : sudo apt-get install ninja-build
139- - name : install v8
140- run : |
141- npm install jsvu -g
142- jsvu --os=default --engines=v8
143- - name : install Python dev dependencies
144- run : pip3 install -r requirements-dev.txt
145- - name : cmake
146- run : |
147- mkdir -p out
148- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBYN_ENABLE_LTO=ON
149- - name : build
150- run : cmake --build out -v
151- - name : test binaryen-lit
152- run : python out/bin/binaryen-lit -vv test/lit/parse-error.wast
153- - name : test
154- run : python check.py --binaryen-bin=out/bin
155-
156- # Copied and modified from build-clang
157- build-fuzztest :
158- name : clang with fuzztest
159- runs-on : ubuntu-latest
160- steps :
161- - uses : actions/setup-python@v5
162- with :
163- python-version : ' 3.x'
164- - uses : actions/checkout@v4
165- with :
166- submodules : true
167- - name : install ninja
168- run : sudo apt-get install ninja-build
169- - name : install v8
170- run : |
171- npm install jsvu -g
172- jsvu --os=default --engines=v8
173- - name : install Python dev dependencies
174- run : pip3 install -r requirements-dev.txt
175- - name : cmake
176- run : |
177- mkdir -p out
178- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_FUZZTEST=ON
179- - name : build
180- run : cmake --build out -v
181- - name : test
182- run : python check.py --binaryen-bin=out/bin
183-
184- # TODO(sbc): Find a way to reduce the duplicate between these sanitizer jobs
185- build-asan :
186- name : asan
187- runs-on : ubuntu-latest
188- env :
189- ASAN_OPTIONS : " symbolize=1"
190- COMPILER_FLAGS : " -fsanitize=address"
191- CC : " clang-18"
192- CXX : " clang++-18"
193- steps :
194- - uses : actions/setup-python@v5
195- with :
196- python-version : ' 3.x'
197- - uses : actions/checkout@v4
198- with :
199- submodules : true
200- - name : install clang 18
201- run : |
202- wget https://apt.llvm.org/llvm.sh
203- chmod +x llvm.sh
204- sudo ./llvm.sh 18
205- - name : install ninja
206- run : sudo apt-get install ninja-build
207- - name : install v8
208- run : |
209- npm install jsvu -g
210- jsvu --os=default --engines=v8
211- - name : install Python dev dependencies
212- run : pip3 install -r requirements-dev.txt
213- - name : cmake
214- run : |
215- mkdir -p out
216- 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"
217- - name : build
218- run : cmake --build out
219- - name : test
220- run : python check.py --binaryen-bin=out/bin
221-
22218 # Run tests on Alpine Linux, which we use to make our release builds.
22319 # Note: Alpine uses musl libc.
22420 # Keep in sync with build_release.yml. The only difference is that here we
@@ -267,149 +63,5 @@ jobs:
26763 ./alpine.sh ninja install
26864
26965 - name : test
270- run : ./alpine.sh python3 ./check.py
271-
272- # Duplicates build-asan. Please keep in sync
273- build-ubsan :
274- name : ubsan
275- runs-on : ubuntu-latest
276- env :
277- COMPILER_FLAGS : " -fsanitize=undefined -fno-sanitize-recover=all"
278- CC : " clang"
279- CXX : " clang++"
280- steps :
281- - uses : actions/setup-python@v5
282- with :
283- python-version : ' 3.x'
284- - uses : actions/checkout@v4
285- with :
286- submodules : true
287- - name : install ninja
288- run : sudo apt-get install ninja-build
289- - name : install v8
290- run : |
291- npm install jsvu -g
292- jsvu --os=default --engines=v8
293- - name : install Python dev dependencies
294- run : pip3 install -r requirements-dev.txt
295- - name : cmake
296- run : |
297- mkdir -p out
298- 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"
299- - name : build
300- run : cmake --build out
301- - name : test
302- run : python check.py --binaryen-bin=out/bin
303-
304- # Duplicates build-asan. Please keep in sync
305- build-tsan :
306- name : tsan
307- runs-on : ubuntu-latest
308- env :
309- COMPILER_FLAGS : " -fsanitize=thread"
310- LINKER_FLAGS : " -fsanitize=thread"
311- CC : " clang-18"
312- CXX : " clang++-18"
313- steps :
314- - uses : actions/setup-python@v5
315- with :
316- python-version : ' 3.x'
317- - uses : actions/checkout@v4
318- with :
319- submodules : true
320- - name : install clang 18
321- run : |
322- wget https://apt.llvm.org/llvm.sh
323- chmod +x llvm.sh
324- sudo ./llvm.sh 18
325- - name : install ninja
326- run : sudo apt-get install ninja-build
327- - name : install v8
328- run : |
329- npm install jsvu -g
330- jsvu --os=default --engines=v8
331- - name : install Python dev dependencies
332- run : pip3 install -r requirements-dev.txt
333- - name : cmake
334- run : |
335- mkdir -p out
336- 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"
337- - name : build
338- run : cmake --build out
339- - name : test
340- run : python check.py --binaryen-bin=out/bin
341-
342- # Build the .js outputs using emcc
343- build-emscripten :
344- name : emscripten
345- runs-on : ubuntu-latest
346- env :
347- # Set this environment variable to test a specific Emscripten branch.
348- # Format: https://github.com/<fork>/emscripten/tree/<refspec>
349- EMSCRIPTEN_REPO : " "
350- steps :
351- - uses : actions/setup-python@v5
352- with :
353- python-version : ' 3.x'
354- - uses : actions/checkout@v4
355- with :
356- submodules : true
357- - name : install ninja
358- run : sudo apt-get install ninja-build
359- - name : emsdk install
360- run : |
361- mkdir $HOME/emsdk
362- git clone --depth 1 https://github.com/emscripten-core/emsdk.git $HOME/emsdk
363- $HOME/emsdk/emsdk update-tags
364- $HOME/emsdk/emsdk install tot
365- $HOME/emsdk/emsdk activate tot
366- - name : override emscripten repository
367- if : ${{ env.EMSCRIPTEN_REPO != '' }}
368- run : |
369- $HOME/emsdk/emsdk install emscripten-main-64bit \
370- --override-repository emscripten-main-64bit@$EMSCRIPTEN_REPO
371- $HOME/emsdk/emsdk activate emscripten-main-64bit
372- - name : update path
373- run : echo "PATH=$PATH:$HOME/emsdk" >> $GITHUB_ENV
374- - name : emcc-tests
375- run : |
376- source $HOME/emsdk/emsdk_env.sh
377- ./scripts/emcc-tests.sh
66+ run : ./alpine.sh python3 ./check.py spec --no-fail-fast
37867
379- # Windows + gcc needs work before the tests will run, so just test the compile
380- build-mingw :
381- name : mingw
382- runs-on : windows-latest
383- steps :
384- - uses : actions/setup-python@v5
385- with :
386- python-version : ' 3.x'
387- - uses : actions/checkout@v4
388- with :
389- submodules : true
390- - name : cmake
391- run : |
392- mkdir -p out
393- cmake -S . -B out -G "MSYS Makefiles"
394- - name : build
395- run : cmake --build out
396-
397- # Ensures we can build in no-asserts mode (just building).
398- build-noasserts :
399- name : noasserts
400- runs-on : ubuntu-latest
401- steps :
402- - uses : actions/setup-python@v5
403- with :
404- python-version : ' 3.x'
405- - uses : actions/checkout@v4
406- with :
407- submodules : true
408- - name : install ninja
409- run : sudo apt-get install ninja-build
410- - name : cmake
411- run : |
412- mkdir -p out
413- cmake -S . -B out -G Ninja -DCMAKE_INSTALL_PREFIX=out/install -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBYN_ENABLE_ASSERTIONS=OFF
414- - name : build
415- run : cmake --build out -v
0 commit comments