diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2ef27831083..cfd00b512d1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -52,8 +52,6 @@ jobs: - name: Check build of deployed Omicron packages run: cargo run --bin omicron-package -- -t default check - # Note that `cargo clippy` includes `cargo check, so this ends up checking all - # of our code. clippy-lint: runs-on: ubuntu-22.04 env: @@ -82,6 +80,31 @@ jobs: - name: Run Clippy Lints run: cargo xtask clippy + check-features: + runs-on: ubuntu-22.04 + env: + CARGO_INCREMENTAL: 0 + steps: + # This repo is unstable and unnecessary: https://github.com/microsoft/linux-package-repositories/issues/34 + - name: Disable packages.microsoft.com repo + run: sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + ref: ${{ github.event.pull_request.head.sha }} # see omicron#4461 + - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 + if: ${{ github.ref != 'refs/heads/main' }} + - name: Report cargo version + run: cargo --version + run: source "./env.sh"; echo "PATH=$PATH" >> "$GITHUB_ENV" + - name: Print PATH + run: echo $PATH + - name: Print GITHUB_ENV + run: cat "$GITHUB_ENV" + - name: Install Pre-Requisites + run: ./tools/install_builder_prerequisites.sh -y + - name: Run Cargo Check (No Default Features) + run: cargo check --no-default-features + # This is just a test build of docs. Publicly available docs are built via # the separate "rustdocs" repo. build-docs: