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: jobs:
build: build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
@@ -22,36 +21,29 @@ jobs:
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator> # 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> # 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. # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix: matrix:
build_type: [Release]
include: include:
- os: ubuntu-latest - os: macos-latest
arch: arm64
c_compiler: clang c_compiler: clang
cpp_compiler: clang++ cpp_compiler: clang++
arch: x86_64 name: macOS Clang arm64
name: Linux Clang x86_64
- os: ubuntu-24.04-arm
c_compiler: gcc
cpp_compiler: g++
arch: arm64
name: Linux GCC ARM64
- os: windows-latest - os: windows-latest
arch: x86_64
c_compiler: cl c_compiler: cl
cpp_compiler: cl cpp_compiler: cl
arch: x86_64
vs_arch: x64 vs_arch: x64
name: Windows MSVC x64 name: Windows MSVC x64
- os: windows-11-arm - os: ubuntu-latest
c_compiler: cl arch: x86_64
cpp_compiler: cl c_compiler: gcc
arch: arm64 cpp_compiler: g++
vs_arch: ARM64 name: Linux GCC x86_64
name: Windows MSVC ARM64
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -61,18 +53,15 @@ jobs:
shell: bash shell: bash
run: | run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Configure CMake - 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. # 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 # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: > run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} -DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }} -S ${{ github.workspace }}
- name: Build - 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). # 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 }} run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}