2020-05-05 13:29:33 +02:00
|
|
|
name: Linux
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
release:
|
|
|
|
types: published
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: [ubuntu-latest]
|
|
|
|
container:
|
|
|
|
image: fedora:32
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-07-14 18:16:18 +02:00
|
|
|
|
2020-05-05 13:29:33 +02:00
|
|
|
- name: Install dependencies
|
2020-07-14 18:16:18 +02:00
|
|
|
run: dnf install -yq cmake ninja-build gcc-c++ clang-tools-extra python3-PyYAML boost-devel
|
2020-05-05 13:29:33 +02:00
|
|
|
|
|
|
|
- name: Build with GCC
|
|
|
|
run: |
|
2020-07-14 18:16:18 +02:00
|
|
|
cmake -Bbuild -GNinja -DP2T_BUILD_TESTS=ON
|
2020-05-05 13:29:33 +02:00
|
|
|
cmake --build build
|
|
|
|
|
|
|
|
- name: Build with Clang
|
|
|
|
run: |
|
|
|
|
CXX=clang++ cmake -Bbuild-clang -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=1
|
|
|
|
cmake --build build-clang
|
|
|
|
|
|
|
|
- name: Lint with clang-tidy
|
|
|
|
run: python3 /usr/share/clang/run-clang-tidy.py -header-filter=poly2tri -p=build-clang
|
2020-07-14 18:16:18 +02:00
|
|
|
|
|
|
|
- name: Unit tests
|
|
|
|
run: cd build && ctest --output-on-failure
|