fix: use le bytes for id in rule tracker #1
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: build | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
- name: Install latest nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: clippy, rust-src | |
- name: Cache cargo modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
{{ runner.os }}-cargo | |
- name: Install bpf-linker | |
working-directory: ./userspace | |
run: cargo install bpf-linker | |
- name: Build | |
working-directory: ./userspace | |
run: cargo build --verbose --example ci-run --release --target x86_64-unknown-linux-musl | |
- name: Run tests | |
working-directory: ./userspace | |
run: cargo test --verbose | |
- name: Run clippy | |
working-directory: ./userspace | |
run: cargo +nightly clippy -- -D clippy::all | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ci-run | |
path: userspace/target/x86_64-unknown-linux-musl/release/examples/ci-run | |
test-run: | |
strategy: | |
matrix: | |
kernel_version: ["4.18", "5.4", "5.10", "5.15"] | |
runs-on: macos-10.15 | |
needs: build | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download artifact | |
uses: actions/[email protected] | |
with: | |
name: ci-run | |
path: userspace/target/x86_64-unknown-linux-musl/release/examples/ci-run | |
- name: Cache Vagrant boxes | |
uses: actions/cache@v2 | |
with: | |
path: ~/.vagrant.d/boxes | |
key: ${{ runner.os }}-vagrant-${{ hashFiles('Vagrantfile') }} | |
restore-keys: | | |
${{ runner.os }}-vagrant- | |
- name: Test on kernel version ${{ matrix.kernel_version }} | |
working-directory: ./userspace | |
run: cargo xtask run-on ${{ matrix.kernel_version }} --release |