New thread #247
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: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ci-sanitize-${{ matrix.sanitizer }} | |
buildPreset: ci-build | |
testPreset: ci-sanitize | |
pvs: | |
name: PVS sanitizer | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
if: github.repository_owner == 'victimsnino' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install tools | |
run: | | |
wget -q -O - https://files.pvs-studio.com/etc/pubkey.txt \ | |
| sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/PVS.gpg --import | |
sudo chmod 644 /etc/apt/trusted.gpg.d/PVS.gpg | |
sudo wget -O /etc/apt/sources.list.d/viva64.list \ | |
https://files.pvs-studio.com/etc/viva64.list | |
sudo apt update | |
sudo apt install pvs-studio | |
pvs-studio-analyzer credentials ${{ secrets.PVS_STUDIO_CREDENTIALS }} | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ci-ubuntu-clang-tests-no-checks | |
buildPreset: ci-build | |
- name: Analyze and prepare report | |
run: | | |
pvs-studio-analyzer analyze -f build/compile_commands.json -j -e build/_deps/ | |
plog-converter -t sarif -o pvs-report.sarif PVS-Studio.log | |
- name: Publish report | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: pvs-report.sarif | |
category: PVS-Studio | |
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] | |
timeout-minutes: 20 | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.type }} ${{ matrix.config.name }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install deps | |
if: matrix.config.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update -q && sudo apt-get install clang-tidy cppcheck -y -q | |
pip install pyyaml | |
- name: Run CMake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ${{ matrix.config.name }}-${{ matrix.type }} | |
buildPreset: ci-build | |
testPreset: ci-tests | |
- name: Upload benchmark results | |
uses: actions/upload-artifact@v3 | |
if: matrix.type == 'benchmarks' | |
with: | |
name: ${{ matrix.config.name }} | |
path: ${{github.workspace}}/build/test_results/benchmarks_results.json | |
sonarcloud: | |
name: Sonarcloud + coverage | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'victimsnino' | |
env: | |
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Install llvm | |
run: sudo apt-get update -q && sudo apt-get install llvm -q -y | |
- name: Install sonar-scanner and build-wrapper | |
uses: sonarsource/sonarcloud-github-c-cpp@v1 | |
- name: Run build-wrapper | |
run: | | |
mkdir build | |
cmake --preset=ci-coverage-clang | |
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset=ci-build | |
ctest --preset=ci-tests | |
- name: Process coverage info | |
run: cmake --build build -t coverage | |
- name: Submit to codecov.io | |
uses: codecov/codecov-action@v3 | |
with: | |
file: build/test_results/coverage.txt | |
- name: Run sonar-scanner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" #Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options | |
docs: | |
name: Build Doxygen Docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: { python-version: "3.8" } | |
- uses: ssciwr/doxygen-install@v1 | |
- name: Install deps | |
run: | | |
pip3 install rxmarbles | |
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 |