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

58 lines
1.5 KiB
YAML
Raw Normal View History

2020-07-18 06:21:44 +08:00
on: [push, pull_request]
jobs:
build:
2020-08-01 20:28:24 +08:00
strategy:
matrix:
compiler: [g++, clang++]
build_type: [Release, Debug]
name: Build and run tests (${{ matrix.compiler }}, ${{ matrix.build_type }})
2020-07-18 07:26:08 +08:00
timeout-minutes: 10
2020-07-18 06:21:44 +08:00
runs-on: ubuntu-20.04
env:
2020-08-01 20:28:24 +08:00
CXX: ${{ matrix.compiler }}
2020-07-18 06:21:44 +08:00
steps:
- name: Install clang++-12
if: ${{ matrix.compiler == 'clang++' }}
uses: KyleMayes/install-llvm-action@v1.3.0
with:
version: "12.0.0"
directory: ${{ runner.temp }}/llvm
2021-05-18 08:40:04 +08:00
- name: Info
run: cmake --version && $CXX --version && uname -a
2020-07-18 06:21:44 +08:00
- 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: Build
2020-07-18 06:21:44 +08:00
run: >
mkdir -p build
2020-07-18 06:21:44 +08:00
&& cd build
&& cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ..
2020-07-18 06:21:44 +08:00
&& make
- name: Build Test
run: cd build && make sgnl-test
- name: Run Test
run: ./build/test/sgnl-test
- name: Build example
run: >
cd build
2020-07-18 06:21:44 +08:00
&& make example
- name: Run example
run: ./build/example
- name: Install signal-wrangler
2020-07-18 07:34:42 +08:00
run: cd build && sudo make install
- name: Test install
2020-07-18 07:34:42 +08:00
run: >
cd example
2020-07-18 06:21:44 +08:00
&& $CXX -std=c++17 -Wall -pthread -o example example.cpp
&& ./example