added a simple cmake installation #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
permissions: write-all | |
name: ${{ matrix.platform.name }} ${{ matrix.config.name }} | |
runs-on: ${{ matrix.platform.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { name: Linux Clang, os: ubuntu-latest, admin: sudo, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ } | |
- { name: Windows VS2019, os: windows-2019 } | |
- { name: Windows VS2022, os: windows-2022 } | |
- { name: MacOS XCode, os: macos-latest } | |
- { name: Linux GCC, os: ubuntu-latest, admin: sudo } | |
config: | |
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE } | |
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE } | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Configure project | |
run: mkdir build && cmake -S . -B build | |
- name: Install Header Library | |
run: ${{ matrix.platform.admin }} cmake --install build --config Release | |
- name: Compile Test Executable | |
run: cmake --build build --config Release | |
- name: Run Test Executable | |
run: ./build/tests-cmake.out |