Skip to content

added conan2 recipe (#8) #289

added conan2 recipe (#8)

added conan2 recipe (#8) #289

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: { python-version: "3.8" }
- name: Install codespell
run: pip3 install codespell
- name: Get clang-format-15
run: sudo apt update && sudo apt install clang-format-15
- name: Lint
run: cmake -D FORMAT_COMMAND=clang-format-15 -P cmake/lint.cmake
- name: Spell check
if: always()
run: cmake -P cmake/spell.cmake
coverage:
needs: [lint]
runs-on: ubuntu-22.04
if: github.ref == 'refs/heads/main' && github.repository_owner == 'conorwilliams' && github.event_name == 'push'
steps:
- uses: actions/checkout@v3
- name: Install LCov
run: sudo apt-get update -q && sudo apt-get install lcov -q -y
- name: Configure
run: cmake --preset=ci-coverage
- name: Build
run: cmake --build build/coverage -j 2
- name: Test
working-directory: build/coverage
run: ctest --output-on-failure -j 2
- name: Process coverage info
run: cmake --build build/coverage -t coverage
- name: Submit to codecov.io
uses: codecov/codecov-action@v3
with:
file: build/coverage/coverage.info
sanitize-clang:
needs: [lint]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install openMP
run: sudo apt update && sudo apt install clang-15 libomp-dev -y
- name: Configure
env: { CXX: clang++-15 }
run: cmake --preset=ci-sanitize
- name: Build
run: cmake --build build/sanitize -j 2
- name: Test
working-directory: build/sanitize
env:
ASAN_OPTIONS: "strict_string_checks=1:\
detect_stack_use_after_return=1:\
check_initialization_order=1:\
strict_init_order=1:\
detect_leaks=1"
UBSAN_OPTIONS: print_stacktrace=1
run: ctest --output-on-failure -j 2
test:
needs: [lint]
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
# macos-12, windows-2022
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install static analyzers
if: matrix.os == 'ubuntu-22.04'
run: >-
sudo apt-get install clang-tidy-15 cppcheck -y -q
sudo update-alternatives --install
/usr/bin/clang-tidy clang-tidy
/usr/bin/clang-tidy-15 140
- name: Setup MultiToolTask
if: matrix.os == 'windows-2022'
run: |
Add-Content "$env:GITHUB_ENV" 'UseMultiToolTask=true'
Add-Content "$env:GITHUB_ENV" 'EnforceProcessCountAcrossBuilds=true'
- name: Configure
shell: pwsh
run: cmake "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
- name: Build
run: cmake --build build --config Release -j 2
- name: Install
run: cmake --install build --config Release --prefix prefix
- name: Test
working-directory: build
run: ctest --output-on-failure -C Release -j 2
docs:
# Deploy docs only when builds succeed
needs: [sanitize-clang, test]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: { python-version: "3.8" }
- name: Install python dependencies
run: pip3 install -r docs/requirements.txt
- name: Install Doxygen
run: sudo apt-get update -q
&& sudo apt-get install doxygen -q -y
- name: Configure docs
run: cmake -S ./docs -B build/docs
- name: Build docs
run: cmake --build build/docs
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/docs/sphinx
if: github.ref == 'refs/heads/main' && github.repository_owner == 'conorwilliams' && github.event_name == 'push'