This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
signal-wrangler/.github/workflows/build-and-test.yml

52 lines
1.3 KiB
YAML

on: [push, pull_request]
jobs:
build:
strategy:
matrix:
compiler: [g++, clang++]
build_type: [Release, Debug]
name: Build and run tests (${{ matrix.compiler }}, ${{ matrix.build_type }})
timeout-minutes: 10
runs-on: ubuntu-20.04
env:
CXX: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2
with:
repository: catchorg/Catch2
ref: v2.x
path: catch
- name: Install catch
working-directory: catch
run: >
mkdir build
&& cd build
&& cmake -DCMAKE_BUILD_TYPE=Release -DCATCH_BUILD_TESTING=Off ..
&& sudo make install
- name: Info
run: cmake --version && $CXX --version && uname -a
- name: Build
run: >
mkdir -p build
&& cd build
&& cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
&& make
- name: Build Test
run: cd build && make sgnl-test
- name: Run Test
run: ./build/test/sgnl-test
- name: Build example
run: >
cd build
&& make example
- name: Run example
run: ./build/example
- name: Install signal-wrangler
run: cd build && sudo make install
- name: Test install
run: >
cd example
&& $CXX -std=c++17 -Wall -pthread -o example example.cpp
&& ./example