mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00

- Update codeql to v3 - Switch from dev-drprasad to native github cli - Update softprops/action-gh-release to node 20 commit `thollander/actions-comment-pull-request` needs to be bumped to node20 too, but the author hasnt done so atm closes https://github.com/official-stockfish/Stockfish/pull/5044 No functional change
76 lines
2.4 KiB
YAML
76 lines
2.4 KiB
YAML
name: Stockfish
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
branches:
|
|
- master
|
|
- tools
|
|
- github_ci
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- tools
|
|
jobs:
|
|
Prerelease:
|
|
if: github.repository == 'official-stockfish/Stockfish' && (github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag'))
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# returns null if no pre-release exists
|
|
- name: Get Commit SHA of Latest Pre-release
|
|
run: |
|
|
# Install required packages
|
|
sudo apt-get update
|
|
sudo apt-get install -y curl jq
|
|
|
|
echo "COMMIT_SHA=$(jq -r 'map(select(.prerelease)) | first | .tag_name' <<< $(curl -s https://api.github.com/repos/${{ github.repository_owner }}/Stockfish/releases))" >> $GITHUB_ENV
|
|
|
|
# delete old previous pre-release and tag
|
|
- uses: actions/checkout@v4
|
|
- run: gh release delete ${{ env.COMMIT_SHA }} --cleanup-tag
|
|
if: env.COMMIT_SHA != 'null'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
Matrix:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
arm_matrix: ${{ steps.set-arm-matrix.outputs.arm_matrix }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- id: set-matrix
|
|
run: |
|
|
TASKS=$(echo $(cat .github/ci/matrix.json) )
|
|
echo "MATRIX=$TASKS" >> $GITHUB_OUTPUT
|
|
- id: set-arm-matrix
|
|
run: |
|
|
TASKS_ARM=$(echo $(cat .github/ci/arm_matrix.json) )
|
|
echo "ARM_MATRIX=$TASKS_ARM" >> $GITHUB_OUTPUT
|
|
Compilation:
|
|
needs: [Matrix]
|
|
uses: ./.github/workflows/compilation.yml
|
|
with:
|
|
matrix: ${{ needs.Matrix.outputs.matrix }}
|
|
ARMCompilation:
|
|
needs: [Matrix]
|
|
uses: ./.github/workflows/arm_compilation.yml
|
|
with:
|
|
matrix: ${{ needs.Matrix.outputs.arm_matrix }}
|
|
IWYU:
|
|
uses: ./.github/workflows/iwyu.yml
|
|
Sanitizers:
|
|
uses: ./.github/workflows/sanitizers.yml
|
|
Tests:
|
|
uses: ./.github/workflows/tests.yml
|
|
Binaries:
|
|
if: github.repository == 'official-stockfish/Stockfish'
|
|
needs: [Matrix, Prerelease, Compilation]
|
|
uses: ./.github/workflows/upload_binaries.yml
|
|
with:
|
|
matrix: ${{ needs.Matrix.outputs.matrix }}
|
|
ARM_Binaries:
|
|
if: github.repository == 'official-stockfish/Stockfish'
|
|
needs: [Matrix, Prerelease, ARMCompilation]
|
|
uses: ./.github/workflows/upload_binaries.yml
|
|
with:
|
|
matrix: ${{ needs.Matrix.outputs.arm_matrix }}
|