forked from staticlibs/ccronexpr
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (50 loc) · 1.4 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
name: Build
on:
push:
paths-ignore: [ "*.md" ]
pull_request:
paths-ignore: [ "*.md" ]
env:
BUILD_TYPE: Debug
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
cron_use_local_time:
- ""
- "-DCRON_USE_LOCAL_TIME=1"
char_c_flag:
- ""
- "-fsigned-char"
- "-funsigned-char"
exclude:
- os: ubuntu-latest
char_c_flag: ""
- os: windows-latest
char_c_flag: "-fsigned-char"
- os: windows-latest
char_c_flag: "-funsigned-char"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCRON_TEST_MALLOC=1 ${{ matrix.cron_use_local_time }}
env:
CFLAGS: ${{ matrix.char_c_flag }}
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest --extra-verbose -C $BUILD_TYPE