Add license headers #44
This file contains hidden or 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: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| workflow_call: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: check | |
| command: cargo check --all --verbose | |
| components: "rustfmt" | |
| - name: build | |
| command: cargo build --all --verbose | |
| components: "rustfmt" | |
| - name: clippy | |
| command: cargo clippy --all-targets --workspace -- -D warnings | |
| components: clippy,rustfmt | |
| - name: test | |
| command: cargo llvm-cov nextest --workspace --exclude manytrace --lcov --output-path lcov.info | |
| components: llvm-tools-preview,rustfmt | |
| install_extras: true | |
| - name: fmt | |
| command: cargo fmt --all -- --check | |
| components: rustfmt | |
| skip_deps: true | |
| - name: bpf-root-tests | |
| command: sudo -E env "PATH=$PATH" cargo nextest run -p bpf root_tests --run-ignored all | |
| components: "rustfmt" | |
| install_extras: true | |
| - name: integration | |
| command: | | |
| # Build required binaries in debug mode | |
| cargo build --bin manytrace | |
| cargo build --example continuous | |
| # Run non-sudo integration tests | |
| cargo nextest run -p manytrace --test integration_test | |
| # Run sudo integration tests | |
| sudo -E env "PATH=$PATH" cargo nextest run -p manytrace test_sudo --run-ignored only | |
| components: "rustfmt" | |
| install_extras: true | |
| name: ${{ matrix.name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| if: matrix.skip_deps != true | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| clang \ | |
| llvm \ | |
| libelf-dev \ | |
| libbpf-dev \ | |
| linux-headers-$(uname -r) \ | |
| pkg-config \ | |
| protobuf-compiler | |
| - name: Setup Rust | |
| uses: dtolnay/[email protected] | |
| with: | |
| components: ${{ matrix.components }} | |
| - name: Install nextest | |
| if: matrix.install_extras | |
| uses: taiki-e/install-action@nextest | |
| - name: Install llvm-cov | |
| if: matrix.install_extras | |
| uses: taiki-e/install-action@cargo-llvm-cov | |
| - name: Cache cargo | |
| if: matrix.skip_deps != true | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run ${{ matrix.name }} | |
| run: ${{ matrix.command }} | |
| - name: Run loom tests | |
| if: matrix.name == 'test' | |
| run: cargo nextest run --release -F loom loom::tests | |
| - name: Build release | |
| if: matrix.name == 'build' | |
| run: cargo build --all --release --verbose |