diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e727ea115..a03d38b974 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,30 @@ # Use the latest 2.1 version of CircleCI pipeline process engine. # See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 +parameters: + GHA_Actor: + type: string + default: "" + GHA_Action: + type: string + default: "" + GHA_Event: + type: string + default: "" + GHA_Meta: + type: string + default: "" + run_workflow_build: + default: true + type: boolean + + run_workflow_test: + default: true + type: boolean + + run_workflow_lint: + default: true + type: boolean orbs: node: circleci/node@5.1.0 @@ -566,14 +590,15 @@ jobs: # See: https://circleci.com/docs/2.0/configuration-reference/#workflows workflows: check_canary: + when: << pipeline.parameters.GHA_Action >> jobs: - build_canary: name: Check canary build filters: tags: ignore: /.*/ - test: + when: << pipeline.parameters.GHA_Action >> jobs: - build_webui - test: @@ -602,6 +627,7 @@ workflows: - test python: + when: << pipeline.parameters.GHA_Action >> jobs: - build_swagger: name: build-swagger-spec @@ -625,8 +651,9 @@ workflows: branches: ignore: /.*/ # don't run on any branches - only tags !!merge <<: *build_on_branch_and_tag_push - + build: + when: << pipeline.parameters.GHA_Action >> jobs: - build_webui: filters: *build_on_branch_and_tag_push diff --git a/.circleci/trigger_pipeline.sh b/.circleci/trigger_pipeline.sh new file mode 100755 index 0000000000..436c8c788e --- /dev/null +++ b/.circleci/trigger_pipeline.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +curl -X POST --header "Content-Type: application/json" --header "Circle-Token: ${CIRCLE_TOKEN}" -d "{ + \"parameters\": { + \"GHA_Action\": \"trigger_pipeline\" + }, + \"branch\": \"${BRANCH}\" +}" https://circleci.com/api/v2/project/gh/bacalhau-project/bacalhau/pipeline \ No newline at end of file diff --git a/.cspell-code.json b/.cspell-code.json index 943006ab76..2e846c2e82 100644 --- a/.cspell-code.json +++ b/.cspell-code.json @@ -4,14 +4,15 @@ "allowCompoundWords": true, "dictionaryDefinitions": [ { - "name": "custom-words", - "path": ".gitprecommit/codespell_ignore_words.txt", + "name": "custom-dictionary", + "path": "./.cspell/custom-dictionary.txt", "addWords": true } ], "dictionaries": [ "en", - "custom-words" + "custom-words", + "custom-dictionary" ], "ignorePaths": [ "**/package.json", @@ -48,4 +49,4 @@ "/github.com.*/", "/\\w+{12,}/" ] -} \ No newline at end of file +} diff --git a/.cspell-docs.json b/.cspell-docs.json index 087cc7a044..203b0484e4 100644 --- a/.cspell-docs.json +++ b/.cspell-docs.json @@ -4,8 +4,8 @@ "allowCompoundWords": true, "dictionaryDefinitions": [ { - "name": "custom-words", - "path": ".gitprecommit/codespell_ignore_words.txt", + "name": "custom-dictionary", + "path": "./.cspell/custom-dictionary.txt", "addWords": true } ], diff --git a/.gitprecommit/codespell_ignore_words.txt b/.cspell/custom-dictionary.txt similarity index 98% rename from .gitprecommit/codespell_ignore_words.txt rename to .cspell/custom-dictionary.txt index 1a27edd064..d5c194661a 100644 --- a/.gitprecommit/codespell_ignore_words.txt +++ b/.cspell/custom-dictionary.txt @@ -1,3 +1,4 @@ +# Custom Dictionary Words abcdefghi Acked acks @@ -267,6 +268,7 @@ sdkmetric sdktrace sharded shellescape +skippable softmax sparkoperator stackdriver @@ -308,6 +310,7 @@ wazero wdbaruni's webui wesbos +whyayen winderresearch workdir Wrapf @@ -315,4 +318,4 @@ writefile xlarge xmap xvfz -zerolog +zerolog \ No newline at end of file diff --git a/.github/workflows/circleci.yml b/.github/workflows/circleci.yml new file mode 100644 index 0000000000..1281d6bd04 --- /dev/null +++ b/.github/workflows/circleci.yml @@ -0,0 +1,25 @@ +name: CircleCI Trigger Action +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + trigger-circle-ci: + if: | + !contains(github.event.pull_request.labels.*.name, 'do-not-merge') && + !contains(github.event.pull_request.labels.*.name, 'wip') + runs-on: ubuntu-latest + name: Pull Request Triggered CircleCI + steps: + - uses: LedgerHQ/actions/gh-context@main + - uses: actions/checkout@v3 + - name: Trigger CircleCI + id: trigger-circle-ci + run: | + ./.circleci/trigger_pipeline.sh + env: + CIRCLE_TOKEN: ${{ secrets.CIRCLE_CI_TOKEN }} + BRANCH: ${{ github.event.pull_request.head.ref }} + diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 920bfb689a..204972fdcb 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,6 +14,10 @@ jobs: make spellcheck-docs build: + if: | + github.event_name == 'pull_request' && + !contains(github.event.pull_request.labels.*.name, 'do-not-merge') && + !contains(github.event.pull_request.labels.*.name, 'wip') runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -33,10 +37,15 @@ jobs: path: docs/build/ deploy: + runs-on: ubuntu-latest needs: build - - if: github.ref == 'refs/heads/main' + if: | + github.event_name == 'pull_request' && + github.ref == 'refs/heads/main' && + !contains(github.event.pull_request.labels.*.name, 'do-not-merge') && + !contains(github.event.pull_request.labels.*.name, 'wip') + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: diff --git a/README.md b/README.md index 079d59ac8c..120fa8a9ef 100644 --- a/README.md +++ b/README.md @@ -37,16 +37,19 @@ [Bacalhau](https://www.bacalhau.org/) is a platform for fast, cost efficient, and secure computation by running jobs where the data is generated and stored. With Bacalhau you can streamline your existing workflows without the need of extensive rewriting by running arbitrary Docker containers and WebAssembly (wasm) images as tasks. ## Table of Contents -- [Why Bacalhau](#why-bacalhau) -- [Getting started](#getting-started---bacalhau-in-1-minute) +- [Table of Contents](#table-of-contents) +- [Why Bacalhau?](#why-bacalhau) +- [Getting started - Bacalhau in 1 minute](#getting-started---bacalhau-in-1-minute) - [Learn more](#learn-more) - [Documentation](#documentation) - [Developers guide](#developers-guide) - [Running Bacalhau locally](#running-bacalhau-locally) - [Notes for Dev contributors](#notes-for-dev-contributors) -- [Ways to contribute ](#ways-to-contribute) -- [Current state of Bacalhau](#current-state-of-bacalhau-) -- [License](#license) + - [OpenAPI](#openapi) + - [Python Libraries](#python-libraries) +- [Issues, feature requests, and questions](#issues-feature-requests-and-questions) +- [Ways to contribute](#ways-to-contribute) +- [Open Source](#open-source) ## Why Bacalhau? - :zap: **Fast job processing**: Jobs in Bacalhau are processed where the data was created and all jobs are parallel by default. @@ -161,4 +164,4 @@ Others are allowed to make their own distribution of the software, but they cann We explicitly grant permission for you to make a build that includes our trademarks while developing Bacalhau software itself. You may not publish or share the build, and you may not use that build to run Bacalhau software for any other purpose. -We have borrowed the above Open Source clause from the excellent [System Initiative](https://github.com/systeminit/si/blob/main/CONTRIBUTING.md) +We have borrowed the above Open Source clause from the excellent [System Initiative](https://github.com/systeminit/si/blob/main/CONTRIBUTING.md) \ No newline at end of file diff --git a/cspell.json b/cspell.json index 720649f27d..04e1d69bf5 100644 --- a/cspell.json +++ b/cspell.json @@ -3,7 +3,6 @@ "ignorePaths": [], "dictionaryDefinitions": [], "dictionaries": [], - "words": [], "ignoreWords": [], - "import": ["./.cspell-docs.json", "./.cspell-code.json"] + "import": [".cspell-docs.json", ".cspell-code.json"] } diff --git a/integration/flyte/Makefile b/integration/flyte/Makefile index 6f0d2684a6..4b831d4814 100644 --- a/integration/flyte/Makefile +++ b/integration/flyte/Makefile @@ -30,5 +30,5 @@ lint: ## Run linters .PHONY: spellcheck spellcheck: ## Runs a spellchecker over all code and documentation - codespell -L "te,raison,fo" --skip="./docs/build,./.git" --ignore-words="./.gitprecommit/codespell_ignore_words.txt" + codespell -L "te,raison,fo" --skip="./docs/build,./.git" --ignore-words="./.cspell/custom-dictionary.txt"