mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Fixes problems with non-ASCII characters in paths. Fixes #3424. Changes - Bump the minimum supported Clang version to 11 to support std::filesystem - Use std::optional for empty values instead of string sentinels like "None" - Remove the FixedString class - Move the EvalFile network path from the network struct to the engine - Simplify parts of the command-line handling - Remove the old dual-net logic from export_net - And ofc we now support non-ascii paths for windows Behavior Change - Because the EvalFile is no longer part of the network, it won't be included in the hashing, thus the network sharing is no longer dependent on the EvalFile path - As a result, if the binary version and network are the same, changing only the EvalFile location will now reuse the same shared network This also fixes a master bug where: ``` export_net None setoption name EvalFile value None export_net None Failed to export a net ``` would fail on the second export. With this patch, the second export succeeds. Quick Fishtest Check that nets load like normal. https://tests.stockfishchess.org/tests/view/6a455593f97ff95f787954da <img width="833" height="1137" alt="image" src="https://github.com/user-attachments/assets/fffee63b-c63a-4d5e-b13d-87d58bc28c88" /> closes https://github.com/official-stockfish/Stockfish/pull/6937 No functional change Co-authored-by: anematode <timothy.herchen@gmail.com>
83 lines
3.5 KiB
YAML
83 lines
3.5 KiB
YAML
name: AVX2 Compiler Matrix
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
avx2-compiler-matrix:
|
|
name: avx2 (${{ matrix.name }})
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: ${{ matrix.image }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { name: gcc-10, comp: gcc, cxx: g++, image: "gcc:10" }
|
|
- { name: gcc-11, comp: gcc, cxx: g++, image: "gcc:11" }
|
|
- { name: gcc-12, comp: gcc, cxx: g++, image: "gcc:12" }
|
|
- { name: gcc-13, comp: gcc, cxx: g++, image: "gcc:13" }
|
|
- { name: gcc-14, comp: gcc, cxx: g++, image: "gcc:14" }
|
|
- { name: gcc-15, comp: gcc, cxx: g++, image: "gcc:15" }
|
|
|
|
# Using silkeh/clang for older versions
|
|
- { name: clang-11, comp: clang, cxx: clang++, image: "silkeh/clang:11", is_clang: true, ver: "11" }
|
|
- { name: clang-12, comp: clang, cxx: clang++, image: "silkeh/clang:12", is_clang: true, ver: "12" }
|
|
- { name: clang-13, comp: clang, cxx: clang++, image: "silkeh/clang:13", is_clang: true, ver: "13" }
|
|
- { name: clang-14, comp: clang, cxx: clang++, image: "silkeh/clang:14", is_clang: true, ver: "14" }
|
|
- { name: clang-15, comp: clang, cxx: clang++, image: "silkeh/clang:15", is_clang: true, ver: "15" }
|
|
- { name: clang-16, comp: clang, cxx: clang++, image: "silkeh/clang:16", is_clang: true, ver: "16" }
|
|
- { name: clang-17, comp: clang, cxx: clang++, image: "silkeh/clang:17", is_clang: true, ver: "17" }
|
|
|
|
- { name: clang-18, comp: clang, cxx: clang++-18, image: "ubuntu:rolling", is_clang: true, ver: "18" }
|
|
- { name: clang-19, comp: clang, cxx: clang++-19, image: "ubuntu:rolling", is_clang: true, ver: "19" }
|
|
- { name: clang-20, comp: clang, cxx: clang++-20, image: "ubuntu:rolling", is_clang: true, ver: "20" }
|
|
- { name: clang-21, comp: clang, cxx: clang++-21, image: "ubuntu:rolling", is_clang: true, ver: "21" }
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
if grep -q "buster" /etc/os-release; then
|
|
echo "Debian Buster detected. Switching to archive repositories..."
|
|
echo "deb http://archive.debian.org/debian buster main contrib non-free" > /etc/apt/sources.list
|
|
echo "deb http://archive.debian.org/debian-security buster/updates main contrib non-free" >> /etc/apt/sources.list
|
|
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99-ignore-valid-until
|
|
fi
|
|
|
|
apt-get update
|
|
apt-get install -y curl git make
|
|
|
|
- name: Set up Clang
|
|
if: ${{ matrix.is_clang && matrix.image == 'ubuntu:rolling' }}
|
|
run: |
|
|
if [ "${{ matrix.ver }}" -le 20 ]; then
|
|
apt-get install -y clang-${{ matrix.ver }}
|
|
else
|
|
apt-get install -y \
|
|
clang-${{ matrix.ver }} \
|
|
llvm-${{ matrix.ver }}-dev \
|
|
llvm-${{ matrix.ver }}-linker-tools \
|
|
lld-${{ matrix.ver }}
|
|
fi
|
|
|
|
- name: Download network
|
|
working-directory: src
|
|
run: make net
|
|
|
|
- name: Build avx2 binary
|
|
working-directory: src
|
|
run: |
|
|
export CXXFLAGS="-Werror"
|
|
if [ "${{ matrix.ver }}" -ge 20 ]; then
|
|
apt install -y lld
|
|
fi
|
|
make clean
|
|
make -j build ARCH=x86-64-avx2 COMP=${{ matrix.comp }} COMPCXX=${{ matrix.cxx }}
|
|
|
|
- name: Smoke test
|
|
working-directory: src
|
|
run: ./stockfish bench 16 1 6 |