]> git.sesse.net Git - stockfish/blob - .github/workflows/stockfish.yml
6d71fef5aef96d3f3890f67373d3a07d6c8fe28b
[stockfish] / .github / workflows / stockfish.yml
1 name: Stockfish
2 on:
3   push:
4     tags:        
5       - '*' 
6     branches:
7       - master
8       - tools
9       - github_ci
10   pull_request:
11     branches:
12       - master
13       - tools
14 jobs:
15   Prerelease:
16     if: github.ref == 'refs/heads/master'
17     runs-on: ubuntu-latest
18     steps:
19       # returns null if no pre-release exists
20       - name: Get Commit SHA of Latest Pre-release
21         run: |
22           # Install required packages
23           sudo apt-get update
24           sudo apt-get install -y curl jq
25
26           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
27
28       # delete old previous pre-release and tag
29       - uses: dev-drprasad/delete-tag-and-release@8cd619d00037e4aeb781909c9a6b03940507d0da  # @v1.0.1
30         if: env.COMMIT_SHA != 'null'
31         with:
32           tag_name: ${{ env.COMMIT_SHA }}
33         env:
34           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
36   # The include checks currently fail because of broken LLVM nightly packages: https://github.com/llvm/llvm-project/issues/73402
37   #Analyzers:
38   #  uses: ./.github/workflows/stockfish_analyzers.yml
39   Sanitizers:
40     uses: ./.github/workflows/stockfish_sanitizers.yml
41   Tests:
42     uses: ./.github/workflows/stockfish_test.yml
43   Compiles:
44     uses: ./.github/workflows/stockfish_compile_test.yml
45   Binaries:
46     if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
47     uses: ./.github/workflows/stockfish_binaries.yml
48   ARM_Binaries:
49     if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
50     uses: ./.github/workflows/stockfish_arm_binaries.yml