Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Fix lints (#25)

Fix lints (#25) #96

Workflow file for this run

on:
push:
branches:
- main
tags:
- "*"
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
name: CI
jobs:
lint:
name: Lint
strategy:
matrix:
include:
- os: ubuntu-24.04
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
# make sure all code has been formatted with rustfmt
- name: check rustfmt
run: |
rustup component add rustfmt
cargo fmt -- --check --color always
# run clippy to verify we have no warnings
- run: cargo fetch
- name: cargo clippy
run: |
rustup component add clippy
cargo clippy --all-targets --all-features -- -D warnings
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo test build
run: cargo build --tests
- name: cargo test
run: cargo test
miri-test:
runs-on: ubuntu-24.04
env:
BPF_LINKER_VERSION: "v0.9.13"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src, miri
- run: cargo fetch
- name: build eBPF
run: |
(cd /usr/bin && curl -L https://github.com/aya-rs/bpf-linker/releases/download/${BPF_LINKER_VERSION}/bpf-linker-x86_64-unknown-linux-gnu.tar.gz | sudo tar xzf - bpf-linker)
./build_ebpf.sh
- name: install nextest
run: curl -LsSf https://get.nexte.st/latest/linux-musl | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
- name: cargo test build
run: cargo build --tests
- name: cargo test
run: cargo nextest run
- name: cargo miri test
run: cargo miri nextest run -j 4
integ-test:
runs-on: ubuntu-24.04
env:
BPF_LINKER_VERSION: "v0.9.13"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src, miri
- run: cargo fetch
- name: build eBPF
run: |
(cd /usr/bin && curl -L https://github.com/aya-rs/bpf-linker/releases/download/${BPF_LINKER_VERSION}/bpf-linker-x86_64-unknown-linux-gnu.tar.gz | sudo tar xzf - bpf-linker)
./build_ebpf.sh
- name: cargo test build
working-directory: ./crates/integ
run: cargo build --tests
- name: cargo test
working-directory: ./crates/integ
run: cargo test
docs:
runs-on: ubuntu-24.04
env:
RUSTDOCFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo doc check
run: cargo doc
deny-check:
name: cargo-deny
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
publish-check:
name: Publish Check
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo publish check
run: cargo publish --dry-run
test_success:
runs-on: ubuntu-24.04
needs: [lint, test, miri-test, integ-test, docs, publish-check]
steps:
- run: echo "All test jobs passed"