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
31 name: "Ubuntu 20.04 Clang",
35 run_expensive_tests: false
40 working-directory: src
42 - uses: actions/checkout@v2
46 - name: Download required packages
49 sudo apt install expect valgrind g++-multilib
51 - name: Download the used network from the fishtest framework
55 - name: Extract the bench number from the commit history
57 git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig
58 [ -s git_sig ] && echo "benchref=$(cat git_sig)" >> $GITHUB_ENV && echo "Reference bench:" $(cat git_sig) || echo "No bench found"
60 - name: Check compiler
64 - name: Test help target
70 - name: Test debug x86-32 build
72 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
74 make -j2 ARCH=x86-32 optimize=no debug=yes build
75 ../tests/signature.sh $benchref
77 - name: Test x86-32 build
80 make -j2 ARCH=x86-32 build
81 ../tests/signature.sh $benchref
83 - name: Test x86-32-sse41-popcnt build
86 make -j2 ARCH=x86-32-sse41-popcnt build
87 ../tests/signature.sh $benchref
89 - name: Test x86-32-sse2 build
92 make -j2 ARCH=x86-32-sse2 build
93 ../tests/signature.sh $benchref
95 - name: Test general-32 build
98 make -j2 ARCH=general-32 build
99 ../tests/signature.sh $benchref
103 - name: Test debug x86-64-modern build
105 export CXXFLAGS="-Werror -D_GLIBCXX_DEBUG"
107 make -j2 ARCH=x86-64-modern optimize=no debug=yes build
108 ../tests/signature.sh $benchref
110 - name: Test x86-64-modern build
113 make -j2 ARCH=x86-64-modern build
114 ../tests/signature.sh $benchref
116 - name: Test x86-64-ssse3 build
119 make -j2 ARCH=x86-64-ssse3 build
120 ../tests/signature.sh $benchref
122 - name: Test x86-64-sse3-popcnt build
125 make -j2 ARCH=x86-64-sse3-popcnt build
126 ../tests/signature.sh $benchref
128 - name: Test x86-64 build
131 make -j2 ARCH=x86-64 build
132 ../tests/signature.sh $benchref
134 - name: Test general-64 build
137 make -j2 ARCH=general-64 build
138 ../tests/signature.sh $benchref
140 # x86-64 with newer extensions tests
142 - name: Compile x86-64-avx2 build
145 make -j2 ARCH=x86-64-avx2 build
147 - name: Compile x86-64-bmi2 build
150 make -j2 ARCH=x86-64-bmi2 build
152 - name: Compile x86-64-avx512 build
155 make -j2 ARCH=x86-64-avx512 build
157 - name: Compile x86-64-vnni512 build
160 make -j2 ARCH=x86-64-vnni512 build
162 - name: Compile x86-64-vnni256 build
165 make -j2 ARCH=x86-64-vnni256 build
169 - name: Check perft and search reproducibility
172 make -j2 ARCH=x86-64-modern build
174 ../tests/reprosearch.sh
178 - name: Run under valgrind
179 if: ${{ matrix.config.run_expensive_tests }}
181 export CXXFLAGS="-O1 -fno-inline"
183 make -j2 ARCH=x86-64-modern debug=yes optimize=no build > /dev/null
184 ../tests/instrumented.sh --valgrind
185 ../tests/instrumented.sh --valgrind-thread
187 - name: Run with UB sanitizer
188 if: ${{ matrix.config.run_expensive_tests }}
190 export CXXFLAGS="-O1 -fno-inline"
192 make -j2 ARCH=x86-64-modern sanitize=undefined optimize=no debug=yes build > /dev/null
193 ../tests/instrumented.sh --sanitizer-undefined
195 - name: Run with thread sanitizer
196 if: ${{ matrix.config.run_expensive_tests }}
198 export CXXFLAGS="-O1 -fno-inline"
200 make -j2 ARCH=x86-64-modern sanitize=thread optimize=no debug=yes build > /dev/null
201 ../tests/instrumented.sh --sanitizer-thread