]> git.sesse.net Git - stockfish/blob - .github/workflows/stockfish_compile_test.yml
GitHub Action: upload ARM artifacts
[stockfish] / .github / workflows / stockfish_compile_test.yml
1 name: Stockfish
2 on:
3   workflow_call:
4 jobs:
5   Stockfish:
6     name: ${{ matrix.config.name }}
7     runs-on: ${{ matrix.config.os }}
8     env:
9       COMPILER: ${{ matrix.config.compiler }}
10       COMP: ${{ matrix.config.comp }}
11     strategy:
12       matrix:
13         config:
14           - {
15               name: "Ubuntu 20.04 GCC",
16               os: ubuntu-20.04,
17               compiler: g++,
18               comp: gcc,
19               shell: 'bash {0}'
20             }
21           - {
22               name: "Ubuntu 20.04 Clang",
23               os: ubuntu-20.04,
24               compiler: clang++,
25               comp: clang,
26               shell: 'bash {0}'
27             }
28           - {
29               name: "MacOS 12 Apple Clang",
30               os: macos-12,
31               compiler: clang++,
32               comp: clang,
33               shell: 'bash {0}'
34             }
35           - {
36               name: "MacOS 12 GCC 11",
37               os: macos-12,
38               compiler: g++-11,
39               comp: gcc,
40               shell: 'bash {0}'
41             }
42           - {
43               name: "Windows 2022 Mingw-w64 GCC x86_64",
44               os: windows-2022,
45               compiler: g++,
46               comp: mingw,
47               msys_sys: 'mingw64',
48               msys_env: 'x86_64-gcc',
49               shell: 'msys2 {0}'
50             }
51           - {
52               name: "Windows 2022 Mingw-w64 Clang x86_64",
53               os: windows-2022,
54               compiler: clang++,
55               comp: clang,
56               msys_sys: 'clang64',
57               msys_env: 'clang-x86_64-clang',
58               shell: 'msys2 {0}'
59             }
60
61     defaults:
62       run:
63         working-directory: src
64         shell: ${{ matrix.config.shell }}
65     steps:
66       - uses: actions/checkout@v3
67         with:
68           fetch-depth: 0
69
70       - name: Setup msys and install required packages
71         if: runner.os == 'Windows'
72         uses: msys2/setup-msys2@v2
73         with:
74           msystem: ${{matrix.config.msys_sys}}
75           install: mingw-w64-${{matrix.config.msys_env}} make
76
77       - name: Download the used network from the fishtest framework
78         run: |
79           make net
80
81       - name: Check compiler
82         run: |
83           $COMPILER -v
84
85       - name: Test help target
86         run: |
87           make help
88
89       # x86-64 with newer extensions tests
90
91       - name: Compile x86-64-avx2 build
92         run: |
93           make clean
94           make -j2 ARCH=x86-64-avx2 build
95
96       - name: Compile x86-64-bmi2 build
97         run: |
98           make clean
99           make -j2 ARCH=x86-64-bmi2 build
100
101       - name: Compile x86-64-avx512 build
102         run: |
103           make clean
104           make -j2 ARCH=x86-64-avx512 build
105
106       - name: Compile x86-64-vnni512 build
107         run: |
108           make clean
109           make -j2 ARCH=x86-64-vnni512 build
110
111       - name: Compile x86-64-vnni256 build
112         run: |
113           make clean
114           make -j2 ARCH=x86-64-vnni256 build