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: false,
42 name: "Ubuntu 20.04 NDK armv7",
44 compiler: armv7a-linux-androideabi21-clang++,
46 run_armv7_tests: false,
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',
98 name: "Ubuntu 20.04 NDK armv7"
102 name: "Ubuntu 20.04 NDK armv8"
106 working-directory: src
107 shell: ${{ matrix.config.shell }}
109 - uses: actions/checkout@v3
113 - name: Download required linux packages
114 if: runner.os == 'Linux'
117 sudo apt install expect valgrind g++-multilib qemu-user
119 - name: Setup msys and install required packages
120 if: runner.os == 'Windows'
121 uses: msys2/setup-msys2@v2
123 msystem: ${{matrix.config.msys_sys}}
124 install: mingw-w64-${{matrix.config.msys_env}} make git expect
126 - name: Download the used network from the fishtest framework
130 - name: Extract the bench number from the commit history
132 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
133 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
135 - name: Check compiler
137 export PATH=$PATH:$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin
140 - name: Test help target
146 - name: Test debug x86-32 build
147 if: ${{ matrix.config.run_32bit_tests }}
149 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
151 make -j2 ARCH=x86-32 optimize=no debug=yes build
152 ../tests/signature.sh $benchref
154 - name: Test x86-32 build
155 if: ${{ matrix.config.run_32bit_tests }}
158 make -j2 ARCH=x86-32 build
159 ../tests/signature.sh $benchref
161 - name: Test x86-32-sse41-popcnt build
162 if: ${{ matrix.config.run_32bit_tests }}
165 make -j2 ARCH=x86-32-sse41-popcnt build
166 ../tests/signature.sh $benchref
168 - name: Test x86-32-sse2 build
169 if: ${{ matrix.config.run_32bit_tests }}
172 make -j2 ARCH=x86-32-sse2 build
173 ../tests/signature.sh $benchref
175 - name: Test general-32 build
176 if: ${{ matrix.config.run_32bit_tests }}
179 make -j2 ARCH=general-32 build
180 ../tests/signature.sh $benchref
184 - name: Test debug x86-64-modern build
185 if: ${{ matrix.config.run_64bit_tests }}
187 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
189 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
190 ../tests/signature.sh $benchref
192 - name: Test x86-64-modern build
193 if: ${{ matrix.config.run_64bit_tests }}
196 make -j2 ARCH=x86-64-modern build
197 ../tests/signature.sh $benchref
199 - name: Test x86-64-ssse3 build
200 if: ${{ matrix.config.run_64bit_tests }}
203 make -j2 ARCH=x86-64-ssse3 build
204 ../tests/signature.sh $benchref
206 - name: Test x86-64-sse3-popcnt build
207 if: ${{ matrix.config.run_64bit_tests }}
210 make -j2 ARCH=x86-64-sse3-popcnt build
211 ../tests/signature.sh $benchref
213 - name: Test x86-64 build
214 if: ${{ matrix.config.run_64bit_tests }}
217 make -j2 ARCH=x86-64 build
218 ../tests/signature.sh $benchref
220 - name: Test general-64 build
221 if: matrix.config.run_64bit_tests
224 make -j2 ARCH=general-64 build
225 ../tests/signature.sh $benchref
229 - name: Test armv8 build
230 if: ${{ matrix.config.run_armv8_tests }}
232 ANDROID_ROOT=/usr/local/lib/android
233 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
234 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
235 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
236 ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
237 ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
238 export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
239 export LDFLAGS="-static -Wno-unused-command-line-argument"
241 make -j2 ARCH=armv8 build
242 ../tests/signature.sh $benchref
246 - name: Test armv7 build
247 if: ${{ matrix.config.run_armv7_tests }}
249 ANDROID_ROOT=/usr/local/lib/android
250 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
251 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
252 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
253 ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
254 ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
255 export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
256 export LDFLAGS="-static -Wno-unused-command-line-argument"
258 make -j2 ARCH=armv7 build
259 ../tests/signature.sh $benchref
261 - name: Test armv7-neon build
262 if: ${{ matrix.config.run_armv7_tests }}
264 ANDROID_ROOT=/usr/local/lib/android
265 ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
266 SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
267 echo "y" | $SDKMANAGER "ndk;21.4.7075529"
268 ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
269 ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
270 export PATH=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
271 export LDFLAGS="-static -Wno-unused-command-line-argument"
273 make -j2 ARCH=armv7-neon build
274 ../tests/signature.sh $benchref
278 - name: Check perft and search reproducibility
279 if: ${{ matrix.config.run_64bit_tests }}
282 make -j2 ARCH=x86-64-modern build
284 ../tests/reprosearch.sh