Minor docs update #260
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
# Inspired heavily by the libseccomp-rs CI script | |
name: build-test | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
jobs: | |
validate: | |
name: Format and Lint Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install clippy | |
run: rustup component add clippy | |
# - name: Run cargo fmt | |
# run: cargo fmt --all -- --check | |
- name: Run cargo clippy | |
run: make lint | |
test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target-triple: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl] | |
steps: | |
- name: Install musl lib | |
if: ${{ contains(matrix.target-triple, 'musl') }} | |
run: sudo apt-get install musl-tools | |
- name: Install target triple | |
run: rustup target install ${{ matrix.target-triple }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run tests | |
run: make test-ci TARGET_TRIPLE=${{ matrix.target-triple }} | |
doc: | |
name: Documentation Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Generate documentation | |
run: make doc | |
coverage: | |
name: Code Coverage | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: rustup toolchain install stable --component llvm-tools | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate code coverage | |
run: make coverage-ci | |
- name: Upload coverage to coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info |