Skip to content

Commit

Permalink
ci: adjust dependency graph for workflows (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel authored Apr 19, 2023
1 parent 002923f commit 1c64cb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 59 deletions.
21 changes: 0 additions & 21 deletions .github/actions/rust_crate/action.yaml

This file was deleted.

47 changes: 9 additions & 38 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/**
Expand All @@ -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 != '[]' }}
Expand All @@ -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
Expand Down

0 comments on commit 1c64cb5

Please sign in to comment.