]> git.sesse.net Git - stockfish/blob - .github/workflows/stockfish.yml
99c4259ac756f0d816c65aaaee3252f644fa3bef
[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       - uses: actions/checkout@v3
20         with:
21           fetch-depth: 0
22
23       # returns null if no pre-release exists
24       - name: Get Commit SHA of Latest Pre-release
25         run: |
26           # Install required packages
27           sudo apt-get update
28           sudo apt-get install -y curl jq
29
30           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
31
32       # delete old previous pre-release and tag
33       - uses: dev-drprasad/delete-tag-and-release@v0.2.1
34         if: env.COMMIT_SHA != 'null'
35         with:
36           tag_name: ${{ env.COMMIT_SHA }}
37         env:
38           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
40   Sanitizers:
41     uses: ./.github/workflows/stockfish_sanitizers.yml
42   Tests:
43     uses: ./.github/workflows/stockfish_test.yml
44   Compiles:
45     uses: ./.github/workflows/stockfish_compile_test.yml
46   Binaries:
47     if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
48     uses: ./.github/workflows/stockfish_binaries.yml
49   ARM_Binaries:
50     if: github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')
51     uses: ./.github/workflows/stockfish_arm_binaries.yml