Skip to content

ci: run clippy,rustfmt over examples #1010

ci: run clippy,rustfmt over examples

ci: run clippy,rustfmt over examples #1010

Workflow file for this run

name: Build
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
schedule:
- cron: 00 4 * * *
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v18
with:
globs: '**/*.md'
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt,rust-src
# Installed *after* nightly so it is the default.
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
examples/aya-tool
examples/cgroup-skb-egress
examples/kprobetcp
examples/lsm-nice
examples/tc-egress
examples/xdp-drop
examples/xdp-hello
examples/xdp-log
- uses: taiki-e/install-action@v2
with:
tool: bpf-linker
- name: Set up Python
uses: actions/setup-python@v5
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build docs
run: mkdocs build
- name: Check Examples
working-directory: examples
run: ./test.sh