]> git.sesse.net Git - stockfish/commitdiff
Check compiler for docker builds in CI
authorppigazzini <pasquale.pigazzini@gmail.com>
Fri, 11 Aug 2023 14:57:26 +0000 (16:57 +0200)
committerDisservin <disservin.social@gmail.com>
Sun, 13 Aug 2023 09:47:52 +0000 (11:47 +0200)
closes https://github.com/official-stockfish/Stockfish/pull/4739

No functional change

.github/workflows/stockfish_test.yml

index 307d3a02b30c731879761ceb94312ac5ecda5764..72f0c22e136cd1fea04de0444e3dae2551ecfeed 100644 (file)
@@ -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