mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-06 10:53:50 +08:00
ci: add tests and artifacts for windows-11-arm
integrate armv8 and armv8-dotprod builds on windows-11-arm in ci, creating the corresponding artifacts. Correct Makefile to drop warnings when providing a CXX, add MINGW ARM64 to get_native_properties.sh fixes https://github.com/official-stockfish/Stockfish/issues/5640 closes https://github.com/official-stockfish/Stockfish/pull/6078 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
54fb42ddf8
commit
e03898b57c
138
.github/ci/matrix.json
vendored
138
.github/ci/matrix.json
vendored
@@ -40,6 +40,18 @@
|
|||||||
"ext": ".exe",
|
"ext": ".exe",
|
||||||
"sde": "/d/a/Stockfish/Stockfish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-win/sde.exe -future --",
|
"sde": "/d/a/Stockfish/Stockfish/.output/sde-temp-files/sde-external-9.27.0-2023-09-13-win/sde.exe -future --",
|
||||||
"archive_ext": "zip"
|
"archive_ext": "zip"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Windows 11 Mingw-w64 Clang arm64",
|
||||||
|
"os": "windows-11-arm",
|
||||||
|
"simple_name": "windows",
|
||||||
|
"compiler": "clang++",
|
||||||
|
"comp": "clang",
|
||||||
|
"msys_sys": "clangarm64",
|
||||||
|
"msys_env": "clang-aarch64-clang",
|
||||||
|
"shell": "msys2 {0}",
|
||||||
|
"ext": ".exe",
|
||||||
|
"archive_ext": "zip"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"binaries": [
|
"binaries": [
|
||||||
@@ -51,7 +63,9 @@
|
|||||||
"x86-64-avx512",
|
"x86-64-avx512",
|
||||||
"x86-64-vnni256",
|
"x86-64-vnni256",
|
||||||
"x86-64-vnni512",
|
"x86-64-vnni512",
|
||||||
"apple-silicon"
|
"apple-silicon",
|
||||||
|
"armv8",
|
||||||
|
"armv8-dotprod"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
{
|
{
|
||||||
@@ -126,12 +140,78 @@
|
|||||||
"os": "macos-13"
|
"os": "macos-13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-sse41-popcnt",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-avx2",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-bmi2",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-avxvnni",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-avx512",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-vnni256",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "x86-64-vnni512",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"binaries": "apple-silicon",
|
"binaries": "apple-silicon",
|
||||||
"config": {
|
"config": {
|
||||||
"os": "windows-2022"
|
"os": "windows-2022"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"binaries": "apple-silicon",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-11-arm"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "apple-silicon",
|
||||||
|
"config": {
|
||||||
|
"os": "ubuntu-20.04"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "apple-silicon",
|
||||||
|
"config": {
|
||||||
|
"os": "ubuntu-22.04"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"binaries": "apple-silicon",
|
"binaries": "apple-silicon",
|
||||||
"config": {
|
"config": {
|
||||||
@@ -139,10 +219,64 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"binaries": "apple-silicon",
|
"binaries": "armv8",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-2022"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8",
|
||||||
|
"config": {
|
||||||
|
"os": "ubuntu-20.04"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8",
|
||||||
"config": {
|
"config": {
|
||||||
"os": "ubuntu-22.04"
|
"os": "ubuntu-22.04"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8",
|
||||||
|
"config": {
|
||||||
|
"os": "macos-13"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8",
|
||||||
|
"config": {
|
||||||
|
"os": "macos-14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8-dotprod",
|
||||||
|
"config": {
|
||||||
|
"os": "windows-2022"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8-dotprod",
|
||||||
|
"config": {
|
||||||
|
"os": "ubuntu-20.04"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8-dotprod",
|
||||||
|
"config": {
|
||||||
|
"os": "ubuntu-22.04"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8-dotprod",
|
||||||
|
"config": {
|
||||||
|
"os": "macos-13"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"binaries": "armv8-dotprod",
|
||||||
|
"config": {
|
||||||
|
"os": "macos-14"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
14
.github/workflows/compilation.yml
vendored
14
.github/workflows/compilation.yml
vendored
@@ -63,13 +63,13 @@ jobs:
|
|||||||
- name: Check compiler
|
- name: Check compiler
|
||||||
run: $COMPCXX -v
|
run: $COMPCXX -v
|
||||||
|
|
||||||
- name: Show g++ cpu info
|
- name: Show compiler cpu info
|
||||||
if: runner.os != 'macOS'
|
run: |
|
||||||
run: g++ -Q -march=native --help=target
|
if [[ "$COMPCXX" == clang* ]]; then
|
||||||
|
$COMPCXX -E - -march=native -###
|
||||||
- name: Show clang++ cpu info
|
else
|
||||||
if: runner.os == 'macOS'
|
$COMPCXX -Q -march=native --help=target
|
||||||
run: clang++ -E - -march=native -###
|
fi
|
||||||
|
|
||||||
# x86-64 with newer extensions tests
|
# x86-64 with newer extensions tests
|
||||||
|
|
||||||
|
|||||||
12
.github/workflows/tests.yml
vendored
12
.github/workflows/tests.yml
vendored
@@ -98,6 +98,14 @@ jobs:
|
|||||||
msys_sys: clang64
|
msys_sys: clang64
|
||||||
msys_env: clang-x86_64-clang
|
msys_env: clang-x86_64-clang
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
|
- name: Windows 11 Mingw-w64 Clang arm64
|
||||||
|
os: windows-11-arm
|
||||||
|
compiler: clang++
|
||||||
|
comp: clang
|
||||||
|
run_armv8_tests: true
|
||||||
|
msys_sys: clangarm64
|
||||||
|
msys_env: clang-aarch64-clang
|
||||||
|
shell: msys2 {0}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: src
|
working-directory: src
|
||||||
@@ -302,8 +310,10 @@ jobs:
|
|||||||
- name: Test armv8 build
|
- name: Test armv8 build
|
||||||
if: matrix.config.run_armv8_tests
|
if: matrix.config.run_armv8_tests
|
||||||
run: |
|
run: |
|
||||||
|
if [ $COMP == ndk ]; then
|
||||||
export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
|
export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
|
||||||
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
||||||
|
fi
|
||||||
make clean
|
make clean
|
||||||
make -j4 ARCH=armv8 build
|
make -j4 ARCH=armv8 build
|
||||||
../tests/signature.sh $benchref
|
../tests/signature.sh $benchref
|
||||||
@@ -311,8 +321,10 @@ jobs:
|
|||||||
- name: Test armv8-dotprod build
|
- name: Test armv8-dotprod build
|
||||||
if: matrix.config.run_armv8_tests
|
if: matrix.config.run_armv8_tests
|
||||||
run: |
|
run: |
|
||||||
|
if [ $COMP == ndk ]; then
|
||||||
export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
|
export PATH=${{ env.ANDROID_NDK_BIN }}:$PATH
|
||||||
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
export LDFLAGS="-static -Wno-unused-command-line-argument"
|
||||||
|
fi
|
||||||
make clean
|
make clean
|
||||||
make -j4 ARCH=armv8-dotprod build
|
make -j4 ARCH=armv8-dotprod build
|
||||||
../tests/signature.sh $benchref
|
../tests/signature.sh $benchref
|
||||||
|
|||||||
@@ -130,7 +130,13 @@ case $uname_s in
|
|||||||
esac
|
esac
|
||||||
file_ext='tar'
|
file_ext='tar'
|
||||||
;;
|
;;
|
||||||
'CYGWIN'*|'MINGW'*|'MSYS'*) # Windows system with POSIX compatibility layer
|
'MINGW'*'ARM64'*) # Windows ARM64 system with POSIX compatibility layer
|
||||||
|
# TODO: older chips might be armv8, but we have no good way to detect, /proc/cpuinfo shows x86 info
|
||||||
|
file_os='windows'
|
||||||
|
true_arch='armv8-dotprod'
|
||||||
|
file_ext='zip'
|
||||||
|
;;
|
||||||
|
'CYGWIN'*|'MINGW'*|'MSYS'*) # Windows x86_64system with POSIX compatibility layer
|
||||||
get_flags
|
get_flags
|
||||||
check_znver_1_2
|
check_znver_1_2
|
||||||
set_arch_x86_64
|
set_arch_x86_64
|
||||||
|
|||||||
12
src/Makefile
12
src/Makefile
@@ -567,11 +567,16 @@ ifeq ($(COMP),ndk)
|
|||||||
LDFLAGS += -static-libstdc++ -pie -lm -latomic
|
LDFLAGS += -static-libstdc++ -pie -lm -latomic
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### Allow overwriting CXX from command line
|
||||||
|
ifdef COMPCXX
|
||||||
|
CXX=$(COMPCXX)
|
||||||
|
endif
|
||||||
|
|
||||||
# llvm-profdata must be version compatible with the specified CXX (be it clang, or the gcc alias)
|
# llvm-profdata must be version compatible with the specified CXX (be it clang, or the gcc alias)
|
||||||
# make -j profile-build CXX=clang++-20 COMP=clang
|
# make -j profile-build CXX=clang++-20 COMP=clang
|
||||||
# Locate the version in the same directory as the compiler used,
|
# Locate the version in the same directory as the compiler used,
|
||||||
# with fallback to a generic one if it can't be located
|
# with fallback to a generic one if it can't be located
|
||||||
LLVM_PROFDATA := $(dir $(realpath $(shell which $(CXX))))llvm-profdata
|
LLVM_PROFDATA := $(dir $(realpath $(shell which $(CXX) 2> /dev/null)))llvm-profdata
|
||||||
ifeq ($(wildcard $(LLVM_PROFDATA)),)
|
ifeq ($(wildcard $(LLVM_PROFDATA)),)
|
||||||
LLVM_PROFDATA := llvm-profdata
|
LLVM_PROFDATA := llvm-profdata
|
||||||
endif
|
endif
|
||||||
@@ -590,11 +595,6 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
### Allow overwriting CXX from command line
|
|
||||||
ifdef COMPCXX
|
|
||||||
CXX=$(COMPCXX)
|
|
||||||
endif
|
|
||||||
|
|
||||||
### Sometimes gcc is really clang
|
### Sometimes gcc is really clang
|
||||||
ifeq ($(COMP),gcc)
|
ifeq ($(COMP),gcc)
|
||||||
gccversion := $(shell $(CXX) --version 2>/dev/null)
|
gccversion := $(shell $(CXX) --version 2>/dev/null)
|
||||||
|
|||||||
Reference in New Issue
Block a user