mirror of
https://github.com/jhasse/poly2tri.git
synced 2024-11-26 15:26:12 +01:00
7125fdb13b
- Building unit tests is optional, disabled by default to prevent the library clients from pulling the dependency on boost - Add the unit tests to the Github Actions. - Use boost::filesystem to manipulate paths for better portability
35 lines
810 B
YAML
35 lines
810 B
YAML
name: Linux
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
release:
|
|
types: published
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [ubuntu-latest]
|
|
container:
|
|
image: fedora:32
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Install dependencies
|
|
run: dnf install -yq cmake ninja-build gcc-c++ clang-tools-extra python3-PyYAML boost-devel
|
|
|
|
- name: Build with GCC
|
|
run: |
|
|
cmake -Bbuild -GNinja -DP2T_BUILD_TESTS=ON
|
|
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
|
|
|
|
- name: Unit tests
|
|
run: cd build && ctest --output-on-failure
|