-
Notifications
You must be signed in to change notification settings - Fork 272
88 lines (78 loc) · 2.77 KB
/
ctest.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: matrix (ubuntu, macos, windows) ctes
on:
push:
paths-ignore:
- docs/**
- "**.md"
- "**.markdown"
branches:
- master
pull_request:
paths-ignore:
- docs/**
- "**.md"
- "**.markdown"
- '**.yml'
branches:
- master
env:
BUILD_TYPE: Release
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
# checkout full depth of history.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run Linux Build
if: matrix.os == 'ubuntu-latest'
run: echo "Ubuntu Latest" > release_ubuntu
- name: Run Mac Build
if: matrix.os == 'macos-latest'
run: echo "MacOS Latest" > release_mac
- name: Run Windows Build
if: matrix.os == 'windows-latest'
run: echo "Windows Latest" > release_windows
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Configure Linux/OSX CMake
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
-DADD_G3LOG_UNIT_TEST=ON
- name: Configure Windows CMake
if: matrix.os == 'windows-latest'
shell: cmd
working-directory: ${{github.workspace}}/build
run: ls && cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DADD_G3LOG_UNIT_TEST=ON ..
- name: Build Linux/OSx
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -C $BUILD_TYP
- name: Fatal Exit Example Linux/OSX
working-directory: ${{github.workspace}}/build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
shell: bash
run: ./g3log-FATAL-sigsegv || true && echo -e
"\n\nverifying SIGSEGV existed in stackdump\n\n\n\n" && cat /tmp/*3log*FATAL*.log && cat /tmp/g3log*FATAL*.log | grep "SIGSEGV"
- name: Fatal Exit Example Windows
working-directory: ${{github.workspace}}/build
if: matrix.os == 'windows-latest'
shell: bash
run: ./Release/g3log-FATAL-sigsegv.exe || true && echo -e "\n\nverifying SIGSEGV - EXCEPTION_ACCESS_VIOLATION existed in
stackdump\n\n\n\n" && cat *3log*FATAL*.log && cat *3log*FATAL*.log | grep "EXCEPTION_ACCESS_VIOLATION"