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: "Android NDK aarch64",
36 compiler: aarch64-linux-android21-clang++,
38 run_armv8_tests: true,
42 name: "Android NDK arm",
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
120 - name: Extract the bench number from the commit history
122 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
123 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
125 - name: Check compiler
127 if [ $COMP == ndk ]; then
128 ANDROID_ROOT=/usr/local/lib/android
129 ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
130 SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
131 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
132 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
133 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
137 - name: Test help target
145 - name: Test debug x86-32 build
146 if: ${{ matrix.config.run_32bit_tests }}
148 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
150 make -j2 ARCH=x86-32 optimize=no debug=yes build
151 ../tests/signature.sh $benchref
153 - name: Test x86-32 build
154 if: ${{ matrix.config.run_32bit_tests }}
157 make -j2 ARCH=x86-32 build
158 ../tests/signature.sh $benchref
160 - name: Test x86-32-sse41-popcnt build
161 if: ${{ matrix.config.run_32bit_tests }}
164 make -j2 ARCH=x86-32-sse41-popcnt build
165 ../tests/signature.sh $benchref
167 - name: Test x86-32-sse2 build
168 if: ${{ matrix.config.run_32bit_tests }}
171 make -j2 ARCH=x86-32-sse2 build
172 ../tests/signature.sh $benchref
174 - name: Test general-32 build
175 if: ${{ matrix.config.run_32bit_tests }}
178 make -j2 ARCH=general-32 build
179 ../tests/signature.sh $benchref
183 - name: Test debug x86-64-modern build
184 if: ${{ matrix.config.run_64bit_tests }}
186 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
188 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
189 ../tests/signature.sh $benchref
191 - name: Test x86-64-modern build
192 if: ${{ matrix.config.run_64bit_tests }}
195 make -j2 ARCH=x86-64-modern build
196 ../tests/signature.sh $benchref
198 - name: Test x86-64-ssse3 build
199 if: ${{ matrix.config.run_64bit_tests }}
202 make -j2 ARCH=x86-64-ssse3 build
203 ../tests/signature.sh $benchref
205 - name: Test x86-64-sse3-popcnt build
206 if: ${{ matrix.config.run_64bit_tests }}
209 make -j2 ARCH=x86-64-sse3-popcnt build
210 ../tests/signature.sh $benchref
212 - name: Test x86-64 build
213 if: ${{ matrix.config.run_64bit_tests }}
216 make -j2 ARCH=x86-64 build
217 ../tests/signature.sh $benchref
219 - name: Test general-64 build
220 if: matrix.config.run_64bit_tests
223 make -j2 ARCH=general-64 build
224 ../tests/signature.sh $benchref
228 - name: Test armv8 build
229 if: ${{ matrix.config.run_armv8_tests }}
231 ANDROID_ROOT=/usr/local/lib/android
232 ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
233 SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
234 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
235 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
236 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
237 export LDFLAGS="-static -Wno-unused-command-line-argument"
239 make -j2 ARCH=armv8 build
240 ../tests/signature.sh $benchref
244 - name: Test armv7 build
245 if: ${{ matrix.config.run_armv7_tests }}
247 ANDROID_ROOT=/usr/local/lib/android
248 ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
249 SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
250 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
251 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
252 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
253 export LDFLAGS="-static -Wno-unused-command-line-argument"
255 make -j2 ARCH=armv7 build
256 ../tests/signature.sh $benchref
258 - name: Test armv7-neon build
259 if: ${{ matrix.config.run_armv7_tests }}
261 ANDROID_ROOT=/usr/local/lib/android
262 ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
263 SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
264 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
265 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/21.4.7075529
266 export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
267 export LDFLAGS="-static -Wno-unused-command-line-argument"
269 make -j2 ARCH=armv7-neon build
270 ../tests/signature.sh $benchref
274 - name: Check perft and search reproducibility
275 if: ${{ matrix.config.run_64bit_tests }}
278 make -j2 ARCH=x86-64-modern build
280 ../tests/reprosearch.sh