14 name: ${{ matrix.config.name }}
15 runs-on: ${{ matrix.config.os }}
17 COMPILER: ${{ matrix.config.compiler }}
18 COMP: ${{ matrix.config.comp }}
24 name: "Ubuntu 20.04 GCC",
28 run_expensive_tests: true,
29 run_32bit_tests: true,
30 run_64bit_tests: true,
34 name: "Ubuntu 20.04 Clang",
38 run_expensive_tests: false,
39 run_32bit_tests: true,
40 run_64bit_tests: true,
44 name: "MacOS 10.15 Apple Clang",
48 run_expensive_tests: false,
49 run_32bit_tests: false,
50 run_64bit_tests: true,
54 name: "MacOS 10.15 GCC 10",
58 run_expensive_tests: false,
59 run_32bit_tests: false,
60 run_64bit_tests: true,
64 name: "Windows 2022 Mingw-w64 GCC x86_64",
68 run_expensive_tests: false,
69 run_32bit_tests: false,
70 run_64bit_tests: true,
76 name: "Windows 2022 Mingw-w64 GCC i686",
80 run_expensive_tests: false,
81 run_32bit_tests: true,
82 run_64bit_tests: false,
88 name: "Windows 2022 Mingw-w64 Clang x86_64",
92 run_expensive_tests: false,
93 run_32bit_tests: false,
94 run_64bit_tests: true,
96 msys_env: 'clang-x86_64',
102 working-directory: src
103 shell: ${{ matrix.config.shell }}
105 - uses: actions/checkout@v2
109 - name: Download required linux packages
110 if: runner.os == 'Linux'
113 sudo apt install expect valgrind g++-multilib
115 - name: Setup msys and install required packages
116 if: runner.os == 'Windows'
117 uses: msys2/setup-msys2@v2
119 msystem: ${{matrix.config.msys_sys}}
120 install: mingw-w64-${{matrix.config.msys_env}}-${{matrix.config.comp}} make git expect
122 - name: Download the used network from the fishtest framework
126 - name: Extract the bench number from the commit history
128 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
129 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
131 - name: Check compiler
135 - name: Test help target
141 - name: Test debug x86-32 build
142 if: ${{ matrix.config.run_32bit_tests }}
144 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
146 make -j2 ARCH=x86-32 optimize=no debug=yes build
147 ../tests/signature.sh $benchref
149 - name: Test x86-32 build
150 if: ${{ matrix.config.run_32bit_tests }}
153 make -j2 ARCH=x86-32 build
154 ../tests/signature.sh $benchref
156 - name: Test x86-32-sse41-popcnt build
157 if: ${{ matrix.config.run_32bit_tests }}
160 make -j2 ARCH=x86-32-sse41-popcnt build
161 ../tests/signature.sh $benchref
163 - name: Test x86-32-sse2 build
164 if: ${{ matrix.config.run_32bit_tests }}
167 make -j2 ARCH=x86-32-sse2 build
168 ../tests/signature.sh $benchref
170 - name: Test general-32 build
171 if: ${{ matrix.config.run_32bit_tests }}
174 make -j2 ARCH=general-32 build
175 ../tests/signature.sh $benchref
179 - name: Test debug x86-64-modern build
180 if: ${{ matrix.config.run_64bit_tests }}
182 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
184 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
185 ../tests/signature.sh $benchref
187 - name: Test x86-64-modern build
188 if: ${{ matrix.config.run_64bit_tests }}
191 make -j2 ARCH=x86-64-modern build
192 ../tests/signature.sh $benchref
194 - name: Test x86-64-ssse3 build
195 if: ${{ matrix.config.run_64bit_tests }}
198 make -j2 ARCH=x86-64-ssse3 build
199 ../tests/signature.sh $benchref
201 - name: Test x86-64-sse3-popcnt build
202 if: ${{ matrix.config.run_64bit_tests }}
205 make -j2 ARCH=x86-64-sse3-popcnt build
206 ../tests/signature.sh $benchref
208 - name: Test x86-64 build
209 if: ${{ matrix.config.run_64bit_tests }}
212 make -j2 ARCH=x86-64 build
213 ../tests/signature.sh $benchref
215 - name: Test general-64 build
216 if: matrix.config.run_64bit_tests
219 make -j2 ARCH=general-64 build
220 ../tests/signature.sh $benchref
222 # x86-64 with newer extensions tests
224 - name: Compile x86-64-avx2 build
225 if: ${{ matrix.config.run_64bit_tests }}
228 make -j2 ARCH=x86-64-avx2 build
230 - name: Compile x86-64-bmi2 build
231 if: ${{ matrix.config.run_64bit_tests }}
234 make -j2 ARCH=x86-64-bmi2 build
236 - name: Compile x86-64-avx512 build
237 if: ${{ matrix.config.run_64bit_tests }}
240 make -j2 ARCH=x86-64-avx512 build
242 - name: Compile x86-64-vnni512 build
243 if: ${{ matrix.config.run_64bit_tests }}
246 make -j2 ARCH=x86-64-vnni512 build
248 - name: Compile x86-64-vnni256 build
249 if: ${{ matrix.config.run_64bit_tests }}
252 make -j2 ARCH=x86-64-vnni256 build
256 - name: Check perft and search reproducibility
257 if: ${{ matrix.config.run_64bit_tests }}
260 make -j2 ARCH=x86-64-modern build
262 ../tests/reprosearch.sh
266 - name: Run under valgrind
267 if: ${{ matrix.config.run_expensive_tests }}
269 export CXXFLAGS="-O1 -fno-inline"
271 make -j2 ARCH=x86-64-modern debug=yes optimize=no build > /dev/null
272 ../tests/instrumented.sh --valgrind
273 ../tests/instrumented.sh --valgrind-thread
275 - name: Run with UB sanitizer
276 if: ${{ matrix.config.run_expensive_tests }}
278 export CXXFLAGS="-O1 -fno-inline"
280 make -j2 ARCH=x86-64-modern sanitize=undefined optimize=no debug=yes build > /dev/null
281 ../tests/instrumented.sh --sanitizer-undefined
283 - name: Run with thread sanitizer
284 if: ${{ matrix.config.run_expensive_tests }}
286 export CXXFLAGS="-O1 -fno-inline"
288 make -j2 ARCH=x86-64-modern sanitize=thread optimize=no debug=yes build > /dev/null
289 ../tests/instrumented.sh --sanitizer-thread