-
-
Notifications
You must be signed in to change notification settings - Fork 3
104 lines (98 loc) · 2.68 KB
/
build.yml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Build
on:
push:
paths-ignore:
- 'docs/**'
- '.github/ISSUE_TEMPLATE/**'
- '.github/*.yml'
- 'LICENSE.txt'
- '*.md'
- '*.sh'
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
CTEST_OUTPUT_ON_FAILURE: 1
jobs:
ubuntu_linux:
name: "Ubuntu Linux 22.04"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: "ccache-ubuntu_2204"
max-size: 256M
- name: set environment variables
id: set_vars
run: ./scripts/ci-set-vars.sh
env:
REPOSITORY: ${{ github.event.repository.name }}
- name: "install dependencies"
run: |
set -ex
sudo apt -q update
sudo ./scripts/install-deps.sh
- name: "cmake"
run: cmake -S . -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo"
- name: "build"
run: cmake --build build/ -- -j3
osx:
name: "OS/X"
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: "**/cpm_modules"
key: ${{github.workflow}}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }}
- name: set variables
id: set_vars
run: ./scripts/ci-set-vars.sh
env:
REPOSITORY: ${{ github.event.repository.name }}
- name: "Install dependencies"
run: |
set -ex
#brew update
./scripts/install-deps.sh
- name: "Create build directory"
run: mkdir build
- name: "Generate build files"
run: cmake -S . -B build -DCMAKE_BUILD_TYPE="RelWithDebInfo"
- name: "Build"
run: cmake --build build/
windows:
name: "Windows"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: setup environment
shell: powershell
id: set_vars
run: .\scripts\ci-set-vars.ps1
env:
REPOSITORY: ${{ github.event.repository.name }}
- name: "vcpkg: Install dependencies"
uses: lukka/[email protected]
id: runvcpkg
with:
vcpkgDirectory: ${{ runner.workspace }}/vcpkg/
vcpkgGitCommitId: 3e93bb69a1cadeb36fe9eca3b6f3912d84f618d5
- name: "create build directory"
shell: powershell
run: |
If (!(Test-Path build))
{
New-Item -ItemType Directory -Force -Path build
}
- name: "Generate build files"
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="${{ runner.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_TARGET_TRIPLET=x64-windows -B build .
- name: "Build"
run: cmake --build build/ --config Release