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 2019 Mingw-w64 GCC x86_64",
68 run_expensive_tests: false,
69 run_32bit_tests: false,
70 run_64bit_tests: true,
76 name: "Windows 2019 Mingw-w64 GCC i686",
80 run_expensive_tests: false,
81 run_32bit_tests: true,
82 run_64bit_tests: false,
90 working-directory: src
91 shell: ${{ matrix.config.shell }}
93 - uses: actions/checkout@v2
97 - name: Download required linux packages
98 if: runner.os == 'Linux'
101 sudo apt install expect valgrind g++-multilib
103 - name: Setup msys and install required packages
104 if: runner.os == 'Windows'
105 uses: msys2/setup-msys2@v2
107 msystem: ${{matrix.config.msys_sys}}
108 install: mingw-w64-${{matrix.config.msys_env}}-gcc make git expect
110 - name: Download the used network from the fishtest framework
114 - name: Extract the bench number from the commit history
116 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
117 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
119 - name: Check compiler
123 - name: Test help target
129 - name: Test debug x86-32 build
130 if: ${{ matrix.config.run_32bit_tests }}
132 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
134 make -j2 ARCH=x86-32 optimize=no debug=yes build
135 ../tests/signature.sh $benchref
137 - name: Test x86-32 build
138 if: ${{ matrix.config.run_32bit_tests }}
141 make -j2 ARCH=x86-32 build
142 ../tests/signature.sh $benchref
144 - name: Test x86-32-sse41-popcnt build
145 if: ${{ matrix.config.run_32bit_tests }}
148 make -j2 ARCH=x86-32-sse41-popcnt build
149 ../tests/signature.sh $benchref
151 - name: Test x86-32-sse2 build
152 if: ${{ matrix.config.run_32bit_tests }}
155 make -j2 ARCH=x86-32-sse2 build
156 ../tests/signature.sh $benchref
158 - name: Test general-32 build
159 if: ${{ matrix.config.run_32bit_tests }}
162 make -j2 ARCH=general-32 build
163 ../tests/signature.sh $benchref
167 - name: Test debug x86-64-modern build
168 if: ${{ matrix.config.run_64bit_tests }}
170 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
172 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
173 ../tests/signature.sh $benchref
175 - name: Test x86-64-modern build
176 if: ${{ matrix.config.run_64bit_tests }}
179 make -j2 ARCH=x86-64-modern build
180 ../tests/signature.sh $benchref
182 - name: Test x86-64-ssse3 build
183 if: ${{ matrix.config.run_64bit_tests }}
186 make -j2 ARCH=x86-64-ssse3 build
187 ../tests/signature.sh $benchref
189 - name: Test x86-64-sse3-popcnt build
190 if: ${{ matrix.config.run_64bit_tests }}
193 make -j2 ARCH=x86-64-sse3-popcnt build
194 ../tests/signature.sh $benchref
196 - name: Test x86-64 build
197 if: ${{ matrix.config.run_64bit_tests }}
200 make -j2 ARCH=x86-64 build
201 ../tests/signature.sh $benchref
203 - name: Test general-64 build
204 if: matrix.config.run_64bit_tests
207 make -j2 ARCH=general-64 build
208 ../tests/signature.sh $benchref
210 # x86-64 with newer extensions tests
212 - name: Compile x86-64-avx2 build
213 if: ${{ matrix.config.run_64bit_tests }}
216 make -j2 ARCH=x86-64-avx2 build
218 - name: Compile x86-64-bmi2 build
219 if: ${{ matrix.config.run_64bit_tests }}
222 make -j2 ARCH=x86-64-bmi2 build
224 - name: Compile x86-64-avx512 build
225 if: ${{ matrix.config.run_64bit_tests }}
228 make -j2 ARCH=x86-64-avx512 build
230 - name: Compile x86-64-vnni512 build
231 if: ${{ matrix.config.run_64bit_tests }}
234 make -j2 ARCH=x86-64-vnni512 build
236 - name: Compile x86-64-vnni256 build
237 if: ${{ matrix.config.run_64bit_tests }}
240 make -j2 ARCH=x86-64-vnni256 build
244 - name: Check perft and search reproducibility
245 if: ${{ matrix.config.run_64bit_tests }}
248 make -j2 ARCH=x86-64-modern build
250 ../tests/reprosearch.sh
254 - name: Run under valgrind
255 if: ${{ matrix.config.run_expensive_tests }}
257 export CXXFLAGS="-O1 -fno-inline"
259 make -j2 ARCH=x86-64-modern debug=yes optimize=no build > /dev/null
260 ../tests/instrumented.sh --valgrind
261 ../tests/instrumented.sh --valgrind-thread
263 - name: Run with UB sanitizer
264 if: ${{ matrix.config.run_expensive_tests }}
266 export CXXFLAGS="-O1 -fno-inline"
268 make -j2 ARCH=x86-64-modern sanitize=undefined optimize=no debug=yes build > /dev/null
269 ../tests/instrumented.sh --sanitizer-undefined
271 - name: Run with thread sanitizer
272 if: ${{ matrix.config.run_expensive_tests }}
274 export CXXFLAGS="-O1 -fno-inline"
276 make -j2 ARCH=x86-64-modern sanitize=thread optimize=no debug=yes build > /dev/null
277 ../tests/instrumented.sh --sanitizer-thread