Skip to content

build(deps): bump ilammy/msvc-dev-cmd from 1.12.1 to 1.13.0 #75

build(deps): bump ilammy/msvc-dev-cmd from 1.12.1 to 1.13.0

build(deps): bump ilammy/msvc-dev-cmd from 1.12.1 to 1.13.0 #75

Workflow file for this run

name: Build
on: push
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
- name: Run commitlint
uses: wagoid/commitlint-github-action@v5
build:
name: Build
strategy:
matrix:
include:
- os: ubuntu-latest
compiler: gcc
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: clang
cc: clang
cxx: clang++
- os: windows-latest
compiler: msvc
cc: cl
cxx: cl
runs-on: ${{ matrix.os }}
needs: [lint]
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install clang
if: matrix.compiler == 'clang'
uses: egor-tensin/setup-clang@v1.4
- name: Install msbuild
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Install meson, ninja and gcovr
run: pip install meson ninja gcovr
- name: Configure
run: meson setup build
- name: Compile
run: meson compile -C build
- name: Run tests
run: meson test -C build
test:
name: Test
runs-on: ubuntu-latest
needs: [build]
env:
SONAR_SCANNER_VERSION: 4.7.0.2747
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup Sonar Scanner
uses: SonarSource/sonarcloud-github-c-cpp@v2.0.2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install meson, ninja and gcovr
run: pip install meson ninja gcovr
- name: Run build-wrapper
run: |
meson setup build -Db_coverage=true
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} meson compile -C build
- name: Run tests and generate coverage report
run: |
cd build
ninja test
ninja coverage
- 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 }}" \
--define sonar.coverageReportPaths=build/meson-logs/sonarqube.xml \
--define sonar.coverage.exclusions=examples/*
docs:
name: Generate documentation
runs-on: ubuntu-latest
needs: [test]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Generate documentation
uses: mattnotmitt/doxygen-action@v1.9.5
with:
working-directory: docs
doxyfile-path: Doxyfile
- name: Upload documentation as artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: docs/html
- name: Deploy documentation
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/html