🐛 Change Ebpf to Bpf #126
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 Aya eBPF CI | |
on: | |
push: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
profile: minimal | |
components: rust-src, llvm-tools-preview | |
override: true | |
- name: Install libpcap-dev | |
run: sudo apt install libpcap-dev | |
- name: Install bpf-linker | |
run: cargo install bpf-linker | |
- name: Build eBPF program ipv4 | |
run: cargo xtask ebpf-ipv4 | |
- name: Build eBPF program ipv6 | |
run: cargo xtask ebpf-ipv6 | |
- name: Build userspace program | |
run: cargo build --verbose | |
- name: Fetch gh-pages branch | |
run: git fetch origin gh-pages:gh-pages | |
- name: Backup custom index.html | |
run: | | |
git checkout gh-pages | |
mv index.html index.html.backup | |
git checkout - | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Generate documentation | |
run: cargo doc --no-deps | |
- name: Restore custom index.html | |
run: mv index.html.backup target/doc/index.html | |
- name: Push docs to gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./target/doc | |
publish_branch: gh-pages |