Skip to content

Commit f3e157d

Browse files
committed
⚙️ ci: add linux and windows workflows
1 parent fc71964 commit f3e157d

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/linux.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: linux
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
jobs:
6+
cmake:
7+
strategy:
8+
matrix:
9+
configuration: [Debug, Release]
10+
compiler-c: [gcc, clang]
11+
include:
12+
- compiler-c: gcc
13+
compiler-cxx: g++
14+
- compiler-c: clang
15+
compiler-cxx: clang++
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: true
21+
- name: Compiler version
22+
run: |
23+
${{ matrix.compiler-c }} --version
24+
${{ matrix.compiler-cxx }} --version
25+
- name: Configure project
26+
run: cmake -B intermediate -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -D CMAKE_C_COMPILER=${{ matrix.compiler-c }} -D CMAKE_CXX_COMPILER=${{ matrix.compiler-cxx }}
27+
- name: Build
28+
run: cmake --build intermediate --config=${{ matrix.configuration }}

.github/workflows/windows.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: windows
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
jobs:
6+
msbuild:
7+
strategy:
8+
matrix:
9+
configuration: [Debug, Release]
10+
toolset: [v143, ClangCL]
11+
runs-on: windows-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
submodules: true
16+
- uses: microsoft/setup-msbuild@v2
17+
- name: Build
18+
run: msbuild examples.sln /p:Platform=x64 /p:Configuration=${{ matrix.configuration }} /p:PlatformToolset=${{ matrix.toolset }}
19+
cmake:
20+
strategy:
21+
matrix:
22+
configuration: [Debug, Release]
23+
toolset: [v143, ClangCL]
24+
runs-on: windows-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
- uses: microsoft/setup-msbuild@v2
30+
- name: Configure project
31+
run: cmake -B intermediate -D CMAKE_BUILD_TYPE=${{ matrix.configuration }} -T ${{ matrix.toolset }}
32+
- name: Build
33+
run: cmake --build intermediate --config=${{ matrix.configuration }}

0 commit comments

Comments
 (0)