diff --git a/.github/workflows/_dagger_on_depot_local_engine.yml b/.github/workflows/_dagger_on_depot_local_engine.yml index ee6cbd81ca0..402b04f3089 100644 --- a/.github/workflows/_dagger_on_depot_local_engine.yml +++ b/.github/workflows/_dagger_on_depot_local_engine.yml @@ -10,7 +10,8 @@ on: size: description: "Runner size" type: number - required: true + default: 16 + required: false timeout: description: "Timeout if not finished after this many minutes" type: number diff --git a/.github/workflows/_dagger_on_namespace_local_engine.yml b/.github/workflows/_dagger_on_namespace_local_engine.yml new file mode 100644 index 00000000000..dd3927a4c6d --- /dev/null +++ b/.github/workflows/_dagger_on_namespace_local_engine.yml @@ -0,0 +1,49 @@ +name: Dagger on Namespace - Local Engine + +on: + workflow_call: + inputs: + function: + description: "Dagger function" + type: string + required: true + size: + description: "Runner size" + type: number + default: 16 + required: false + timeout: + description: "Timeout if not finished after this many minutes" + type: number + default: 10 + required: false + dev: + description: "Use a development version of Dagger" + type: string + default: "false" + required: false + ubuntu: + description: "Ubuntu version" + type: string + default: "24.04" + required: false + +jobs: + local-dagger-engine: + if: ${{ github.repository == 'dagger/dagger' }} + runs-on: + - nscloud-ubuntu-${{ inputs.ubuntu }}-amd64-${{ inputs.size }}x32 + timeout-minutes: ${{ inputs.timeout }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: ${{ inputs.function }} + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + dev-engine: ${{ inputs.dev }} + - name: ${{ inputs.function }} (CACHE TEST) + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + dev-engine: ${{ inputs.dev }} diff --git a/.github/workflows/_dagger_on_namespace_remote_engine.yml b/.github/workflows/_dagger_on_namespace_remote_engine.yml new file mode 100644 index 00000000000..1eb2b4ce092 --- /dev/null +++ b/.github/workflows/_dagger_on_namespace_remote_engine.yml @@ -0,0 +1,52 @@ +name: Dagger on Namespace - Remote Engine + +on: + workflow_call: + inputs: + function: + description: "Dagger function" + type: string + required: true + size: + description: "Runner size - used by the Dagger Engine too" + type: number + default: 16 + required: false + timeout: + description: "Timeout if not finished after this many minutes" + type: number + default: 10 + required: false + dagger: + description: "Dagger version" + type: string + default: "0.15.0" + required: false + ubuntu: + description: "Ubuntu version" + type: string + default: "24.04" + required: false + +jobs: + remote-dagger-engine: + if: ${{ github.repository == 'dagger/dagger' }} + runs-on: + - nscloud-ubuntu-${{ inputs.ubuntu }}-amd64-${{ inputs.size }}x32 + - namespace-experiments:dagger.integration=enabled;dagger.version=${{ inputs.dagger }} + timeout-minutes: ${{ inputs.timeout }} + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: ${{ inputs.function }} + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + version: v${{ inputs.dagger }} + dev-engine: ${{ inputs.dev }} + - name: ${{ inputs.function }} (CACHE TEST) + uses: ./.github/actions/call + with: + function: ${{ inputs.function }} + version: v${{ inputs.dagger }} + dev-engine: ${{ inputs.dev }} diff --git a/.github/workflows/alternative-ci-runners.yml b/.github/workflows/alternative-ci-runners-1.yml similarity index 83% rename from .github/workflows/alternative-ci-runners.yml rename to .github/workflows/alternative-ci-runners-1.yml index ac1989a6e5c..acae81bab5a 100644 --- a/.github/workflows/alternative-ci-runners.yml +++ b/.github/workflows/alternative-ci-runners-1.yml @@ -1,4 +1,4 @@ -name: Alternative CI Runners +name: Alternative CI Runners 1 on: # Run the workflow every day TWICE: @@ -17,6 +17,12 @@ jobs: uses: ./.github/workflows/_dagger_on_depot_remote_engine.yml with: function: docs lint + docs-lint-on-depot-local-engine: + uses: ./.github/workflows/_dagger_on_depot_local_engine.yml + with: + function: docs lint + dev: true + timeout: 20 test-cli-engine-on-depot-remote-engine: needs: docs-lint-on-depot-remote-engine @@ -31,11 +37,12 @@ jobs: with: function: check --targets=sdk/go sdk-go-dev-on-depot-local-engine: + needs: sdk-go-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/go - size: 4 dev: true + timeout: 15 sdk-python-on-depot-remote-engine: needs: docs-lint-on-depot-remote-engine @@ -43,10 +50,10 @@ jobs: with: function: check --targets=sdk/python sdk-python-dev-on-depot-local-engine: + needs: sdk-python-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/python - size: 8 dev: true sdk-typescript-on-depot-remote-engine: @@ -55,8 +62,8 @@ jobs: with: function: check --targets=sdk/typescript sdk-typescript-dev-on-depot-local-engine: + needs: sdk-typescript-on-depot-remote-engine uses: ./.github/workflows/_dagger_on_depot_local_engine.yml with: function: check --targets=sdk/typescript - size: 8 dev: true diff --git a/.github/workflows/alternative-ci-runners-2.yml b/.github/workflows/alternative-ci-runners-2.yml new file mode 100644 index 00000000000..594ddba34e7 --- /dev/null +++ b/.github/workflows/alternative-ci-runners-2.yml @@ -0,0 +1,69 @@ +name: Alternative CI Runners 2 + +on: + # Run the workflow every day TWICE: + # 1. 9:06AM UTC (low activity) + # 2. 9:26AM UTC (cache test - high chance of no code changes) + schedule: + - cron: "6,26 9 * * *" + # Enable manual trigger for on-demand runs - helps when debugging + workflow_dispatch: + +permissions: + contents: read + +jobs: + docs-lint-on-namespace-remote-engine: + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: docs lint + timeout: 20 + docs-lint-on-namespace-local-engine: + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: docs lint + dev: true + timeout: 20 + + test-cli-engine-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: test specific --run='TestCLI|TestEngine' --race=true --parallel=16 + timeout: 20 + + sdk-go-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/go + sdk-go-dev-on-namespace-local-engine: + needs: sdk-go-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/go + dev: true + + sdk-python-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/python + sdk-python-dev-on-namespace-local-engine: + needs: sdk-python-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/python + dev: true + + sdk-typescript-on-namespace-remote-engine: + needs: docs-lint-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_remote_engine.yml + with: + function: check --targets=sdk/typescript + sdk-typescript-dev-on-namespace-local-engine: + needs: sdk-typescript-on-namespace-remote-engine + uses: ./.github/workflows/_dagger_on_namespace_local_engine.yml + with: + function: check --targets=sdk/typescript + dev: true