refactor: switch to quick_xml
library
#307
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: "Test CI" | |
on: | |
push: | |
branches: [main] | |
paths: | |
- cpp-linter/** | |
- Cargo.toml | |
- Cargo.lock | |
- .github/workflows/run-dev-tests.yml | |
pull_request: | |
branches: [main] | |
paths: | |
- cpp-linter/** | |
- Cargo.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: Cache .cargo locked resources | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cargo | |
key: ${{ runner.os }}-tests-cargo-${{ hashFiles('Cargo.lock') }} | |
- name: Fetch .cargo locked resources | |
run: cargo fetch | |
- if: runner.os == 'Linux' | |
run: sudo apt-get update | |
- name: Install clang v7 | |
if: runner.os == 'Linux' | |
uses: ./.github/install-clang-action | |
with: | |
version: '7' | |
- name: Collect Coverage for clang v7 | |
if: runner.os == 'Linux' | |
env: | |
CLANG_VERSION: '7' | |
run: just test ci | |
- name: Install clang v8 | |
if: runner.os == 'Linux' | |
uses: ./.github/install-clang-action | |
with: | |
version: '8' | |
- name: Collect Coverage for clang v8 | |
if: runner.os == 'Linux' | |
env: | |
CLANG_VERSION: '8' | |
run: just test ci | |
- name: Install clang v9 | |
uses: ./.github/install-clang-action | |
with: | |
version: '9' | |
- name: Collect Coverage for clang v9 | |
env: | |
CLANG_VERSION: '9' | |
run: just test ci | |
- name: Install clang v10 | |
uses: ./.github/install-clang-action | |
with: | |
version: '10' | |
- name: Collect Coverage for clang v10 | |
env: | |
CLANG_VERSION: '10' | |
run: just test ci | |
- name: Install clang 11 | |
uses: ./.github/install-clang-action | |
with: | |
version: '11' | |
- name: Collect Coverage for clang v11 | |
env: | |
CLANG_VERSION: '11' | |
run: just test ci | |
- name: Install clang 12 | |
uses: ./.github/install-clang-action | |
with: | |
version: '12' | |
- name: Collect Coverage for clang v12 | |
env: | |
CLANG_VERSION: '12' | |
run: just test ci | |
- name: Install clang 13 | |
uses: ./.github/install-clang-action | |
with: | |
version: '13' | |
- name: Collect Coverage for clang v13 | |
env: | |
CLANG_VERSION: '13' | |
run: just test ci | |
- name: Install clang 14 | |
uses: ./.github/install-clang-action | |
with: | |
version: '14' | |
- name: Collect Coverage for clang v14 | |
env: | |
CLANG_VERSION: '14' | |
run: just test ci | |
- name: Install clang 15 | |
uses: ./.github/install-clang-action | |
with: | |
version: '15' | |
- name: Collect Coverage for clang v15 | |
env: | |
CLANG_VERSION: '15' | |
run: just test ci | |
- name: Install clang 16 | |
uses: ./.github/install-clang-action | |
with: | |
version: '16' | |
- name: Collect Coverage for clang v16 | |
env: | |
CLANG_VERSION: '16' | |
run: just test ci | |
- name: Install clang 17 | |
uses: ./.github/install-clang-action | |
with: | |
version: '17' | |
- name: Collect Coverage for clang v17 | |
env: | |
CLANG_VERSION: '17' | |
run: just test ci | |
- name: Install clang 18 | |
uses: ./.github/install-clang-action | |
with: | |
version: '18' | |
- name: Collect Coverage for clang v18 | |
env: | |
CLANG_VERSION: '18' | |
run: just test all | |
- name: Generate Coverage HTML report | |
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 | |
run: | | |
rm coverage.json | |
just lcov | |
- uses: codecov/codecov-action@v5 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} | |
files: lcov.info | |
fail_ci_if_error: true # optional (default = false) |