]> git.sesse.net Git - stockfish/blob - .github/workflows/stockfish_compile_test.yml
90e01537d571fdb2d448023d5eed8fa8b3deec3f
[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@v3
55         with:
56           fetch-depth: 0
57
58       - name: Setup msys and install required packages
59         if: runner.os == 'Windows'
60         uses: msys2/setup-msys2@v2
61         with:
62           msystem: ${{matrix.config.msys_sys}}
63           install: mingw-w64-${{matrix.config.msys_env}} make git
64
65       - name: Download the used network from the fishtest framework
66         run: make net
67
68       - name: Check compiler
69         run: $COMPILER -v
70
71       - name: Test help target
72         run: make help
73
74       - name: Check git
75         run: git --version
76
77       # x86-64 with newer extensions tests
78
79       - name: Compile x86-64-avx2 build
80         run: |
81           make clean
82           make -j2 ARCH=x86-64-avx2 build
83
84       - name: Compile x86-64-bmi2 build
85         run: |
86           make clean
87           make -j2 ARCH=x86-64-bmi2 build
88
89       - name: Compile x86-64-avx512 build
90         run: |
91           make clean
92           make -j2 ARCH=x86-64-avx512 build
93
94       - name: Compile x86-64-vnni512 build
95         run: |
96           make clean
97           make -j2 ARCH=x86-64-vnni512 build
98
99       - name: Compile x86-64-vnni256 build
100         run: |
101           make clean
102           make -j2 ARCH=x86-64-vnni256 build