feat: update latest aya #16
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: rust-sock-filter | |
on: [push] | |
env: | |
RUSTUP_TOOLCHAIN: "1.82.0" | |
RUSTUP_HOME: "./rust/rustup" | |
CARGO_HOME: "./rust/cargo" | |
jobs: | |
build-rust-sock-filter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Cache Rust | |
id: cache-rust | |
uses: actions/cache@v4 | |
with: | |
path: rust | |
key: ${{ runner.os }}-rustup-${{env.RUSTUP_TOOLCHAIN}} | |
- name: Install rust | |
if: steps.cache-rust.outputs.cache-hit != 'true' | |
run: | | |
mkdir -p $RUSTUP_HOME | |
mkdir -p $CARGO_HOME | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
rustup install $RUSTUP_TOOLCHAIN | |
rustup install nightly | |
rustup component add rust-src --toolchain nightly | |
rustup component add clippy | |
- name: Configure Rust and display version | |
run: | | |
rustup default nightly | |
echo "RUSTUP_TOOLCHAIN=nightly" >> $GITHUB_ENV | |
export RUSTUP_TOOLCHAIN=nightly | |
echo "PATH=$(dirname $(rustup which cargo)):$(pwd)/rust/cargo/bin:$PATH" >> $GITHUB_ENV | |
rustc --version | |
cargo --version | |
- name: Build sock-filter-ebpf | |
run: | | |
rustup default nightly | |
rustup toolchain list | |
cargo --version | |
cargo install bpf-linker | |
cd sock-filter | |
cd sock-filter-ebpf | |
cargo build --target bpfel-unknown-none -Z build-std=core --release | |
cd .. | |
cd sock-filter-app | |
cargo build --release |