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 | |
on: [push, pull_request] | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
steps: | |
# Prevent Git from changing LF to CRLF, which affects test fixtures. | |
- run: git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
# Need feature(stdsimd) until config-rs can be upgraded. | |
# https://github.com/mehcode/config-rs/issues/531 | |
# https://github.com/rust-lang/rust/issues/27731#event-11707724027 | |
- uses: dtolnay/rust-toolchain@nightly | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: ${{ matrix.os }} | |
# https://github.com/Swatinem/rust-cache/issues/93#issuecomment-1321064841 | |
- run: cargo update | |
- uses: taiki-e/install-action@cargo-llvm-cov | |
- env: | |
RUSTFLAGS: -Zon-broken-pipe=kill | |
run: cargo llvm-cov --lcov --output-path lcov.info --no-cfg-coverage-nightly | |
- if: matrix.os == 'ubuntu-latest' | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info |