From 7ddc19bfa7382276c0fc57c8b873c152b630765c Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 10:41:00 +0000 Subject: [PATCH 1/2] [CI] Build the nightly installers when OpenMS has published its nightly The nightly installers ran on the 04:23 UTC schedule and waited up to two hours for /OpenMSInstaller/nightly/. OpenMS publishes no nightly on a day without a new commit on develop (update_nightly.yml then starts no release) or when its release fails, so the installer jobs failed on all platforms (e.g. 2026-11-16, -19, -23, -30). The job 'installers' now runs only on the repository dispatch 'openms-core-nightly', which the release workflow of OpenMS sends once it has uploaded its nightly installers (OpenMS/OpenMS#11021), or on a manual run that asks for it. The schedule keeps the source build and tests against develop. A dispatch runs them too only when it names a client_payload.ref. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZodXGhChZB7AQzpkp --- .github/workflows/nightly.yml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index ff0d595f..3f8d9bd4 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -7,22 +7,23 @@ name: "Nightly" # requests of this repository use. # # Triggers: -# - schedule: after the nightly of OpenMS (its update_nightly workflow starts at -# 01:07 UTC and its release workflow publishes the installers about an hour -# later). -# - repository_dispatch, event type 'openms-core-nightly': OpenMS can start this -# workflow at the end of its nightly release workflow, e.g. +# - schedule: the source build and tests against OpenMS develop (job 'test'), which +# also refreshes the cached core of the pull requests. +# - repository_dispatch, event type 'openms-core-nightly': sent by the release +# workflow of OpenMS (job trigger-gui-nightly) once it has uploaded the OpenMS +# nightly installers, and only then. This builds and deploys the nightly +# installers of the GUI layer (release.yml) on top of them. OpenMS makes no +# nightly on a day without a new commit on develop, or when its release fails; +# the GUI then makes none either, instead of waiting for an archive folder that +# never appears. To send it by hand: # gh api repos/OpenMS/OpenMS-TOPP-GUI/dispatches \ # -f event_type=openms-core-nightly -# with a token that may dispatch workflows in this repository. client_payload.ref -# (optional, e.g. -f 'client_payload[ref]=develop') is the OpenMS branch, tag or -# commit to build (default: develop). Only a build of develop is the cached core -# of the pull requests; a commit gets a cache entry of its own and a full version -# string without a branch name. -# - workflow_dispatch. -# -# Automatic runs build and deploy the nightly installers (release.yml) on top of -# the OpenMS nightly installers of the same day. Manual runs can opt in below. +# with a token that may dispatch workflows in this repository. An optional +# client_payload.ref (e.g. -f 'client_payload[ref]=develop') also runs the +# source build and tests against that OpenMS branch, tag or commit. Only a build +# of develop is the cached core of the pull requests; a commit gets a cache entry +# of its own and a full version string without a branch name. +# - workflow_dispatch: the source build and tests; the installers only if asked. on: schedule: - cron: "23 4 * * *" @@ -49,6 +50,8 @@ concurrency: jobs: test: name: "Test against OpenMS ${{ inputs.core_ref || github.event.client_payload.ref || 'develop' }}" + # the dispatch from the OpenMS release is for the installers; the schedule tests develop + if: ${{ github.event_name != 'repository_dispatch' || github.event.client_payload.ref }} uses: ./.github/workflows/test.yml with: core_mode: source @@ -58,7 +61,8 @@ jobs: installers: name: "Nightly Installers" - if: ${{ github.event_name != 'workflow_dispatch' || inputs.installers }} + # only on top of OpenMS nightly installers that exist (see Triggers above) + if: ${{ github.event_name == 'repository_dispatch' || (github.event_name == 'workflow_dispatch' && inputs.installers) }} uses: ./.github/workflows/release.yml permissions: contents: write From f561bc0638eaadbc960214738bfd98ed04aa70fb Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 30 Nov 2026 11:51:13 +0000 Subject: [PATCH 2/2] [CI] Nightly installers: build on the dispatched date, own concurrency group Two gaps of the dispatch-driven installers (review of #4): - release.yml finds the OpenMS nightly by the date of its own run. A run that starts after midnight UTC waited for the next day's folder and failed. New input core_version (nightly builds only, YYYY.MM.DD, checked) names the folder instead: for the core lookup, the smoke test and the upload folder. nightly.yml passes client_payload.version, which the OpenMS release now sends (OpenMS/OpenMS#11021); without it the run date is used as before. - Scheduled runs (test) and installer-only dispatches shared one concurrency group, in which GitHub keeps a single pending run: a waiting run of the one kind could replace one of the other, losing that day's test or installers. Each kind now has its own group; a dispatch with client_payload.ref, which also runs the test, stays in the test group. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0149aXmZodXGhChZB7AQzpkp --- .github/workflows/nightly.yml | 12 +++++++++-- .github/workflows/release.yml | 38 ++++++++++++++++++++++++++++++++--- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3f8d9bd4..b30d7201 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -18,7 +18,10 @@ name: "Nightly" # never appears. To send it by hand: # gh api repos/OpenMS/OpenMS-TOPP-GUI/dispatches \ # -f event_type=openms-core-nightly -# with a token that may dispatch workflows in this repository. An optional +# with a token that may dispatch workflows in this repository. OpenMS sends +# client_payload.version, the date YYYY.MM.DD of its nightly (default: the date of +# this run): the installers are built on that folder of the archive and uploaded +# next to it, also when the run starts after midnight UTC. An optional # client_payload.ref (e.g. -f 'client_payload[ref]=develop') also runs the # source build and tests against that OpenMS branch, tag or commit. Only a build # of develop is the cached core of the pull requests; a commit gets a cache entry @@ -43,8 +46,12 @@ on: permissions: contents: read +# One run of each kind at a time, the next one waiting: the source builds (they refresh +# the cached core) and the installer-only dispatches. One group for both would let a +# waiting run of the one kind replace a waiting run of the other (GitHub keeps one +# pending run per group), and that day's test or installers would be lost. concurrency: - group: nightly-openms-core + group: nightly-openms-core-${{ (github.event_name == 'repository_dispatch' && !github.event.client_payload.ref) && 'installers' || 'test' }} cancel-in-progress: false jobs: @@ -68,4 +75,5 @@ jobs: contents: write with: deploy: true + core_version: ${{ github.event.client_payload.version || '' }} secrets: inherit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e77c1b65..daad1a81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,7 +10,9 @@ name: "Release" # tag of this repository, otherwise the branch nightly (the commit of today's # OpenMS nightly installers), unless the input core_ref says otherwise. The smoke # test takes the OpenMS installer of the same version from the archive server -# (release/X.Y.Z, or nightly/). +# (release/X.Y.Z, or nightly/). The date is the input core_version when given +# (nightly.yml passes the date of the OpenMS nightly that started it), otherwise the +# date of this run. on: workflow_dispatch: inputs: @@ -29,6 +31,10 @@ on: description: "Where the OpenMS core comes from: source, sdk, or empty for the default of the openms-core action" type: string default: "" + core_version: + description: "Nightly builds: the date YYYY.MM.DD of the OpenMS nightly to build on (default: today)" + type: string + default: "" # used by nightly.yml for the nightly installers workflow_call: inputs: @@ -41,6 +47,9 @@ on: core_mode: type: string default: "" + core_version: + type: string + default: "" push: tags: - 'v[0-9]*' @@ -54,8 +63,8 @@ jobs: runs-on: ubuntu-latest outputs: has_version: ${{ steps.version.outputs.has_version }} - version: ${{ steps.version.outputs.version }} - version_name: ${{ steps.version.outputs.name }} + version: ${{ steps.nightly.outputs.version || steps.version.outputs.version }} + version_name: ${{ steps.nightly.outputs.name || steps.version.outputs.name }} version_type: ${{ steps.version.outputs.type }} core_ref: ${{ steps.core.outputs.ref }} core_channel: ${{ steps.core.outputs.channel }} @@ -70,6 +79,29 @@ jobs: id: version uses: ./.github/actions/version + # The folder nightly/ of the OpenMS nightly that started this run. The date of + # this run would name the next day's folder after midnight UTC, which does not exist yet. + - name: Take the Date of the OpenMS Nightly + id: nightly + if: inputs.core_version != '' + shell: bash + env: + CORE_VERSION: ${{ inputs.core_version }} + TYPE: ${{ steps.version.outputs.type }} + run: | + if [[ ! "$CORE_VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then + echo >&2 "ERROR: core_version '$CORE_VERSION' is not a nightly date YYYY.MM.DD" + exit 1 + fi + if [[ "$TYPE" != nightly ]]; then + echo >&2 "ERROR: core_version is for nightly builds, this is a build of type '$TYPE'" + exit 1 + fi + { + echo "version=$CORE_VERSION" + echo "name=nightly-$CORE_VERSION" + } | tee -a "$GITHUB_OUTPUT" + - name: Choose the OpenMS Core id: core shell: bash