Skip to content

Commit

Permalink
Check each crate individually to make sure no_std works
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 committed Mar 10, 2025
1 parent a2f8ddb commit bd896da
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,48 @@ jobs:
- name: cargo nextest run --locked
run: |
cargo -Zgitoxide -Zgit nextest run --locked
# This job checks all crates individually, including no_std and other featureless builds
cargo-check-individually:
strategy:
matrix:
# We only want to run these slower checks on the fastest runner
os: ${{ fromJson(github.repository_owner == 'autonomys' &&
'[
"runs-on=${{ github.run_id }}/runner=self-hosted-ubuntu-22.04-x86-64",
]' ||
'["ubuntu-22.04"]') }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install Protoc
uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Configure cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: cargo clippy --locked all crates
run: |
for crate in $(grep 'path =' Cargo.toml | sed 's/.*path *= *"\([^"]*\).*/\1/' | sort); do
echo "$crate";
pushd "$crate";
if ! cargo -Zgitoxide -Zgit clippy --locked --all-targets -- -D warnings; then
pwd;
popd;
break;
fi;
pwd;
popd;
done

0 comments on commit bd896da

Please sign in to comment.