fix: align eBPF tracing with ptrace behavior #40
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, pull_request] | |
| jobs: | |
| lint-and-unit: | |
| name: Format, Clippy & Host Unit Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v7 | |
| - name: π¦ Install Rust toolchain | |
| run: | | |
| rustup show | |
| rustup component add rustfmt clippy rust-src | |
| cargo install bpf-linker --locked | |
| - name: π Format check | |
| run: cargo xtask fmt --check | |
| - name: π Clippy | |
| run: cargo xtask lint | |
| - name: π¨ Build (release) | |
| run: cargo xtask build | |
| - name: π§ͺ Host unit tests | |
| run: cargo xtask test | |
| vm-e2e: | |
| name: VM e2e (${{ matrix.userspace.name }} on ${{ matrix.release }}) | |
| runs-on: ubuntu-latest | |
| needs: lint-and-unit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| release: ["5.10", "5.15", "6.1", "6.6", "6.12", "6.18", "7.1", "7.2-rc"] | |
| userspace: | |
| - name: ubuntu | |
| image: docker.io/library/ubuntu:latest | |
| - name: alpine | |
| image: docker.io/library/alpine:latest | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v7 | |
| - name: π¦ Install Rust toolchain | |
| run: | | |
| rustup show | |
| rustup component add rust-src | |
| rustup target add x86_64-unknown-linux-musl | |
| cargo install bpf-linker --locked | |
| - name: πΏ Install QEMU & tooling | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-system-x86 cpio binutils curl | |
| - name: β‘ Enable KVM (best effort) | |
| run: sudo chmod 666 /dev/kvm || true | |
| - name: π₯οΈ Run VM e2e suite | |
| env: | |
| FSTRACE_VM_IMAGE: ${{ matrix.userspace.image }} | |
| run: cargo xtask vm-test --release ${{ matrix.release }} | |
| cross-dist: | |
| name: Cross-Compile Release Artifacts | |
| runs-on: ubuntu-latest | |
| needs: lint-and-unit | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: | |
| - x86_64-unknown-linux-gnu | |
| - x86_64-unknown-linux-musl | |
| - aarch64-unknown-linux-gnu | |
| - aarch64-unknown-linux-musl | |
| steps: | |
| - name: π₯ Checkout code | |
| uses: actions/checkout@v7 | |
| - name: π¦ Install Rust toolchain | |
| run: | | |
| rustup show | |
| rustup component add rust-src | |
| rustup target add ${{ matrix.target }} | |
| cargo install bpf-linker --locked | |
| - name: π Install aarch64 cross linker | |
| if: startsWith(matrix.target, 'aarch64') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu | |
| - name: π¦ Build release tarball | |
| run: cargo xtask dist --target ${{ matrix.target }} | |
| - name: β¬οΈ Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: fstrace-${{ matrix.target }} | |
| path: dist/*.tar.gz |