Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Add new depreciation notice #86

Add new depreciation notice

Add new depreciation notice #86

Workflow file for this run

# SPDX-FileCopyrightText: 2022 Daniel Valcour <[email protected]>
#
# SPDX-License-Identifier: MIT
name: Tests
on: [push, workflow_dispatch]
jobs:
build:
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- {
Name: Windows Latest,
os: windows-latest,
cc: cl.exe,
cxx: cl.exe,
arch: "x64-windows",
}
- {
Name: Linux GCC,
os: ubuntu-latest,
cc: gcc-10,
cxx: g++-10,
arch: "x64-linux",
}
- {
Name: Linux Clang,
os: ubuntu-latest,
cc: clang-12,
cxx: clang++-12,
arch: "x64-linux",
}
- {
Name: MacOS Clang,
os: macos-latest,
cc: clang,
cxx: clang++,
arch: "x64-osx",
}
build_type: [Release, Debug]
env:
buildDir: '${{ github.workspace }}\build'
CXX: ${{ matrix.platform.cxx }}
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: log CMake version
shell: bash
run: cmake --version
- name: create build enviornment
shell: bash
working-directory: ${{ github.workspace }}
run: cmake -E make_directory $GITHUB_WORKSPACE/build
- name: add vcpkg submodule
shell: bash
working-directory: ${{ github.workspace }}
run: git submodule add https://github.com/microsoft/vcpkg
- name: xcode update
if: ${{ runner.os == 'macOS' }}
run: softwareupdate --install -a
- name: apt update
if: ${{ runner.os == 'Linux' }}
shell: bash
run: sudo apt-get update
- name: archive vcpkg packages in cache
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/vcpkg/downloads/
key: ${{ runner.os }}-vcpkg-downloads-${{ matrix.platform.os }}-${{ github.sha }}
restore-keys:
${{ runner.os }}-vcpkg-downloads-${{ matrix.platform.os }}-
${{ runner.os }}-vcpkg-downloads-
- name: bootstrap vcpkg
shell: bash
working-directory: ${{ github.workspace }}/vcpkg/
run: ./bootstrap-vcpkg.sh -disableMetrics
- name: install vcpkg packages
shell: bash
working-directory: ${{ github.workspace }}/vcpkg/
run: ./vcpkg install catch2 --triplet ${{ matrix.platform.arch }}
- name: list packages in vcpkg
shell: bash
working-directory: ${{ github.workspace }}/vcpkg/
run: ./vcpkg list
- name: build tests with CMake
shell: bash
working-directory: ${{ github.workspace }}
run: |
cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DMPBP_BUILD_TESTS=ON -DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/vcpkg/scripts/buildsystems/vcpkg.cmake -DMPBP_BUILD_DOCUMENTATION=OFF
cmake --build $GITHUB_WORKSPACE/build --config ${{ matrix.build_type }}
continue-on-error: true
- name: run the tests
shell: bash
working-directory: ${{ github.workspace }}/build/test/
run: ctest -C ${{ matrix.build_type }}
continue-on-error: true
- name: JUnit report
uses: mikepenz/[email protected]
with:
report_paths: "**/unittests.*.xml"
require_tests: true
fail_on_failure: true
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: vcpkg-logs
path: ${{ github.workspace }}/vcpkg/buildtrees/*/*.log