6 name: ${{ matrix.config.name }}
7 runs-on: ${{ matrix.config.os }}
9 COMPILER: ${{ matrix.config.compiler }}
10 COMP: ${{ matrix.config.comp }}
15 - name: Ubuntu 20.04 GCC
22 - name: Ubuntu 20.04 Clang
29 - name: Android NDK aarch64
31 compiler: aarch64-linux-android21-clang++
35 - name: Android NDK arm
37 compiler: armv7a-linux-androideabi21-clang++
41 - name: MacOS 12 Apple Clang
47 - name: MacOS 12 GCC 11
53 - name: Windows 2022 Mingw-w64 GCC x86_64
61 - name: Windows 2022 Mingw-w64 GCC i686
69 - name: Windows 2022 Mingw-w64 Clang x86_64
75 msys_env: clang-x86_64-clang
79 working-directory: src
80 shell: ${{ matrix.config.shell }}
82 - uses: actions/checkout@v3
86 - name: Download required linux packages
87 if: runner.os == 'Linux'
90 sudo apt install expect valgrind g++-multilib qemu-user
93 if: runner.os == 'Linux'
95 if [ $COMP == ndk ]; then
97 ANDROID_ROOT=/usr/local/lib/android
98 ANDROID_SDK_ROOT=$ANDROID_ROOT/sdk
99 SDKMANAGER=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager
100 echo "y" | $SDKMANAGER "ndk;$NDKV"
101 ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/$NDKV
102 ANDROID_NDK_BIN=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin
103 echo "ANDROID_NDK_BIN=$ANDROID_NDK_BIN" >> $GITHUB_ENV
106 - name: Setup msys and install required packages
107 if: runner.os == 'Windows'
108 uses: msys2/setup-msys2@v2
110 msystem: ${{ matrix.config.msys_sys }}
111 install: mingw-w64-${{ matrix.config.msys_env }} make git expect
113 - name: Download the used network from the fishtest framework
116 - name: Extract the bench number from the commit history
118 benchref=$(git log HEAD | grep -m 1 -o -x "[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]\{5,7\}\b[[:space:]]*" | sed "s/[^0-9]//g") || true
119 [[ -n "$benchref" ]] && echo "benchref=$benchref" >> $GITHUB_ENV && echo "Reference bench: $benchref" || echo "No bench found"
121 - name: Check compiler
123 if [ $COMP == ndk ]; then
124 export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
128 - name: Test help target
136 - name: Test debug x86-32 build
137 if: ${{ matrix.config.run_32bit_tests }}
139 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
141 make -j2 ARCH=x86-32 optimize=no debug=yes build
142 ../tests/signature.sh $benchref
144 - name: Test x86-32 build
145 if: ${{ matrix.config.run_32bit_tests }}
148 make -j2 ARCH=x86-32 build
149 ../tests/signature.sh $benchref
151 - name: Test x86-32-sse41-popcnt build
152 if: ${{ matrix.config.run_32bit_tests }}
155 make -j2 ARCH=x86-32-sse41-popcnt build
156 ../tests/signature.sh $benchref
158 - name: Test x86-32-sse2 build
159 if: ${{ matrix.config.run_32bit_tests }}
162 make -j2 ARCH=x86-32-sse2 build
163 ../tests/signature.sh $benchref
165 - name: Test general-32 build
166 if: ${{ matrix.config.run_32bit_tests }}
169 make -j2 ARCH=general-32 build
170 ../tests/signature.sh $benchref
174 - name: Test debug x86-64-modern build
175 if: ${{ matrix.config.run_64bit_tests }}
177 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
179 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
180 ../tests/signature.sh $benchref
182 - name: Test x86-64-modern build
183 if: ${{ matrix.config.run_64bit_tests }}
186 make -j2 ARCH=x86-64-modern build
187 ../tests/signature.sh $benchref
189 - name: Test x86-64-ssse3 build
190 if: ${{ matrix.config.run_64bit_tests }}
193 make -j2 ARCH=x86-64-ssse3 build
194 ../tests/signature.sh $benchref
196 - name: Test x86-64-sse3-popcnt build
197 if: ${{ matrix.config.run_64bit_tests }}
200 make -j2 ARCH=x86-64-sse3-popcnt build
201 ../tests/signature.sh $benchref
203 - name: Test x86-64 build
204 if: ${{ matrix.config.run_64bit_tests }}
207 make -j2 ARCH=x86-64 build
208 ../tests/signature.sh $benchref
210 - name: Test general-64 build
211 if: matrix.config.run_64bit_tests
214 make -j2 ARCH=general-64 build
215 ../tests/signature.sh $benchref
219 - name: Test armv8 build
220 if: ${{ matrix.config.run_armv8_tests }}
222 export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
223 export LDFLAGS="-static -Wno-unused-command-line-argument"
225 make -j2 ARCH=armv8 build
226 ../tests/signature.sh $benchref
230 - name: Test armv7 build
231 if: ${{ matrix.config.run_armv7_tests }}
233 export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
234 export LDFLAGS="-static -Wno-unused-command-line-argument"
236 make -j2 ARCH=armv7 build
237 ../tests/signature.sh $benchref
239 - name: Test armv7-neon build
240 if: ${{ matrix.config.run_armv7_tests }}
242 export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
243 export LDFLAGS="-static -Wno-unused-command-line-argument"
245 make -j2 ARCH=armv7-neon build
246 ../tests/signature.sh $benchref
250 - name: Check perft and search reproducibility
251 if: ${{ matrix.config.run_64bit_tests }}
254 make -j2 ARCH=x86-64-modern build
256 ../tests/reprosearch.sh