From: dpldgr <144766863+dpldgr@users.noreply.github.com> Date: Sun, 9 Mar 2025 14:45:52 +0000 (+0800) Subject: macOS builds + Runner updates (#871) X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=3d28cac13680f472094dee1772402c3d68feb328;p=fairystockfish.git macOS builds + Runner updates (#871) --- diff --git a/.github/workflows/fairy.yml b/.github/workflows/fairy.yml index 93789a2..312fb74 100644 --- a/.github/workflows/fairy.yml +++ b/.github/workflows/fairy.yml @@ -18,15 +18,15 @@ jobs: matrix: config: - { - name: "Ubuntu 20.04 GCC", - os: ubuntu-20.04, + name: "Ubuntu 24.04 GCC", + os: ubuntu-24.04, compiler: g++, comp: gcc, run_expensive_tests: true } - { - name: "Ubuntu 20.04 Clang", - os: ubuntu-20.04, + name: "Ubuntu 24.04 Clang", + os: ubuntu-24.04, compiler: clang++, comp: clang, run_expensive_tests: false diff --git a/.github/workflows/ffishjs.yml b/.github/workflows/ffishjs.yml index 23aa60b..00e36e9 100644 --- a/.github/workflows/ffishjs.yml +++ b/.github/workflows/ffishjs.yml @@ -12,7 +12,7 @@ env: jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: @@ -45,7 +45,7 @@ jobs: run: npm test build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [test] #Building process must start after successful testing process strategy: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 65a62b4..e8bc242 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: arch: ["x86-64-bmi2", "x86-64-modern", "x86-64"] - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -64,3 +64,53 @@ jobs: path: src/fairy-stockfish* if-no-files-found: error compression-level: 9 + + macos: + strategy: + matrix: + arch: ["x86-64"] + runs-on: macos-13 + + steps: + - uses: actions/checkout@v4 + + - name: make + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish_${{ matrix.arch }} && strip fairy-stockfish_${{ matrix.arch }} + + - name: make largeboards + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish-largeboards_${{ matrix.arch }} largeboards=yes && strip fairy-stockfish-largeboards_${{ matrix.arch }} + + - name: make all + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish-all_${{ matrix.arch }} largeboards=yes all=yes && strip fairy-stockfish-all_${{ matrix.arch }} + + - uses: actions/upload-artifact@v4 + with: + name: fairy-stockfish-macos-${{ matrix.arch }} + path: src/fairy-stockfish* + if-no-files-found: error + compression-level: 9 + + macos-m1: + strategy: + matrix: + arch: ["apple-silicon"] + runs-on: macos-14 + + steps: + - uses: actions/checkout@v4 + + - name: make + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish_${{ matrix.arch }} && strip fairy-stockfish_${{ matrix.arch }} + + - name: make largeboards + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish-largeboards_${{ matrix.arch }} largeboards=yes && strip fairy-stockfish-largeboards_${{ matrix.arch }} + + - name: make all + run: cd src && make clean && make -j build COMP=clang ARCH=${{ matrix.arch }} EXE=fairy-stockfish-all_${{ matrix.arch }} largeboards=yes all=yes && strip fairy-stockfish-all_${{ matrix.arch }} + + - uses: actions/upload-artifact@v4 + with: + name: fairy-stockfish-macos-m1-${{ matrix.arch }} + path: src/fairy-stockfish* + if-no-files-found: error + compression-level: 9 diff --git a/.github/workflows/stockfish.yml b/.github/workflows/stockfish.yml index a1efcdf..1b3e47a 100644 --- a/.github/workflows/stockfish.yml +++ b/.github/workflows/stockfish.yml @@ -21,15 +21,15 @@ jobs: matrix: config: - { - name: "Ubuntu 22.04 GCC", - os: ubuntu-22.04, + name: "Ubuntu 24.04 GCC", + os: ubuntu-24.04, compiler: g++, comp: gcc, run_expensive_tests: true } - { - name: "Ubuntu 20.04 Clang", - os: ubuntu-20.04, + name: "Ubuntu 24.04 Clang", + os: ubuntu-24.04, compiler: clang++, comp: clang, run_expensive_tests: false diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7af44b1..f08f338 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -14,7 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, windows-2019, macos-13] + os: [ubuntu-24.04, windows-2019, macos-13] steps: - uses: actions/checkout@v4 @@ -41,7 +41,7 @@ jobs: build_sdist: name: Build source distribution - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/src/position.cpp b/src/position.cpp index 5026a6f..eec715d 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -185,7 +185,7 @@ void Position::init() { // Prepare the cuckoo tables std::memset(cuckoo, 0, sizeof(cuckoo)); std::memset(cuckooMove, 0, sizeof(cuckooMove)); - int count = 0; + [[maybe_unused]] int count = 0; for (Color c : {WHITE, BLACK}) for (PieceSet ps = CHESS_PIECES & ~piece_set(PAWN); ps;) { @@ -2856,7 +2856,7 @@ bool Position::is_immediate_game_end(Value& result, int ply) const { current |= newBitboard; } } - + if (connect_nxn()) { Bitboard connectors = connectPieces;