2626 arch : " x86-64" ,
2727 extra_ldflags : " " ,
2828 platform : " linux" ,
29+ docker : true,
30+ docker_platform : " linux/amd64" ,
31+ image : " alpine:3.22" ,
2932 }
3033 - {
3134 name : " Ubuntu 22.04 GCC ARM64" ,
3639 arch : " arm64" ,
3740 extra_ldflags : " " ,
3841 platform : " linux" ,
42+ docker : true,
43+ docker_platform : " linux/arm64" ,
44+ image : " alpine:3.22" ,
3945 }
4046 - {
4147 name : " Ubuntu 22.04 GCC RISC-V" ,
4652 extra_ldflags : " -latomic" ,
4753 docker : true,
4854 docker_platform : " linux/riscv64" ,
49- image : " riscv64/ubuntu:22.04 " ,
55+ image : " riscv64/alpine:3.22 " ,
5056 arch : " risc-v" ,
5157 platform : " linux" ,
5258 }
@@ -139,7 +145,7 @@ jobs:
139145 uses : docker/setup-qemu-action@v3
140146
141147 # Build RISC-V in Docker
142- - name : Build in Docker (RISC-V)
148+ - name : Build in Docker
143149 if : matrix.config.docker == true
144150 run : |
145151 sudo apt-get update
@@ -148,12 +154,12 @@ jobs:
148154 -v ${{ github.workspace }}:/workspace \
149155 -w /workspace \
150156 ${{ matrix.config.image }} \
151- bash -c "
152- apt-get update &&
153- apt-get install -y build-essential g++ make &&
157+ sh -c "
158+ apk add --no-cache build-base g++ make &&
154159 make -j2 build=release EXTRA_LDFLAGS='${{ matrix.config.extra_ldflags }}' NATIVE='${{ matrix.config.native }}' COMPILER='${{ matrix.config.compiler }}' COMPILE_MSG='compiled for ${{ matrix.config.os }} ${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }} (CI)' &&
155160 strip ./fastchess${{ matrix.config.ext }} || true &&
156- mv fastchess${{ matrix.config.ext }} fastchess-${{ matrix.config.platform }}${{ matrix.config.ext }} &&
161+ find . -type f \( -name "*.o" -o -name "*.d" \) -delete &&
162+ find . -type d -name "sha" -exec rm -rf {} + &&
157163 ./fastchess* -version
158164 "
159165
@@ -163,12 +169,10 @@ jobs:
163169 run : |
164170 make -j2 build=release EXTRA_LDFLAGS='${{ matrix.config.extra_ldflags }}' NATIVE="$NATIVE" COMPILER="$COMPILER" COMPILE_MSG="compiled for ${{ matrix.config.os }} ${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }} (CI)"
165171 strip ./fastchess$EXT || true
172+ find . -type f \( -name "*.o" -o -name "*.d" \) -delete
173+ find . -type d -name "sha" -exec rm -rf {} +
166174 ./fastchess* -version
167175
168- - name : Find and remove empty files
169- run : rm -rf *.o *.d sha
170- shell : bash
171-
172176 - name : Archive binaries
173177 uses : actions/upload-artifact@v4
174178 with :
0 commit comments