diff --git a/.github/workflows/AddToProject.yml b/.github/workflows/AddToProject.yml new file mode 100644 index 0000000..2d01d14 --- /dev/null +++ b/.github/workflows/AddToProject.yml @@ -0,0 +1,13 @@ +name: Add to Project + +on: + issues: + types: [opened] + pull_request: + types: [opened] + +jobs: + call: + uses: control-toolbox/CTActions/.github/workflows/add-to-project.yml@main + secrets: + project_token: ${{ secrets.PROJECT_TOKEN }} diff --git a/.github/workflows/Breakage.yml b/.github/workflows/Breakage.yml index 46bd309..f45f597 100644 --- a/.github/workflows/Breakage.yml +++ b/.github/workflows/Breakage.yml @@ -5,13 +5,22 @@ name: Breakage # no access to secrets on: pull_request: + types: [labeled, synchronize, reopened] jobs: call: + # A 'labeled' event fires once per label added, and re-evaluates against the PR's + # *current* full label set — so adding several labels in a row would otherwise + # re-run this job on every subsequent label add. Only react to 'labeled' when it's + # this specific label; for other trigger types (synchronize/reopened), fall back to + # checking the current label set as before. + if: > + (github.event.action == 'labeled' && github.event.label.name == 'run breakage') || + (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'run breakage')) strategy: fail-fast: false matrix: - pkgname: [OptimalControl] + pkgname: [CTDirect, OptimalControl] pkgversion: [latest, stable] include: - pkgpath: control-toolbox diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4d14199..d23f82d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -6,23 +6,40 @@ on: - main tags: '*' pull_request: - + types: [labeled, synchronize, reopened] + jobs: - # Job for the GitHub hosted runners (ubuntu, windows, macos) - test-github: + # Job for the GitHub hosted runners (ubuntu, macos, windows) + test-github-runner: + # A 'labeled' event fires once per label added, and re-evaluates against the PR's + # *current* full label set — so adding several labels in a row would otherwise + # re-run this job on every subsequent label add. Only react to 'labeled' when it's + # this specific label; for other trigger types (synchronize/reopened), fall back to + # checking the current label set as before. + if: > + github.event_name != 'pull_request' || + (github.event.action == 'labeled' && github.event.label.name == 'github-runner') || + (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'github-runner')) uses: control-toolbox/CTActions/.github/workflows/ci.yml@main with: - runs_on: '["ubuntu-latest", "macos-latest"]' + runs_on: '["ubuntu-latest", "macos-latest", "windows-latest"]' runner_type: 'github' use_ct_registry: true secrets: SSH_KEY: ${{ secrets.SSH_KEY }} -# Job for the self-hosted runner moonshot (GPU/CUDA) -#  test-moonshot: -#  uses: control-toolbox/CTActions/.github/workflows/ci.yml@main -#  with: -#  versions: '["1"]' -#  runs_on: '["moonshot"]' -#  archs: '["x64"]' -#  runner_type: 'self-hosted' + # Job for the self-hosted runner kkt (GPU/CUDA) + test-kkt-runner: + # See the comment on test-github-runner above. + if: > + github.event_name != 'pull_request' || + (github.event.action == 'labeled' && github.event.label.name == 'kkt-runner') || + (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'kkt-runner')) + uses: control-toolbox/CTActions/.github/workflows/ci.yml@main + with: + versions: '["1"]' + runs_on: '[["kkt"]]' + runner_type: 'self-hosted' + use_ct_registry: true + secrets: + SSH_KEY: ${{ secrets.SSH_KEY }} diff --git a/.github/workflows/Coverage.yml b/.github/workflows/Coverage.yml index d422e2f..b569a56 100644 --- a/.github/workflows/Coverage.yml +++ b/.github/workflows/Coverage.yml @@ -1,5 +1,5 @@ # [.github/workflows/coverage.yml] -name: coverage +name: Coverage on: push: branches: diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 243c3b2..ae79022 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -1,12 +1,25 @@ name: Documentation + on: push: branches: - main - tags: '*' + tags: + - 'v[0-9]+\.[0-9]+\.[0-9]+' # v0.8.7 yes, v0.8.7-beta no pull_request: + types: [labeled, synchronize, reopened] + jobs: call: + # A 'labeled' event fires once per label added, and re-evaluates against the PR's + # *current* full label set — so adding several labels in a row would otherwise + # re-run this job on every subsequent label add. Only react to 'labeled' when it's + # this specific label; for other trigger types (synchronize/reopened), fall back to + # checking the current label set as before. + if: > + github.event_name != 'pull_request' || + (github.event.action == 'labeled' && github.event.label.name == 'run documentation') || + (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'run documentation')) uses: control-toolbox/CTActions/.github/workflows/documentation.yml@main with: use_ct_registry: true