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 12f7d94
Show file tree
Hide file tree
Showing 10 changed files with 95 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
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
12 changes: 12 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
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
12 changes: 12 additions & 0 deletions .github/workflows/coverage-linux-without-intl.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
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
12 changes: 12 additions & 0 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
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
12 changes: 12 additions & 0 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
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
5 changes: 5 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
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
15 changes: 15 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
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 +42,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 +58,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 +99,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 +125,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 +143,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 +162,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 +173,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 +184,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
5 changes: 5 additions & 0 deletions .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Test ASan

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

on:
workflow_run:
workflows:
- "build-tarball"
types:
- completed
pull_request:
paths-ignore:
- README.md
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
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 12f7d94

Please sign in to comment.