buildkit fix #196
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: Lint | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| paths: | |
| - 'typhoon/**' | |
| - 'evaluation/**' | |
| - '.github/workflows/lint.yaml' | |
| - '.shellcheckrc' | |
| - '**.md' | |
| - '**.go' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| all-lint: | |
| name: Lint All the Code | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout ποΈ | |
| uses: actions/checkout@v4 | |
| - name: Lint markdown π | |
| uses: DavidAnson/markdownlint-cli2-action@v19 | |
| with: | |
| globs: '**/*.md' | |
| - name: Check shell scripts π | |
| uses: ludeeus/action-shellcheck@2.0.0 | |
| with: | |
| scandir: "." | |
| env: | |
| SHELLCHECK_OPTS: -s bash -e SC2034 | |
| - name: Check Dockerfile configuration π¦ | |
| uses: hadolint/hadolint-action@v3.1.0 | |
| with: | |
| recursive: true | |
| config: evaluation/.hadolint.yaml | |
| - name: Setup Rust π¦ | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| toolchain: nightly | |
| components: rustfmt, clippy, miri | |
| rust-src-dir: typhoon | |
| override: true | |
| - name: Install cargo-udeps and cargo-machete π¦ | |
| uses: taiki-e/install-action@v2 | |
| with: | |
| tool: cargo-udeps,cargo-machete | |
| - name: Check formatting π¨ | |
| run: | | |
| cd typhoon && cargo fmt --check | |
| cd ../evaluation/protocols/typhoon && cargo fmt --check | |
| cd ../wireguard_daita/machines-printer && cargo fmt --check | |
| cd ../../quic/quic-eval && cargo fmt --check | |
| - name: Run clippy π | |
| working-directory: typhoon | |
| run: | | |
| cargo clippy --lib --bins --examples --benches --features debug,capture,clap | |
| cargo clippy --lib --bins --examples --benches --no-default-features --features full_hardware,server,client,async-std,debug,capture,clap | |
| - name: Run miri on unsafe code π¬ | |
| working-directory: typhoon | |
| env: | |
| MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-many-seeds=0..8 | |
| run: | | |
| cargo miri test --lib bytes:: | |
| - name: Check documentation π | |
| working-directory: typhoon | |
| env: | |
| RUSTDOCFLAGS: "-D warnings" | |
| run: | | |
| cargo doc --no-deps --examples --features debug,capture,clap | |
| cargo doc --no-deps --examples --no-default-features --features full_hardware,server,client,async-std,debug,capture,clap | |
| cargo test --doc --features debug,capture,clap | |
| - name: Check for unused dependencies π§Ή | |
| working-directory: typhoon | |
| run: | | |
| cargo udeps --all-targets | |
| cargo machete | |
| - name: Setup Python π | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: "3.12" | |
| - name: Check Python code π | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "check --config evaluation/pyproject.toml evaluation/src evaluation/protocols evaluation/background" | |
| - name: Setup Go 𦫠| |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Install staticcheck π§ | |
| run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
| - name: Lint Go (wireguard_daita) π | |
| working-directory: evaluation/protocols/wireguard_daita/wg-daita | |
| run: | | |
| git clone --depth=1 --branch mullvad https://github.com/mullvad/wireguard-go ../wireguard-go | |
| go mod tidy | |
| go vet -tags daita ./... | |
| staticcheck -tags daita ./... |