-
-
Notifications
You must be signed in to change notification settings - Fork 88
80 lines (74 loc) · 2.28 KB
/
build.yml
File metadata and controls
80 lines (74 loc) · 2.28 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
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CMake on multiple platforms
on:
push:
workflow_dispatch:
inputs:
test_linux:
description: 'Test on Linux'
type: boolean
default: true
test_macos:
description: 'Test on MacOS'
type: boolean
default: true
test_windows:
description: 'Test on Windows'
type: boolean
default: true
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
config:
- {
name: "Windows Latest MSVC",
os: windows-latest,
build_type: "Release",
cc: "cl",
cxx: "cl",
generators: "Visual Studio 16 2019"
}
- {
name: "Ubuntu_Latest",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc",
cxx: "g++",
generators: "Ninja"
}
- {
name: "macOS Latest",
os: macos-latest,
build_type: "Release",
cc: "clang",
cxx: "clang++",
generators: "Ninja"
}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: Print env
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}
- name: Setting MSBuild on windows
if: startsWith(matrix.config.os, 'windows')
uses: microsoft/setup-msbuild@v2
- name: Build on windows
if: startsWith(matrix.config.os, 'windows')
run: |
mkdir ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
cmake ${{ github.workspace }}
MSBuild DTL.sln /p:Configuration=${{ matrix.config.build_type }}
- name: Build on ${{ matrix.config.os }}
if: ${{ !startsWith(matrix.config.os, 'windows') }}
run: |
mkdir ${{ github.workspace }}/build
cd ${{ github.workspace }}/build
cmake ${{ github.workspace }}
make ci