Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(CI): Move split cluster check into hierarchy #4749

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ name: Split Cluster Check

on:
workflow_call:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: split-cluster-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

env:
CARGO_TERM_COLOR: always
Expand Down
51 changes: 8 additions & 43 deletions .github/workflows/hierarchy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
diff:
runs-on: [self-hosted]
runs-on: [ubuntu-latest]
concurrency:
group: diff-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
Expand All @@ -24,18 +24,8 @@ jobs:
isDoc: ${{ steps.diff.outputs.isDoc }}
isReleaseNotesEligible: ${{ steps.diff.outputs.isReleaseNotesEligible }}
isExternalCrates: ${{ steps.diff.outputs.isExternalCrates }}
isWallet: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-wallet')) }}
isExplorer: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-explorer')) }}
isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }}
isAppsBackend: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'apps-backend')) }}
isAppsUiKit: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/apps-ui-kit')) }}
isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }}
isLedgerjs: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/ledgerjs-hw-app-iota')) }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Detect Changes (turbo)
uses: "./.github/actions/turbo-diffs"
id: turbo
- name: Detect Changes (diff)
uses: "./.github/actions/diffs"
id: diff
Expand Down Expand Up @@ -76,12 +66,6 @@ jobs:
if: (!cancelled() && needs.diff.outputs.isDoc == 'true')
uses: ./.github/workflows/_docs_lint.yml

turborepo:
needs:
- dprint-format
- typos
uses: ./.github/workflows/_turborepo.yml

move-tests:
needs:
- diff
Expand Down Expand Up @@ -117,32 +101,6 @@ jobs:
(needs.diff.outputs.isRosetta == 'true' || needs.diff.outputs.isRust == 'true')
uses: ./.github/workflows/_rosetta.yml

e2e:
if: (!cancelled() && !failure() && (!github.event.pull_request.draft || github.ref_name == 'develop'))
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_e2e.yml
with:
isRust: ${{ needs.diff.outputs.isRust == 'true' }}
isWallet: ${{ needs.diff.outputs.isWallet == 'true' }}
isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }}
isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }}
isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }}
isGraphQlTransport: ${{ needs.diff.outputs.isGraphQlTransport == 'true' }}

ledgernano:
if: (!cancelled() && !failure()) && needs.diff.outputs.isLedgerjs == 'true' && github.event.pull_request.draft == false
needs:
- diff
- dprint-format
- license-check
- typos
uses: ./.github/workflows/_ledgernano.yml
secrets: inherit

move-ide:
if: (!cancelled() && !failure()) && needs.diff.outputs.isExternalCrates == 'true' && github.event.pull_request.draft == false
needs:
Expand All @@ -151,3 +109,10 @@ jobs:
- license-check
- typos
uses: ./.github/workflows/_move_ide.yml

split-cluster:
if: (!cancelled() && !failure()) && needs.diff.outputs.isRust == 'true' && github.event.pull_request.draft == false
needs:
- diff
- rust
uses: ./.github/workflows/_split_cluster.yml
59 changes: 59 additions & 0 deletions .github/workflows/turbo_hierarchy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Turborepo Hierarchy

on:
push:
branches:
- "develop"
- "devnet"
- "testnet"
- "mainnet"
- "releases/iota-*-release"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
diff:
runs-on: [ubuntu-latest]
concurrency:
group: turbo-diff-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}
outputs:
isRust: ${{ steps.diff.outputs.isRust }}
isWallet: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-wallet')) }}
isExplorer: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'iota-explorer')) }}
isTypescriptSDK: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/iota-sdk')) }}
isAppsBackend: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), 'apps-backend')) }}
isAppsUiKit: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/apps-ui-kit')) }}
isGraphQlTransport: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/graphql-transport')) }}
isLedgerjs: ${{ (steps.turbo.outputs.packages && contains(fromJson(steps.turbo.outputs.packages), '@iota/ledgerjs-hw-app-iota')) }}
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- name: Detect Changes (turbo)
uses: "./.github/actions/turbo-diffs"
id: turbo
- name: Detect Changes (diff)
uses: "./.github/actions/diffs"
id: diff

turborepo:
uses: ./.github/workflows/_turborepo.yml

e2e:
if: (!cancelled() && !failure() && (!github.event.pull_request.draft || github.ref_name == 'develop'))
needs:
- diff
uses: ./.github/workflows/_e2e.yml
with:
isRust: ${{ needs.diff.outputs.isRust == 'true' }}
isWallet: ${{ needs.diff.outputs.isWallet == 'true' }}
isExplorer: ${{ needs.diff.outputs.isExplorer == 'true' }}
isAppsBackend: ${{ needs.diff.outputs.isAppsBackend == 'true' }}
isTypescriptSDK: ${{ needs.diff.outputs.isTypescriptSDK == 'true' }}
isGraphQlTransport: ${{ needs.diff.outputs.isGraphQlTransport == 'true' }}

ledgernano:
if: (!cancelled() && !failure()) && needs.diff.outputs.isLedgerjs == 'true' && github.event.pull_request.draft == false
needs:
- diff
uses: ./.github/workflows/_ledgernano.yml
secrets: inherit
Loading