-
Notifications
You must be signed in to change notification settings - Fork 32
86 lines (71 loc) · 2.28 KB
/
cmake.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
# Copyright 2021-Present Couchbase, Inc.
#
# Use of this software is governed by the Business Source License included in
# the file licenses/BSL-Couchbase.txt. As of the Change Date specified in that
# file, in accordance with the Business Source License, use of this software
# will be governed by the Apache License, Version 2.0, included in the file
# licenses/APL2.txt.
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: Debug
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
#### BUILD
- name: Create Build Environment
# Create a build directory, as our working directory for all subsequent commands
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
if: runner.os != 'Windows'
working-directory: ${{github.workspace}}/build
run: cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFLEECE_SANITIZE=ON
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
working-directory: ${{github.workspace}}/build
run: cmake .. -A x64 -DFLEECE_SANITIZE=ON
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
#### TEST
- name: Install French Locale On Linux
if: runner.os == 'Linux'
shell: bash
# One of the tests below needs the French locale installed.
run: sudo localedef -v -c -i fr_FR -f UTF-8 fr_FR
- name: Test
if: runner.os != 'Windows'
working-directory: ${{github.workspace}}/build
shell: bash
run: |
set -e
cmake --build . --config Debug --target FleeceTests
cd ..
build/FleeceTests -r list 2>&1
- name: Test On Windows
if: runner.os == 'Windows'
working-directory: ${{github.workspace}}/build
shell: bash
run: |
set -e
cmake --build . --config Debug --target FleeceTests
mkdir -p /c/tmp
Debug/FleeceTests.exe -r list 2>&1