-
-
Notifications
You must be signed in to change notification settings - Fork 33
67 lines (55 loc) · 1.98 KB
/
Copy pathbuild.yml
File metadata and controls
67 lines (55 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Build & Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
# nothing here
jobs:
build:
name: 'Build (${{matrix.build_type}}, ${{matrix.os}})'
strategy:
fail-fast: false
matrix:
build_type: [Debug, Release]
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout Repository
uses: actions/checkout@v7
- name: Set up MSVC [Windows]
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Configure CMake (C++)
run: cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSOURCEPP_BUILD_TESTS=ON
- name: Build (C++)
run: cmake --build build --config ${{matrix.build_type}}
- name: Test (C++)
working-directory: '${{github.workspace}}/build'
run: ctest
- name: Configure CMake (C)
run: cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSOURCEPP_BUILD_C_WRAPPERS=ON
- name: Build (C)
run: cmake --build build --config ${{matrix.build_type}}
- name: Setup .NET Core
if: matrix.os != 'windows-latest'
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
9
10
- name: Configure CMake (C#)
if: matrix.os != 'windows-latest'
run: cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSOURCEPP_BUILD_CSHARP_WRAPPERS=ON
- name: Build (C#)
if: matrix.os != 'windows-latest'
run: |
cmake --build build --config ${{matrix.build_type}}
dotnet build lang/csharp --configuration Release
- name: Configure CMake (Python)
run: cmake -G "Ninja" -B build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSOURCEPP_BUILD_PYTHON_WRAPPERS=ON
- name: Build (Python)
working-directory: '${{github.workspace}}/lang/python'
run: |
pipx run build --sdist