Skip to content

Commit 5353626

Browse files
Added the macOS and windows support (#89)
I'll merge and test on main.
1 parent b011ee4 commit 5353626

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/cmake-multi-platform.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ jobs:
3434
- os: ubuntu-latest
3535
c_compiler: clang
3636
cpp_compiler: clang++
37+
38+
# Added macOS and Windows support installation media
39+
- os: macos-latest
40+
c_compiler: clang
41+
cpp_compiler: clang++
42+
- os: windows-latest
43+
c_compiler: cl
44+
cpp_compiler: cl
3745

3846
steps:
3947
- uses: actions/checkout@v4
@@ -48,6 +56,12 @@ jobs:
4856
echo "project-root-dir=${{ github.workspace }}/inflection" >> "$GITHUB_OUTPUT"
4957
echo "build-output-dir=${{ github.workspace }}/inflection/build" >> "$GITHUB_OUTPUT"
5058
59+
- name: Set Up MSVC (Windows Only)
60+
if: matrix.os == 'windows-latest'
61+
shell: cmd
62+
run: |
63+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
64+
5165
- name: Configure CMake
5266
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
5367
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
@@ -58,6 +72,9 @@ jobs:
5872
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
5973
-S ${{ steps.strings.outputs.project-root-dir }}
6074
75+
# To check if it is windows or not
76+
${{ matrix.os == 'windows-latest' && '-G "Visual Studio 17 2022"' || '' }}
77+
6178
- name: Get number of CPU cores
6279
uses: SimenB/github-actions-cpu-cores@v2
6380
id: cpu-cores

0 commit comments

Comments
 (0)