2024-05-23 22:18:22 +02:00
|
|
|
name: matrix (ubuntu, macos, windows) ctes
|
2022-03-08 04:44:29 +01:00
|
|
|
on:
|
|
|
|
push:
|
2022-05-24 22:16:31 +02:00
|
|
|
paths-ignore:
|
2022-05-24 01:43:29 +02:00
|
|
|
- docs/**
|
2024-05-23 22:18:22 +02:00
|
|
|
- "**.md"
|
|
|
|
- "**.markdown"
|
|
|
|
branches:
|
|
|
|
- master
|
2022-03-08 04:44:29 +01:00
|
|
|
pull_request:
|
2022-05-24 22:19:27 +02:00
|
|
|
paths-ignore:
|
|
|
|
- docs/**
|
2024-05-23 22:18:22 +02:00
|
|
|
- "**.md"
|
|
|
|
- "**.markdown"
|
|
|
|
- '**.yml'
|
|
|
|
branches:
|
|
|
|
- master
|
2021-04-09 05:53:46 +02:00
|
|
|
env:
|
|
|
|
BUILD_TYPE: Release
|
2022-03-09 04:42:02 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2021-04-09 05:53:46 +02:00
|
|
|
jobs:
|
|
|
|
build:
|
2022-03-09 04:42:02 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-05-23 22:18:22 +02:00
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
- windows-latest
|
2022-03-09 04:42:02 +01:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-04-09 05:53:46 +02:00
|
|
|
steps:
|
2024-05-23 22:18:22 +02:00
|
|
|
# checkout full depth of history.
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-03-09 04:42:02 +01:00
|
|
|
|
2024-05-23 22:18:22 +02:00
|
|
|
- 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
|
2024-08-28 05:15:19 +02:00
|
|
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DADD_G3LOG_UNIT_TEST=ON
|
2021-04-09 05:53:46 +02:00
|
|
|
|
2024-05-23 22:18:22 +02:00
|
|
|
- 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
|
2023-02-04 12:37:13 +01:00
|
|
|
|
2024-08-28 05:23:51 +02:00
|
|
|
- name: Test
|
2024-08-28 05:15:19 +02:00
|
|
|
working-directory: ${{github.workspace}}/build
|
|
|
|
shell: bash
|
|
|
|
run: ctest -V
|
2024-05-23 22:18:22 +02:00
|
|
|
|
|
|
|
- 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"
|