From c34afa4496b991a1650b16950133db2e82ca6d8e Mon Sep 17 00:00:00 2001 From: Rigidity Date: Wed, 28 Aug 2024 10:26:46 -0400 Subject: [PATCH 1/2] Check the whole workspace in one place --- .github/workflows/build-crate.yml | 22 +++++++++++++--------- .github/workflows/build-wheels.yml | 17 ----------------- 2 files changed, 13 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build-crate.yml b/.github/workflows/build-crate.yml index 511ad101f..3362377e3 100644 --- a/.github/workflows/build-crate.yml +++ b/.github/workflows/build-crate.yml @@ -23,16 +23,22 @@ jobs: components: rustfmt, clippy - name: Fmt - run: cargo fmt -- --files-with-diff --check + run: cargo fmt --all -- --files-with-diff --check - name: Clippy - run: cargo clippy + run: cargo clippy --workspace --all-features --all-targets - - name: Tests - run: cargo test && cargo test --release + - name: Tests (debug) + run: cargo test --workspace --all-features - - name: Build - run: cargo build --release + - name: Tests (release) + run: cargo test --workspace --all-features --release + + - name: Install cargo-workspaces + run: cargo install cargo-workspaces --locked + + - name: Publish (dry run) + run: cargo ws publish --publish-as-is --dry-run - name: Upload crate artifacts uses: actions/upload-artifact@v4 @@ -44,6 +50,4 @@ jobs: if: startsWith(github.event.ref, 'refs/tags') env: CARGO_REGISTRY_TOKEN: ${{ secrets.cargo_registry_token }} - run: | - cargo install cargo-workspaces --locked - cargo ws publish --publish-as-is + run: cargo ws publish --publish-as-is diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index abb867537..62fa6e37c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -216,23 +216,6 @@ jobs: python wheel/generate_type_stubs.py git diff --exit-code - build-tools: - name: build chia-tools - runs-on: ubuntu-latest - steps: - - name: Clean workspace - uses: Chia-Network/actions/clean-workspace@main - - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: cargo build - run: | - cd crates/chia-tools - cargo build - build-sdist: name: sdist - ${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }} runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }} From cf6c2fc4fabf33b45222f28e4f9206ce7c46704f Mon Sep 17 00:00:00 2001 From: Rigidity Date: Wed, 28 Aug 2024 10:36:56 -0400 Subject: [PATCH 2/2] Build workspace --- .github/workflows/build-crate.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-crate.yml b/.github/workflows/build-crate.yml index 3362377e3..e14a647ca 100644 --- a/.github/workflows/build-crate.yml +++ b/.github/workflows/build-crate.yml @@ -34,6 +34,9 @@ jobs: - name: Tests (release) run: cargo test --workspace --all-features --release + - name: Build (release) + run: cargo build --workspace --all-features --release + - name: Install cargo-workspaces run: cargo install cargo-workspaces --locked