feat: add macos arm64 workflow

This commit is contained in:
2025-06-23 00:17:18 +02:00
parent 3689638ba0
commit 5599dfc0ab

View File

@@ -10,7 +10,6 @@ on:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
@@ -22,36 +21,29 @@ jobs:
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# other: arm64: windows and linux
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
build_type: [Release]
include:
- os: ubuntu-latest
- os: macos-latest
arch: arm64
c_compiler: clang
cpp_compiler: clang++
arch: x86_64
name: Linux Clang x86_64
- os: ubuntu-24.04-arm
c_compiler: gcc
cpp_compiler: g++
arch: arm64
name: Linux GCC ARM64
name: macOS Clang arm64
- os: windows-latest
arch: x86_64
c_compiler: cl
cpp_compiler: cl
arch: x86_64
vs_arch: x64
name: Windows MSVC x64
- os: windows-11-arm
c_compiler: cl
cpp_compiler: cl
arch: arm64
vs_arch: ARM64
name: Windows MSVC ARM64
- os: ubuntu-latest
arch: x86_64
c_compiler: gcc
cpp_compiler: g++
name: Linux GCC x86_64
steps:
- uses: actions/checkout@v4
@@ -61,18 +53,15 @@ jobs:
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
- name: Build
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}