PR review suggestions #128
Workflow file for this run
This file contains hidden or 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: "Test CI" | |
on: | |
push: | |
branches: [main] | |
paths: | |
- "**.rs" | |
- "*.toml" | |
- "Cargo.lock" | |
- ".github/workflows/run-dev-tests.yml" | |
pull_request: | |
# types: opened | |
branches: [main] | |
paths: | |
- "**.rs" | |
- "*.toml" | |
- "Cargo.lock" | |
- ".github/workflows/run-dev-tests.yml" | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['windows-latest', ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup component add llvm-tools-preview | |
# https://docs.rs/openssl/latest/openssl/#automatic | |
# - name: Install OpenSSL (Linux) | |
# if: runner.os == 'Linux' | |
# run: sudo apt-get install -y pkg-config libssl-dev | |
# - name: Install OpenSSL (MacOS) | |
# if: runner.os == 'macOS' | |
# run: brew install openssl@3 | |
# - name: Install OpenSSL (Windows) | |
# if: runner.os == 'Windows' | |
# run: vcpkg install openssl | |
- name: Install third-party binaries | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-nextest,cargo-llvm-cov,cargo-binstall,just | |
- name: Install llvm-cov-pretty (HTML report generator) | |
run: cargo binstall -y llvm-cov-pretty | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Install workflow deps | |
run: python3 -m pip install meson | |
# # https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages | |
- name: Install ninja (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install ninja-build | |
- name: Install ninja (Windows) | |
if: runner.os == 'Windows' | |
run: choco install ninja | |
- name: Fetch .cargo locked resources | |
run: cargo fetch | |
- name: Install clang v7 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '7' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '7' | |
run: just test | |
- name: Install clang v8 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '8' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '8' | |
run: just test | |
- name: Install clang v9 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '9' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '9' | |
run: just test | |
- name: Install clang v10 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '10' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '10' | |
run: just test | |
- name: Install clang 11 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '11' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '11' | |
run: just test | |
- name: Install clang 12 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '12' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '12' | |
run: just test | |
- name: Install clang 13 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '13' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '13' | |
run: just test | |
- name: Install clang 14 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '14' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '14' | |
run: just test | |
- name: Install clang 15 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '15' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '15' | |
run: just test | |
- name: Install clang 16 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '16' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '16' | |
run: just test | |
- name: Install clang 17 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '17' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '17' | |
run: just test | |
- name: Install clang 18 | |
uses: cpp-linter/cpp_linter_rs/install-clang-action@pr-reviews | |
with: | |
version: '18' | |
- name: Collect Coverage | |
working-directory: cpp-linter-lib | |
env: | |
CLANG_VERSION: '18' | |
run: just test | |
- name: Generate Coverage HTML report | |
working-directory: cpp-linter-lib | |
run: just pretty-cov | |
- name: Upload coverage data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: HTML_report-${{ runner.os }} | |
path: target/llvm-cov-pretty | |
- name: Generate Coverage lcov report | |
if: runner.os == 'Linux' | |
working-directory: cpp-linter-lib | |
run: just lcov | |
- uses: codecov/codecov-action@v4 | |
if: runner.os == 'Linux' | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
files: cpp-linter-lib/lcov.info | |
fail_ci_if_error: true # optional (default = false) |