Skip to content

Commit

Permalink
build: add run order and dependancies in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJithil committed Nov 4, 2023
1 parent 94156e3 commit 4f289c1
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build from tarball

on:
workflow_run:
workflows: ["lint-addon-docs", "lint-cpp", "lint-js-and-md", "lint-py", "lint-yaml", "lint-sh", "lint-codeowners", "lint-pr-url"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build Windows

on:
workflow_run:
workflows: ["lint-addon-docs", "lint-cpp", "lint-js-and-md", "lint-py", "lint-yaml", "lint-sh", "lint-codeowners", "lint-pr-url"]
types:
- completed
pull_request:
paths-ignore:
- README.md
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Coverage Linux (without intl)

on:
workflow_run:
workflows: ["lint-addon-docs", "lint-cpp", "lint-js-and-md", "lint-py", "lint-yaml", "lint-sh", "lint-codeowners", "lint-pr-url"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Coverage Linux

on:
workflow_run:
workflows: ["lint-addon-docs", "lint-cpp", "lint-js-and-md", "lint-py", "lint-yaml", "lint-sh", "lint-codeowners", "lint-pr-url"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Coverage Windows

on:
workflow_run:
workflows: ["lint-addon-docs", "lint-cpp", "lint-js-and-md", "lint-py", "lint-yaml", "lint-sh", "lint-codeowners", "lint-pr-url"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test and upload documentation to artifacts

on:
workflow_run:
workflows: ["build-tarball"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Linters

on:
workflow_run:
workflows: ["lint-commit-message"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
Expand Down Expand Up @@ -37,6 +41,7 @@ jobs:
- name: Lint addon docs
run: NODE=$(command -v node) make lint-addon-docs
lint-cpp:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -52,6 +57,9 @@ jobs:
- name: Lint C/C++ files
run: make lint-cpp
format-cpp:
needs:
- lint-commit-message
- lint-cpp
if: ${{ github.event.pull_request && github.event.pull_request.draft == false && github.base_ref == github.event.repository.default_branch }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -90,6 +98,7 @@ jobs:
exit "$EXIT_CODE"
fi
lint-js-and-md:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -115,6 +124,7 @@ jobs:
env:
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }}
lint-py:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -132,6 +142,7 @@ jobs:
make lint-py-build
make lint-py
lint-yaml:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -150,6 +161,7 @@ jobs:
make lint-yaml
lint-sh:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -160,6 +172,7 @@ jobs:
- name: Lint Shell scripts
run: tools/lint-sh.mjs .
lint-codeowners:
needs: lint-commit-message
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand All @@ -170,6 +183,7 @@ jobs:
with:
checks: files,duppatterns
lint-pr-url:
needs: lint-commit-message
if: ${{ github.event.pull_request }}
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test ASan

on:
workflow_run:
workflows: ["build-tarball"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test Linux

on:
workflow_run:
workflows: ["build-tarball"]
types:
- completed
pull_request:
paths-ignore:
- README.md
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Test macOS

on:
workflow_run:
workflows: ["build-tarball"]
types:
- completed
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
Expand Down

0 comments on commit 4f289c1

Please sign in to comment.