X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=.github%2Fworkflows%2Fstockfish_binaries.yml;fp=.github%2Fworkflows%2Fstockfish_binaries.yml;h=5b3a522625c677225319201dad34946b42abe988;hp=f7669b479aa4f7629a3bb33f7ef849c3907561c1;hb=bfee35f930bac95b646b1821339f342c70aac2f6;hpb=487c21b1aa64dcc09dd95b845a66f39ae3c3754e diff --git a/.github/workflows/stockfish_binaries.yml b/.github/workflows/stockfish_binaries.yml index f7669b47..5b3a5226 100644 --- a/.github/workflows/stockfish_binaries.yml +++ b/.github/workflows/stockfish_binaries.yml @@ -9,9 +9,11 @@ jobs: COMPILER: ${{ matrix.config.compiler }} COMP: ${{ matrix.config.comp }} EXT: ${{ matrix.config.ext }} + SDE: ${{ matrix.config.sde }} NAME: ${{ matrix.config.simple_name }} BINARY: ${{ matrix.binaries }} strategy: + fail-fast: false matrix: config: - name: Ubuntu 20.04 GCC @@ -21,8 +23,9 @@ jobs: comp: gcc shell: bash archive_ext: tar - - name: MacOS 12 Apple Clang - os: macos-12 + sde: /home/runner/work/Stockfish/Stockfish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-lin/sde -future -- + - name: MacOS 13 Apple Clang + os: macos-13 simple_name: macos compiler: clang++ comp: clang @@ -37,29 +40,46 @@ jobs: msys_env: x86_64-gcc shell: msys2 {0} ext: .exe + sde: /d/a/Stockfish/Stockfish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-win/sde.exe -future -- archive_ext: zip binaries: - x86-64 - - x86-64-modern + - x86-64-sse41-popcnt - x86-64-avx2 - x86-64-bmi2 + - x86-64-avxvnni + - x86-64-avx512 + - x86-64-vnni256 + - x86-64-vnni512 exclude: - - binaries: x86-64-avx2 - config: { os: macos-12 } - - binaries: x86-64-bmi2 - config: { os: macos-12 } + - binaries: x86-64-avxvnni + config: { ubuntu-20.04 } + - binaries: x86-64-avxvnni + config: { os: macos-13 } + - binaries: x86-64-avx512 + config: { os: macos-13 } + - binaries: x86-64-vnni256 + config: { os: macos-13 } + - binaries: x86-64-vnni512 + config: { os: macos-13 } defaults: run: working-directory: src shell: ${{ matrix.config.shell }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Download required linux packages + - name: Download required macOS packages + if: runner.os == 'macOS' + run: brew install coreutils + + - name: Install fixed GCC on Linux if: runner.os == 'Linux' - run: sudo apt update + uses: egor-tensin/setup-gcc@eaa888eb19115a521fa72b65cd94fe1f25bbcaac # @v1.3 + with: + version: 11 - name: Setup msys and install required packages if: runner.os == 'Windows' @@ -68,12 +88,34 @@ jobs: msystem: ${{ matrix.config.msys_sys }} install: mingw-w64-${{ matrix.config.msys_env }} make git zip + - name: Download SDE package + if: runner.os == 'Linux' || runner.os == 'Windows' + uses: petarpetrovt/setup-sde@91a1a03434384e064706634125a15f7446d2aafb # @v2.3 + with: + environmentVariableName: SDE_DIR + sdeVersion: 9.27.0 + - name: Download the used network from the fishtest framework run: make net + - name: Extract the bench number from the commit history + run: | + for hash in $(git rev-list -100 HEAD); do + benchref=$(git show -s $hash | tac | grep -m 1 -o -x '[[:space:]]*\b[Bb]ench[ :]\+[1-9][0-9]\{5,7\}\b[[:space:]]*' | sed 's/[^0-9]//g') && break || true + done + [[ -n "$benchref" ]] && echo "benchref=$benchref" >> $GITHUB_ENV && echo "From commit: $hash" && echo "Reference bench: $benchref" || echo "No bench found" + - name: Check compiler run: $COMPILER -v + - name: Show g++ cpu info + if: runner.os != 'macOS' + run: g++ -Q -march=native --help=target + + - name: Show clang++ cpu info + if: runner.os == 'macOS' + run: clang++ -E - -march=native -### + - name: Test help target run: make help @@ -84,8 +126,9 @@ jobs: - name: Compile ${{ matrix.binaries }} build run: | - make -j2 profile-build ARCH=$BINARY COMP=$COMP + make -j2 profile-build ARCH=$BINARY COMP=$COMP WINE_PATH="$SDE" make strip ARCH=$BINARY COMP=$COMP + WINE_PATH="$SDE" ../tests/signature.sh $benchref mv ./stockfish$EXT ../stockfish-$NAME-$BINARY$EXT - name: Remove non src files @@ -108,6 +151,7 @@ jobs: cp AUTHORS stockfish/ cp CITATION.cff stockfish/ cp README.md stockfish/ + cp CONTRIBUTING.md stockfish/ - name: Create tar if: runner.os != 'Windows' @@ -139,7 +183,7 @@ jobs: - name: Release if: startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag' - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # @v1 with: files: stockfish-${{ matrix.config.simple_name }}-${{ matrix.binaries }}.${{ matrix.config.archive_ext }} @@ -162,7 +206,7 @@ jobs: - name: Prerelease if: github.ref_name == 'master' && env.CHANGES == '0' continue-on-error: true - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # @v1 with: name: Stockfish dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }} tag_name: stockfish-dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }}