From 796d9df6438b416a63364c7cf5edbc9be5434101 Mon Sep 17 00:00:00 2001 From: ppigazzini Date: Fri, 11 Aug 2023 16:57:26 +0200 Subject: [PATCH] Check compiler for docker builds in CI closes https://github.com/official-stockfish/Stockfish/pull/4739 No functional change --- .github/workflows/stockfish_test.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/stockfish_test.yml b/.github/workflows/stockfish_test.yml index 307d3a02..72f0c22e 100644 --- a/.github/workflows/stockfish_test.yml +++ b/.github/workflows/stockfish_test.yml @@ -134,7 +134,7 @@ jobs: FROM ${{ matrix.config.base_image }} WORKDIR /app RUN apk update && apk add make g++ - CMD sh make_sf.sh + CMD ["sh", "script.sh"] EOF - name: Download required macOS packages @@ -160,10 +160,15 @@ jobs: - name: Check compiler run: | - if [ $COMP == ndk ]; then - export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH + if [ -z "${{ matrix.config.base_image }}" ]; then + if [ $COMP == ndk ]; then + export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH + fi + $COMPILER -v + else + echo "$COMPILER -v" > script.sh + docker run --rm --platform ${{ matrix.config.platform }} -v ${{ github.workspace }}/src:/app sf_builder fi - $COMPILER -v - name: Test help target run: make help @@ -321,7 +326,7 @@ jobs: - name: Test riscv64 build if: matrix.config.run_riscv64_tests run: | - echo "export LDFLAGS='-static' && make clean && make -j2 ARCH=riscv64 build" > make_sf.sh + echo "export LDFLAGS='-static' && make clean && make -j2 ARCH=riscv64 build" > script.sh docker run --rm --platform ${{ matrix.config.platform }} -v ${{ github.workspace }}/src:/app sf_builder ../tests/signature.sh $benchref @@ -330,7 +335,7 @@ jobs: - name: Test ppc64 build if: matrix.config.run_ppc64_tests run: | - echo "export LDFLAGS='-static' && make clean && make -j2 ARCH=ppc-64 build" > make_sf.sh + echo "export LDFLAGS='-static' && make clean && make -j2 ARCH=ppc-64 build" > script.sh docker run --rm --platform ${{ matrix.config.platform }} -v ${{ github.workspace }}/src:/app sf_builder ../tests/signature.sh $benchref -- 2.39.2