minor concepts fixes #901
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI v2 | |
on: | |
push: | |
branches: | |
- v2 | |
pull_request: | |
branches: | |
- v2 | |
jobs: | |
sanitize: | |
strategy: | |
matrix: | |
sanitizer: ["tsan", "asan", "lsan", "ubsan"] | |
name: Sanitize - ${{ matrix.sanitizer }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
# Work around https://github.com/actions/runner-images/issues/8659 | |
- name: "Remove GCC 13 from runner image (workaround)" | |
shell: bash | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list | |
sudo apt-get update | |
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.5 libc6-dev=2.35-0ubuntu3.5 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04 | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ci-sanitize-${{ matrix.sanitizer }} | |
buildPreset: ci-build | |
testPreset: ci-sanitize | |
tests: | |
strategy: | |
matrix: | |
config: [{name: ci-ubuntu-gcc, os: ubuntu-latest}, | |
{name: ci-ubuntu-clang, os: ubuntu-latest}, | |
{name: ci-windows, os: windows-latest}, | |
{name: ci-macos, os: macos-latest}] | |
type: [tests, benchmarks] | |
build_type: [{config: Release, test_preset: ci-tests}, {config: Debug, test_preset: ci-tests-debug}] | |
timeout-minutes: 20 | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.type }} ${{ matrix.config.name }} ${{ matrix.build_type.config }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Work around https://github.com/actions/runner-images/issues/8659 | |
- name: "Remove GCC 13 from runner image (workaround)" | |
if: matrix.config.os == 'ubuntu-latest' | |
shell: bash | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list | |
sudo apt-get update | |
sudo apt-get install -y --allow-downgrades libc6=2.35-0ubuntu3.5 libc6-dev=2.35-0ubuntu3.5 libstdc++6=12.3.0-1ubuntu1~22.04 libgcc-s1=12.3.0-1ubuntu1~22.04 | |
- name: ccache | |
uses: hendrikmuhs/ccache-action@v1.2 | |
with: | |
key: ${{ matrix.type }}-${{ matrix.config.name }}-${{ matrix.build_type.config }} | |
- name: Install deps | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update -q && sudo apt-get install clang-tidy cppcheck libsfml-dev -y -q | |
pip install pyyaml | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ${{ matrix.config.name }}-${{ matrix.type }} | |
configurePresetAdditionalArgs: "['-DCMAKE_BUILD_TYPE=${{ matrix.build_type.config }}']" | |
buildPreset: ci-build | |
buildPresetAdditionalArgs: "['--config ${{ matrix.build_type.config }}']" | |
testPreset: ${{matrix.build_type.test_preset}} | |
- name: Upload benchmark results | |
uses: actions/upload-artifact@v3 | |
if: matrix.type == 'benchmarks' && matrix.build_type.config == 'Release' | |
with: | |
name: ${{ matrix.config.name }} | |
path: ${{github.workspace}}/build/test_results/benchmarks_results.json | |
docs: | |
name: Build Doxygen Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: { python-version: "3.8" } | |
- uses: ssciwr/doxygen-install@v1 | |
- name: Install deps | |
run: | | |
pip3 install rxmarbles | |
sudo apt-get update && sudo apt-get install texlive-font-utils | |
doxygen --version | |
- name: Doxygen | |
run: doxygen | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.event_name == 'push' && github.repository_owner == 'victimsnino' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./gen_docs | |
destination_dir: v2/docs | |
use_rpp_as_package: | |
timeout-minutes: 20 | |
runs-on: ubuntu-latest | |
name: Test RPP as package - ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
- name: Install project and build | |
env: | |
CC: gcc-10 | |
CXX: g++-10 | |
run: | | |
cmake -B build | |
sudo cmake --build build --target install --parallel 2 --config Release | |
cmake -B sample_build -S src/examples/rpp/package | |
cmake --build sample_build --parallel 2 --config Release | |
# cmake -B qt_sample_build -S src/examples/rppqt/package | |
# cmake --build qt_sample_build --parallel 2 --config Release |