Add Apple Silicon Runners to CI

GitHub CI runners are available for macOS 14, these runners are using apple silicon chips (M1).
https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/

closes https://github.com/official-stockfish/Stockfish/pull/5025

No functional change
This commit is contained in:
Disservin
2024-01-31 22:47:02 +01:00
committed by Joost VandeVondele
parent 16afec0582
commit 3cce4c4cf4
3 changed files with 77 additions and 8 deletions
+38
View File
@@ -31,6 +31,13 @@ jobs:
comp: clang comp: clang
shell: bash shell: bash
archive_ext: tar archive_ext: tar
- name: MacOS 14 Apple Clang M1
os: macos-14
simple_name: macos-m1
compiler: clang++
comp: clang
shell: bash
archive_ext: tar
- name: Windows 2022 Mingw-w64 GCC x86_64 - name: Windows 2022 Mingw-w64 GCC x86_64
os: windows-2022 os: windows-2022
simple_name: windows simple_name: windows
@@ -51,9 +58,32 @@ jobs:
- x86-64-avx512 - x86-64-avx512
- x86-64-vnni256 - x86-64-vnni256
- x86-64-vnni512 - x86-64-vnni512
- apple-silicon
exclude: exclude:
# Apple M1
- binaries: x86-64
config: { os: macos-14 }
- binaries: x86-64-sse41-popcnt
config: { os: macos-14 }
- binaries: x86-64-avx2
config: { os: macos-14 }
- binaries: x86-64-bmi2
config: { os: macos-14 }
- binaries: x86-64-avxvnni
config: { os: macos-14 }
- binaries: x86-64-avxvnni
config: { os: macos-14 }
- binaries: x86-64-avx512
config: { os: macos-14 }
- binaries: x86-64-vnni256
config: { os: macos-14 }
- binaries: x86-64-vnni512
config: { os: macos-14 }
- binaries: x86-64-avxvnni - binaries: x86-64-avxvnni
config: { ubuntu-20.04 } config: { ubuntu-20.04 }
# Apple x86_64 (no sde)
- binaries: x86-64-avxvnni - binaries: x86-64-avxvnni
config: { os: macos-13 } config: { os: macos-13 }
- binaries: x86-64-avx512 - binaries: x86-64-avx512
@@ -62,6 +92,14 @@ jobs:
config: { os: macos-13 } config: { os: macos-13 }
- binaries: x86-64-vnni512 - binaries: x86-64-vnni512
config: { os: macos-13 } config: { os: macos-13 }
# Apple silicon from windows, macos-13 and ubuntu
- binaries: apple-silicon
config: { os: windows-2022 }
- binaries: apple-silicon
config: { os: macos-13 }
- binaries: apple-silicon
config: { os: ubuntu-20.04 }
defaults: defaults:
run: run:
working-directory: src working-directory: src
@@ -26,6 +26,12 @@ jobs:
compiler: clang++ compiler: clang++
comp: clang comp: clang
shell: bash shell: bash
- name: MacOS 14 Apple Clang M1
os: macos-14
compiler: clang++
comp: clang
shell: bash
m1: true
- name: MacOS 13 GCC 11 - name: MacOS 13 GCC 11
os: macos-13 os: macos-13
compiler: g++-11 compiler: g++-11
@@ -75,26 +81,37 @@ jobs:
# x86-64 with newer extensions tests # x86-64 with newer extensions tests
- name: Compile x86-64-avx2 build - name: Compile x86-64-avx2 build
if: ${{ ! matrix.config.m1 }}
run: | run: |
make clean make clean
make -j2 ARCH=x86-64-avx2 build make -j2 ARCH=x86-64-avx2 build
- name: Compile x86-64-bmi2 build - name: Compile x86-64-bmi2 build
if: ${{ ! matrix.config.m1 }}
run: | run: |
make clean make clean
make -j2 ARCH=x86-64-bmi2 build make -j2 ARCH=x86-64-bmi2 build
- name: Compile x86-64-avx512 build - name: Compile x86-64-avx512 build
if: ${{ ! matrix.config.m1 }}
run: | run: |
make clean make clean
make -j2 ARCH=x86-64-avx512 build make -j2 ARCH=x86-64-avx512 build
- name: Compile x86-64-vnni512 build - name: Compile x86-64-vnni512 build
if: ${{ ! matrix.config.m1 }}
run: | run: |
make clean make clean
make -j2 ARCH=x86-64-vnni512 build make -j2 ARCH=x86-64-vnni512 build
- name: Compile x86-64-vnni256 build - name: Compile x86-64-vnni256 build
if: ${{ ! matrix.config.m1 }}
run: | run: |
make clean make clean
make -j2 ARCH=x86-64-vnni256 build make -j2 ARCH=x86-64-vnni256 build
- name: Compile apple-silicon build
if: matrix.config.m1
run: |
make clean
make -j2 ARCH=apple-silicon build
+16 -2
View File
@@ -43,7 +43,7 @@ jobs:
compiler: g++ compiler: g++
comp: gcc comp: gcc
run_riscv64_tests: true run_riscv64_tests: true
base_image: 'riscv64/alpine:edge' base_image: "riscv64/alpine:edge"
platform: linux/riscv64 platform: linux/riscv64
shell: bash shell: bash
- name: Linux GCC ppc64 - name: Linux GCC ppc64
@@ -51,7 +51,7 @@ jobs:
compiler: g++ compiler: g++
comp: gcc comp: gcc
run_ppc64_tests: true run_ppc64_tests: true
base_image: 'ppc64le/alpine:latest' base_image: "ppc64le/alpine:latest"
platform: linux/ppc64le platform: linux/ppc64le
shell: bash shell: bash
- name: MacOS 13 Apple Clang - name: MacOS 13 Apple Clang
@@ -60,6 +60,13 @@ jobs:
comp: clang comp: clang
run_64bit_tests: true run_64bit_tests: true
shell: bash shell: bash
- name: MacOS 14 Apple Clang M1
os: macos-14
compiler: clang++
comp: clang
run_64bit_tests: false
run_m1_tests: true
shell: bash
- name: MacOS 13 GCC 11 - name: MacOS 13 GCC 11
os: macos-13 os: macos-13
compiler: g++-11 compiler: g++-11
@@ -281,6 +288,13 @@ jobs:
make -j2 ARCH=general-64 build make -j2 ARCH=general-64 build
../tests/signature.sh $benchref ../tests/signature.sh $benchref
- name: Test apple-silicon build
if: matrix.config.run_m1_tests
run: |
make clean
make -j2 ARCH=apple-silicon build
../tests/signature.sh $benchref
# armv8 tests # armv8 tests
- name: Test armv8 build - name: Test armv8 build