]> git.sesse.net Git - stockfish/blob - .github/workflows/stockfish_compile_test.yml
Fix compilation after recent merge.
[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           - name: Ubuntu 20.04 GCC
15             os: ubuntu-20.04
16             compiler: g++
17             comp: gcc
18             shell: bash
19           - name: Ubuntu 20.04 Clang
20             os: ubuntu-20.04
21             compiler: clang++
22             comp: clang
23             shell: bash
24           - name: MacOS 13 Apple Clang
25             os: macos-13
26             compiler: clang++
27             comp: clang
28             shell: bash
29           - name: MacOS 13 GCC 11
30             os: macos-13
31             compiler: g++-11
32             comp: gcc
33             shell: bash
34           - name: Windows 2022 Mingw-w64 GCC x86_64
35             os: windows-2022
36             compiler: g++
37             comp: mingw
38             msys_sys: mingw64
39             msys_env: x86_64-gcc
40             shell: msys2 {0}
41           - name: Windows 2022 Mingw-w64 Clang x86_64
42             os: windows-2022
43             compiler: clang++
44             comp: clang
45             msys_sys: clang64
46             msys_env: clang-x86_64-clang
47             shell: msys2 {0}
48
49     defaults:
50       run:
51         working-directory: src
52         shell: ${{ matrix.config.shell }}
53     steps:
54       - uses: actions/checkout@v4
55
56       - name: Setup msys and install required packages
57         if: runner.os == 'Windows'
58         uses: msys2/setup-msys2@v2
59         with:
60           msystem: ${{matrix.config.msys_sys}}
61           install: mingw-w64-${{matrix.config.msys_env}} make git
62
63       - name: Download the used network from the fishtest framework
64         run: make net
65
66       - name: Check compiler
67         run: $COMPILER -v
68
69       - name: Test help target
70         run: make help
71
72       - name: Check git
73         run: git --version
74
75       # x86-64 with newer extensions tests
76
77       - name: Compile x86-64-avx2 build
78         run: |
79           make clean
80           make -j2 ARCH=x86-64-avx2 build
81
82       - name: Compile x86-64-bmi2 build
83         run: |
84           make clean
85           make -j2 ARCH=x86-64-bmi2 build
86
87       - name: Compile x86-64-avx512 build
88         run: |
89           make clean
90           make -j2 ARCH=x86-64-avx512 build
91
92       - name: Compile x86-64-vnni512 build
93         run: |
94           make clean
95           make -j2 ARCH=x86-64-vnni512 build
96
97       - name: Compile x86-64-vnni256 build
98         run: |
99           make clean
100           make -j2 ARCH=x86-64-vnni256 build