Skip to content

Commit

Permalink
eliminate rust-init step in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed May 2, 2024
1 parent 80d5215 commit 6ae4f91
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .github/actions/init-env-rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ runs:
which git-upload-archive
which git-receive-pack
ssh -V
- name: Build gitbutler-git
shell: bash
run: |
cargo build -p gitbutler-git --bins
cargo build --release -p gitbutler-git --bins
16 changes: 10 additions & 6 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
- uses: ./.github/actions/init-env-node
- run: pnpm test

rust-init:
rust-lint:
needs: changes
if: ${{ needs.changes.outputs.rust == 'true' }}
runs-on: ubuntu-latest
Expand All @@ -89,7 +89,6 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
- run: cargo fmt --check --all
- run: cargo build --locked --all-targets --tests

rust-docs:
needs: changes
Expand All @@ -107,7 +106,7 @@ jobs:
RUSTDOCFLAGS: -Dwarnings

check-gitbutler-tauri:
needs: [changes, rust-init]
needs: changes
if: ${{ needs.changes.outputs.gitbutler-tauri == 'true' }}
runs-on: ubuntu-latest
container:
Expand All @@ -123,14 +122,15 @@ jobs:
- [devtools]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
- uses: ./.github/actions/check-crate
with:
crate: gitbutler-tauri
features: ${{ toJson(matrix.features) }}
action: ${{ matrix.action }}

check-gitbutler-changeset:
needs: [changes, rust-init]
needs: changes
if: ${{ needs.changes.outputs.gitbutler-changeset == 'true' }}
runs-on: ubuntu-latest
container:
Expand All @@ -147,14 +147,15 @@ jobs:
- []
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
- uses: ./.github/actions/check-crate
with:
crate: gitbutler-changeset
features: ${{ toJson(matrix.features) }}
action: ${{ matrix.action }}

check-gitbutler-git:
needs: [changes, rust-init]
needs: changes
if: ${{ needs.changes.outputs.gitbutler-git == 'true' }}
runs-on: ubuntu-latest
container:
Expand All @@ -171,14 +172,15 @@ jobs:
- [tokio]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
- uses: ./.github/actions/check-crate
with:
crate: gitbutler-git
features: ${{ toJson(matrix.features) }}
action: ${{ matrix.action }}

check-gitbutler-core:
needs: [changes, rust-init]
needs: changes
if: ${{ needs.changes.outputs.gitbutler-core == 'true' }}
runs-on: ubuntu-latest
container:
Expand All @@ -194,6 +196,7 @@ jobs:
- []
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/init-env-rust
- uses: ./.github/actions/check-crate
with:
crate: gitbutler-core
Expand All @@ -209,6 +212,7 @@ jobs:
- check-gitbutler-changeset
- check-gitbutler-git
- check-rust-windows
- rust-lint
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down

0 comments on commit 6ae4f91

Please sign in to comment.