ci: adjust dependency graph for workflows (#322)
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
name: Rust Crate Workflow
|
||||
description: Build and test your Rust crate
|
||||
|
||||
inputs:
|
||||
working_directory:
|
||||
required: false
|
||||
default: "."
|
||||
description: The working directory for this workflow.
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build
|
||||
working-directory: ${{ inputs.working_directory }}
|
||||
shell: ${{ inputs.shell }}
|
||||
run: cargo build --verbose
|
||||
|
||||
- name: Test
|
||||
working-directory: ${{ inputs.working_directory }}
|
||||
shell: ${{ inputs.shell }}
|
||||
run: cargo test --verbose
|
||||
@@ -18,7 +18,6 @@ jobs:
|
||||
|
||||
outputs:
|
||||
needs_dart_build: ${{ steps.needs_dart_build.outputs.changes }}
|
||||
needs_rust_build: ${{ steps.needs_rust_build.outputs.changes }}
|
||||
needs_verify: ${{ steps.needs_verify.outputs.changes }}
|
||||
|
||||
name: 👀 Detect Changes
|
||||
@@ -33,37 +32,36 @@ jobs:
|
||||
with:
|
||||
filters: |
|
||||
artifact_proxy:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/artifact_proxy/**
|
||||
shorebird_cli:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/shorebird_cli/**
|
||||
- packages/shorebird_code_push_client/**
|
||||
- packages/shorebird_code_push_protocol/**
|
||||
shorebird_code_push_client:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/shorebird_code_push_client/**
|
||||
- packages/shorebird_code_push_protocol/**
|
||||
shorebird_code_push_protocol:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/shorebird_code_push_protocol/**
|
||||
jwt:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/jwt/**
|
||||
|
||||
- uses: dorny/paths-filter@v2
|
||||
name: Build Detection
|
||||
id: needs_rust_build
|
||||
with:
|
||||
filters: |
|
||||
updater:
|
||||
- ./.github/actions/rust
|
||||
- updater/**
|
||||
|
||||
- uses: dorny/paths-filter@v2
|
||||
name: Verify Detection
|
||||
id: needs_verify
|
||||
with:
|
||||
filters: |
|
||||
shorebird_cli:
|
||||
- ./.github/workflows/main.yaml
|
||||
- ./.github/actions/dart_package
|
||||
- packages/shorebird_cli/**
|
||||
|
||||
@@ -88,27 +86,6 @@ jobs:
|
||||
with:
|
||||
working_directory: packages/${{ matrix.package }}
|
||||
|
||||
build_rust_crates:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.needs_rust_build != '[]' }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
crate: ${{ fromJSON(needs.changes.outputs.needs_rust_build) }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
name: 🦀 Build ${{ matrix.crate }}
|
||||
|
||||
steps:
|
||||
- name: 📚 Git Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: 🦀 Build ${{ matrix.package }}
|
||||
uses: ./.github/actions/rust_crate
|
||||
with:
|
||||
working_directory: ${{ matrix.crate }}
|
||||
|
||||
verify_packages:
|
||||
needs: changes
|
||||
if: ${{ needs.changes.outputs.needs_verify != '[]' }}
|
||||
@@ -131,13 +108,7 @@ jobs:
|
||||
working_directory: packages/${{ matrix.package }}
|
||||
|
||||
ci:
|
||||
needs:
|
||||
[
|
||||
semantic_pull_request,
|
||||
build_dart_packages,
|
||||
build_rust_crates,
|
||||
verify_packages,
|
||||
]
|
||||
needs: [semantic_pull_request, build_dart_packages, verify_packages]
|
||||
if: ${{ always() }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
Reference in New Issue
Block a user