Skip to content

Commit

Permalink
Enhance CI workflow in cmake.yml to support ARM64 architecture on Win…
Browse files Browse the repository at this point in the history
…dows. Added new matrix configurations for C++ versions 11 and 20 with ARM64 architecture. Updated CMake configuration step to conditionally set the architecture based on the matrix value, improving build flexibility for different platforms.
  • Loading branch information
yanyiwu committed Jan 18, 2025
1 parent 016fc17 commit 66e2d24
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
windows-2022,
]
cpp_version: [11, 14, 17, 20]
include:
- os: windows-2022
cpp_version: 11
arch: ARM64
- os: windows-2022
cpp_version: 20
arch: ARM64

steps:
- name: Check out repository code
Expand All @@ -33,10 +40,13 @@ jobs:
submodules: recursive

- 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 ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
shell: bash
run: |
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
cmake -B ${{github.workspace}}/build -A ARM64 -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
else
cmake -B ${{github.workspace}}/build -DBUILD_TESTING=ON -DCMAKE_CXX_STANDARD=${{matrix.cpp_version}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
fi
- name: Build
# Build your program with the given configuration
Expand Down

0 comments on commit 66e2d24

Please sign in to comment.