-
Notifications
You must be signed in to change notification settings - Fork 63
88 lines (73 loc) · 2.77 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
name: Build And Test
on:
push:
branches:
- master
- dev
- 'release/*'
pull_request:
branches:
- '**'
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-cblite:
# Build on Ubuntu Linux + GCC, macOS + Apple Clang, Windows + MSVC.
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
#### BUILD CBLITE
- name: Create Build Environment
# Create a build directory, as our working directory for all subsequent commands
working-directory: ${{github.workspace}}/cblite
run: cmake -E make_directory ${{github.workspace}}/cblite/build
- name: Configure CMake
# "Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12"
if: runner.os != 'Windows'
working-directory: ${{github.workspace}}/cblite/build
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Configure CMake (Windows)
# "Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12"
if: runner.os == 'Windows'
working-directory: ${{github.workspace}}/cblite/build
run: cmake .. -A x64
- name: Build
# Use cmake to build -- this will invoke `make` on Linux/Mac, Visual Studio on Windows.
working-directory: ${{github.workspace}}/cblite/build
run: cmake --build . --config $env:BUILD_TYPE
build-cbllog:
# Same as cblite, but for cbl-log
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Create Build Environment
working-directory: ${{github.workspace}}/cbl-log
run: cmake -E make_directory ${{github.workspace}}/cbl-log/build
- name: Configure CMake
if: runner.os != 'Windows'
working-directory: ${{github.workspace}}/cbl-log/build
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
working-directory: ${{github.workspace}}/cbl-log/build
run: cmake .. -A x64
- name: Build
working-directory: ${{github.workspace}}/cbl-log/build
run: cmake --build . --config $env:BUILD_TYPE