Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
orriin committed Oct 31, 2024
1 parent 29cd71e commit 8d084b1
Showing 1 changed file with 21 additions and 23 deletions.
44 changes: 21 additions & 23 deletions .github/workflows/check-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,33 +113,30 @@ jobs:
- name: cargo clippy --workspace --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings

cargo-clippy-all-features:
name: cargo clippy --all-features
cargo-check-lints:
name: check custom lints
runs-on: SubtensorCI
strategy:
matrix:
rust-branch:
- stable
rust-target:
- x86_64-unknown-linux-gnu
# - x86_64-apple-darwin
# - x86_64-apple-darwin
os:
- ubuntu-latest
# - macos-latest
include:
- os: ubuntu-latest
# - os: macos-latest
env:
RELEASE_NAME: development
# RUSTFLAGS: -A warnings
RUSTV: ${{ matrix.rust-branch }}
RUSTFLAGS: -D warnings
RUST_BACKTRACE: full
RUST_BIN_DIR: target/${{ matrix.rust-target }}
SKIP_WASM_BUILD: 1
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -158,12 +155,14 @@ jobs:
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: check lints
run: |
set -o pipefail
cargo check 2>&1 | sed -r "s/\x1B\[[0-9;]*[mK]//g" | grep "warning:" && exit 1
echo "No warnings found."
# runs cargo test --workspace
cargo-test:
name: cargo test
cargo-clippy-all-features:
name: cargo clippy --all-features
runs-on: SubtensorCI
strategy:
matrix:
Expand All @@ -188,7 +187,7 @@ jobs:
TARGET: ${{ matrix.rust-target }}
steps:
- name: Check-out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v4
uses: actions/checkout@v2

- name: Install dependencies
run: |
Expand All @@ -202,17 +201,17 @@ jobs:
components: rustfmt, clippy
profile: minimal

- name: Utilize Rust shared cached
- name: Utilize Shared Rust Cache
uses: Swatinem/[email protected]
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace
run: cargo test --workspace
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

# runs cargo test --workspace --features=runtime-benchmarks
cargo-test-benchmarks:
name: cargo test w/benchmarks
# runs cargo test --workspace
cargo-test:
name: cargo test
runs-on: SubtensorCI
strategy:
matrix:
Expand Down Expand Up @@ -256,8 +255,8 @@ jobs:
with:
key: ${{ matrix.os }}-${{ env.RUST_BIN_DIR }}

- name: cargo test --workspace --features=runtime-benchmarks
run: cargo test --workspace --features=runtime-benchmarks
- name: cargo test --workspace --all-features
run: cargo test --workspace --all-features

# ensures cargo fix has no trivial changes that can be applied
cargo-fix:
Expand Down Expand Up @@ -339,4 +338,3 @@ jobs:

- name: Check features
run: zepter run check

0 comments on commit 8d084b1

Please sign in to comment.