6 name: ${{ matrix.config.name }}
7 runs-on: ${{ matrix.config.os }}
9 COMPILER: ${{ matrix.config.compiler }}
10 COMP: ${{ matrix.config.comp }}
16 name: "Ubuntu 20.04 GCC",
20 run_32bit_tests: true,
21 run_64bit_tests: true,
25 name: "Ubuntu 20.04 Clang",
29 run_32bit_tests: true,
30 run_64bit_tests: true,
34 name: "Ubuntu 20.04 NDK armv8",
36 compiler: aarch64-linux-android21-clang++,
38 run_armv8_tests: true,
42 name: "Ubuntu 20.04 NDK armv7",
44 compiler: armv7a-linux-androideabi21-clang++,
46 run_armv7_tests: true,
50 name: "MacOS 12 Apple Clang",
54 run_64bit_tests: true,
58 name: "MacOS 12 GCC 11",
62 run_64bit_tests: true,
66 name: "Windows 2022 Mingw-w64 GCC x86_64",
70 run_64bit_tests: true,
72 msys_env: 'x86_64-gcc',
76 name: "Windows 2022 Mingw-w64 GCC i686",
80 run_32bit_tests: true,
86 name: "Windows 2022 Mingw-w64 Clang x86_64",
90 run_64bit_tests: true,
92 msys_env: 'clang-x86_64-clang',
97 working-directory: src
98 shell: ${{ matrix.config.shell }}
100 - uses: actions/checkout@v3
104 - name: Download required linux packages
105 if: runner.os == 'Linux'
108 sudo apt install expect valgrind g++-multilib qemu-user
110 - name: Setup msys and install required packages
111 if: runner.os == 'Windows'
112 uses: msys2/setup-msys2@v2
114 msystem: ${{ matrix.config.msys_sys }}
115 install: mingw-w64-${{ matrix.config.msys_env }} make git expect
117 - name: Download the used network from the fishtest framework
121 - name: Extract the bench number from the commit history
123 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
124 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
126 - name: Check compiler
128 if [ $COMP == ndk ]; then
129 ANDROID_ROOT=/usr/local/lib/android
130 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
131 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
132 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
133 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
134 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
138 - name: Test help target
144 - name: Test debug x86-32 build
145 if: ${{ matrix.config.run_32bit_tests }}
147 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
149 make -j2 ARCH=x86-32 optimize=no debug=yes build
150 ../tests/signature.sh $benchref
152 - name: Test x86-32 build
153 if: ${{ matrix.config.run_32bit_tests }}
156 make -j2 ARCH=x86-32 build
157 ../tests/signature.sh $benchref
159 - name: Test x86-32-sse41-popcnt build
160 if: ${{ matrix.config.run_32bit_tests }}
163 make -j2 ARCH=x86-32-sse41-popcnt build
164 ../tests/signature.sh $benchref
166 - name: Test x86-32-sse2 build
167 if: ${{ matrix.config.run_32bit_tests }}
170 make -j2 ARCH=x86-32-sse2 build
171 ../tests/signature.sh $benchref
173 - name: Test general-32 build
174 if: ${{ matrix.config.run_32bit_tests }}
177 make -j2 ARCH=general-32 build
178 ../tests/signature.sh $benchref
182 - name: Test debug x86-64-modern build
183 if: ${{ matrix.config.run_64bit_tests }}
185 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
187 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
188 ../tests/signature.sh $benchref
190 - name: Test x86-64-modern build
191 if: ${{ matrix.config.run_64bit_tests }}
194 make -j2 ARCH=x86-64-modern build
195 ../tests/signature.sh $benchref
197 - name: Test x86-64-ssse3 build
198 if: ${{ matrix.config.run_64bit_tests }}
201 make -j2 ARCH=x86-64-ssse3 build
202 ../tests/signature.sh $benchref
204 - name: Test x86-64-sse3-popcnt build
205 if: ${{ matrix.config.run_64bit_tests }}
208 make -j2 ARCH=x86-64-sse3-popcnt build
209 ../tests/signature.sh $benchref
211 - name: Test x86-64 build
212 if: ${{ matrix.config.run_64bit_tests }}
215 make -j2 ARCH=x86-64 build
216 ../tests/signature.sh $benchref
218 - name: Test general-64 build
219 if: matrix.config.run_64bit_tests
222 make -j2 ARCH=general-64 build
223 ../tests/signature.sh $benchref
227 - name: Test armv8 build
228 if: ${{ matrix.config.run_armv8_tests }}
230 ANDROID_ROOT=/usr/local/lib/android
231 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
232 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
233 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
234 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
235 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
236 export LDFLAGS="-static -Wno-unused-command-line-argument"
238 make -j2 ARCH=armv8 build
239 ../tests/signature.sh $benchref
243 - name: Test armv7 build
244 if: ${{ matrix.config.run_armv7_tests }}
246 ANDROID_ROOT=/usr/local/lib/android
247 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
248 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
249 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
250 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
251 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
252 export LDFLAGS="-static -Wno-unused-command-line-argument"
254 make -j2 ARCH=armv7 build
255 ../tests/signature.sh $benchref
257 - name: Test armv7-neon build
258 if: ${{ matrix.config.run_armv7_tests }}
260 ANDROID_ROOT=/usr/local/lib/android
261 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
262 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
263 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
264 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
265 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
266 export LDFLAGS="-static -Wno-unused-command-line-argument"
268 make -j2 ARCH=armv7-neon build
269 ../tests/signature.sh $benchref
273 - name: Check perft and search reproducibility
274 if: ${{ matrix.config.run_64bit_tests }}
277 make -j2 ARCH=x86-64-modern build
279 ../tests/reprosearch.sh