name: Code Coverage on: ["push", "pull_request"] env: CARGO_TERM_COLOR: always RUST_TOOLCHAIN: 1.86.0 jobs: coverage: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v5 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.RUST_TOOLCHAIN }} components: llvm-tools-preview - name: Rust Cache uses: Swatinem/rust-cache@v2 - name: Cache vcpkg uses: actions/cache@v4 with: path: target/vcpkg key: A-vcpkg-${{ runner.os }}-${{ hashFiles('Cargo.toml', 'Cargo.lock') }} restore-keys: | A-vcpkg-${{ runner.os }}- - name: Vcpkg Linux Dependencies run: | sudo apt-get update sudo apt-get install -y libltdl-dev - name: Vcpkg run: | cargo install cargo-vcpkg cargo vcpkg -v build - uses: taiki-e/install-action@cargo-llvm-cov - uses: taiki-e/install-action@nextest # Note: We manually link zlib. This should be synchronized with the flags set for Linux in .cargo/config.toml. - name: Generate coverage report run: | cargo llvm-cov --no-fail-fast --lcov --output-path lcov.info nextest - name: Upload coverage to Coveralls uses: coverallsapp/github-action@v2 with: files: ./lcov.info format: lcov allow-empty: false