From 15ce4286724fd87e1fe903e62ef65b0357e841d9 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Wed, 17 Jan 2024 12:41:52 -0500 Subject: [PATCH] ci: run all workflows on config change (#1829) Signed-off-by: Jared Van Bortel --- .circleci/config.yml | 1 + .circleci/continue_config.yml | 37 ++++++++++++++++++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb6525c5..56d88671 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,6 +11,7 @@ workflows: base-revision: main config-path: .circleci/continue_config.yml mapping: | + .circleci/.* run-all-workflows true gpt4all-bindings/python/.* run-python-workflow true gpt4all-bindings/typescript/.* run-ts-workflow true gpt4all-bindings/csharp/.* run-csharp-workflow true diff --git a/.circleci/continue_config.yml b/.circleci/continue_config.yml index d526c72b..5f72c613 100644 --- a/.circleci/continue_config.yml +++ b/.circleci/continue_config.yml @@ -5,6 +5,9 @@ orbs: node: circleci/node@5.1 parameters: + run-all-workflows: + type: boolean + default: false run-default-workflow: type: boolean default: false @@ -1011,11 +1014,17 @@ jobs: workflows: version: 2 default: - when: << pipeline.parameters.run-default-workflow >> + when: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-default-workflow >> jobs: - default-job build-chat-offline-installers: - when: << pipeline.parameters.run-chat-workflow >> + when: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-chat-workflow >> jobs: - hold: type: approval @@ -1029,7 +1038,10 @@ workflows: requires: - hold build-and-test-gpt4all-chat: - when: << pipeline.parameters.run-chat-workflow >> + when: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-chat-workflow >> jobs: - hold: type: approval @@ -1043,7 +1055,10 @@ workflows: requires: - hold deploy-docs: - when: << pipeline.parameters.run-python-workflow >> + when: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-python-workflow >> jobs: - build-ts-docs: filters: @@ -1056,7 +1071,10 @@ workflows: only: - main build-py-deploy: - when: << pipeline.parameters.run-python-workflow >> + when: + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-python-workflow >> jobs: - pypi-hold: type: approval @@ -1091,10 +1109,11 @@ workflows: - build-py-macos build-bindings: when: - or: - - << pipeline.parameters.run-python-workflow >> - - << pipeline.parameters.run-csharp-workflow >> - - << pipeline.parameters.run-ts-workflow >> + or: + - << pipeline.parameters.run-all-workflows >> + - << pipeline.parameters.run-python-workflow >> + - << pipeline.parameters.run-csharp-workflow >> + - << pipeline.parameters.run-ts-workflow >> jobs: - hold: type: approval