You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.4 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 00 4 * * *
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-latest # x86
rust:
- 1.80.1
program:
- kprobe
- kretprobe
- fentry
- fexit
- uprobe
- uretprobe
- sock_ops
- socket_filter
- sk_msg
- xdp
- cgroup_skb
- cgroup_sockopt
- cgroup_sysctl
- classifier
- lsm
- perf_event
- raw_tracepoint
- tp_btf
- tracepoint
include:
- runner: macos-13 # x86
rust: 1.80.1
program: kprobe
- runner: macos-14 # arm64
rust: 1.80.1
program: kprobe
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-src,rustfmt
- uses: dtolnay/rust-toolchain@master
if: runner.os == 'macOS' && runner.arch == 'X64'
with:
toolchain: ${{ matrix.rust }}
targets: x86_64-unknown-linux-musl
components: clippy
- uses: dtolnay/rust-toolchain@master
if: runner.os == 'macOS' && runner.arch == 'ARM64'
with:
toolchain: ${{ matrix.rust }}
targets: aarch64-unknown-linux-musl
components: clippy
- uses: dtolnay/rust-toolchain@master
if: runner.os == 'Linux'
with:
toolchain: ${{ matrix.rust }}
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-generate
- run: brew install filosottile/musl-cross/musl-cross llvm
if: runner.os == 'macos'
- run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git --no-default-features
if: runner.os == 'macos'
- run: cargo install bpf-linker --git https://github.com/aya-rs/bpf-linker.git
if: runner.os == 'Linux'
- run: sudo apt update && sudo apt install expect
if: runner.os == 'Linux'
- run: ./test.sh ${{ github.workspace }} ${{ matrix.program }}