diff --git a/.github/ci/universal_matrix.json b/.github/ci/universal_matrix.json new file mode 100644 index 000000000..64b7d7608 --- /dev/null +++ b/.github/ci/universal_matrix.json @@ -0,0 +1,18 @@ +{ + "config": [ + { + "name": "Ubuntu 22.04 GCC Universal", + "os": "ubuntu-22.04", + "simple_name": "ubuntu", + "archive_ext": "tar" + }, + { + "name": "Windows 2022 Mingw-w64 GCC Universal", + "os": "windows-2022", + "simple_name": "windows", + "ext": ".exe", + "archive_ext": "zip" + } + ], + "binaries": ["x86-64-universal"] +} diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 53ee63e07..7a170f614 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -135,11 +135,17 @@ jobs: - name: Check arch selection under SDE run: ./scripts/check_universal.sh ./stockfish-ubuntu-x86-64-universal "$SDE_DIR/sde" "$benchref" + - name: Remove non src files + run: git -C src clean -fx + - name: Upload artifact for (pre)-release uses: actions/upload-artifact@v4 with: name: ubuntu x86-64-universal - path: stockfish-ubuntu-x86-64-universal + path: | + . + !.git + !.output UniversalWindows: name: Windows x86-64 Universal @@ -186,8 +192,14 @@ jobs: - name: Check arch selection under SDE run: ./scripts/check_universal.sh ./stockfish-windows-x86-64-universal.exe "$SDE_DIR/sde" "$benchref" + - name: Remove non src files + run: git -C src clean -fx + - name: Upload artifact for (pre)-release uses: actions/upload-artifact@v4 with: name: windows x86-64-universal - path: stockfish-windows-x86-64-universal.exe + path: | + . + !.git + !.output diff --git a/.github/workflows/stockfish.yml b/.github/workflows/stockfish.yml index 1b4b0ea06..d156dad79 100644 --- a/.github/workflows/stockfish.yml +++ b/.github/workflows/stockfish.yml @@ -78,6 +78,7 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} arm_matrix: ${{ steps.set-arm-matrix.outputs.arm_matrix }} + universal_matrix: ${{ steps.set-universal-matrix.outputs.universal_matrix }} steps: - uses: actions/checkout@v4 with: @@ -90,6 +91,10 @@ jobs: run: | TASKS_ARM=$(echo $(cat .github/ci/arm_matrix.json) ) echo "ARM_MATRIX=$TASKS_ARM" >> $GITHUB_OUTPUT + - id: set-universal-matrix + run: | + TASKS_UNIVERSAL=$(echo $(cat .github/ci/universal_matrix.json) ) + echo "UNIVERSAL_MATRIX=$TASKS_UNIVERSAL" >> $GITHUB_OUTPUT # Testing Jobs IWYU: uses: ./.github/workflows/iwyu.yml @@ -139,3 +144,13 @@ jobs: contents: write # For deleting/creating a (pre)release secrets: token: ${{ secrets.GITHUB_TOKEN }} + Universal_Binaries: + if: github.repository == 'official-stockfish/Stockfish' + needs: [Prerelease, Matrix, Compilation] + uses: ./.github/workflows/upload_binaries.yml + with: + matrix: ${{ needs.Matrix.outputs.universal_matrix }} + permissions: + contents: write # For deleting/creating a (pre)release + secrets: + token: ${{ secrets.GITHUB_TOKEN }}