diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 7ab1b4d..115f1e2 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -23,19 +23,28 @@ jobs: # # To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, ubuntu-24.04-arm, windows-11-arm] build_type: [Release] c_compiler: [gcc, clang, cl] include: - - os: windows-latest - c_compiler: cl - cpp_compiler: cl - os: ubuntu-latest c_compiler: gcc cpp_compiler: g++ - - os: ubuntu-latest - c_compiler: clang - cpp_compiler: clang++ + arch: x86_64 + - os: ubuntu-24.04-arm + c_compiler: gcc + cpp_compiler: g++ + arch: arm64 + - os: windows-latest + c_compiler: cl + cpp_compiler: cl + arch: x86_64 + vs_arch: x64 + - os: windows-11-arm + c_compiler: cl + cpp_compiler: cl + arch: arm64 + vs_arch: ARM64 exclude: - os: windows-latest c_compiler: gcc @@ -57,12 +66,18 @@ jobs: - 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 }} + run: | + GEN="" + if [[ "${{ runner.os }}" == "Windows" ]]; then + GEN="-A ${{ matrix.vs_arch }}" + fi + + 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 }} \ + $GEN \ + -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).