diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1f8e0a93..0edd45eb 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -18,7 +18,7 @@ permissions: jobs: analyze: - uses: bernardladenthin/actions/.github/workflows/java-codeql.yml@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/.github/workflows/java-codeql.yml@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 permissions: actions: read contents: read diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index cbcee082..5b6bc423 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -16,6 +16,6 @@ permissions: jobs: submit: - uses: bernardladenthin/actions/.github/workflows/java-maven-dependency-submission.yml@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/.github/workflows/java-maven-dependency-submission.yml@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 permissions: contents: write diff --git a/.github/workflows/osv-scanner.yml b/.github/workflows/osv-scanner.yml index b1e93325..1aec5eee 100644 --- a/.github/workflows/osv-scanner.yml +++ b/.github/workflows/osv-scanner.yml @@ -19,7 +19,7 @@ permissions: jobs: scan: - uses: bernardladenthin/actions/.github/workflows/osv-scanner.yml@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/.github/workflows/osv-scanner.yml@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 permissions: actions: read contents: read diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df9d71c3..70060202 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -48,6 +48,11 @@ concurrency: permissions: contents: read +env: + # The minutes an artifact upload or download may take (see bernardladenthin/actions, + # common/check-artifact-timeouts): the repository variable, else 20. + ARTIFACT_TIMEOUT_MINUTES: ${{ vars.ARTIFACT_TIMEOUT_MINUTES || '20' }} + jobs: # --------------------------------------------------------------------------- # Start gate — single cancellable abort window before the pipeline starts. @@ -56,6 +61,12 @@ jobs: # --------------------------------------------------------------------------- startgate: name: Start gate (abort window) + # A pull request Dependabot opens or rebases does not start the pipeline: Dependabot + # opens one per update and rebases each on every change of main, and its runs get none of + # the repository's secrets. Every job needs this one, so all of them are skipped. The merge + # to main runs the pipeline, a push of a person to the branch runs it too, and a run on + # the branch can be started by hand (workflow_dispatch). + if: github.event_name != 'pull_request' || github.actor != 'dependabot[bot]' runs-on: ubuntu-latest environment: startgate steps: @@ -77,15 +88,17 @@ jobs: with: persist-credentials: false - name: Files equal their templates in bernardladenthin/actions - uses: bernardladenthin/actions/common/check-templates@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/common/check-templates@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Release gate (every job gates both publish jobs, or release-gate-exemptions.txt says why) - uses: bernardladenthin/actions/common/check-release-gate@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/common/check-release-gate@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Run scripts parse (bash -n over every bash run script of the workflows and actions) - uses: bernardladenthin/actions/common/check-run-scripts@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/common/check-run-scripts@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 + - name: Artifact timeouts (every upload/download-artifact step times out after ARTIFACT_TIMEOUT_MINUTES) + uses: bernardladenthin/actions/common/check-artifact-timeouts@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Maven versions (warns where a dependency or plugin differs from a sibling repository) - uses: bernardladenthin/actions/java/check-maven-versions@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/check-maven-versions@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Publication wiring and release asset contract (dry run) - uses: bernardladenthin/actions/java/check-publication@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/check-publication@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 # --------------------------------------------------------------------------- # GPG signing-key preflight: what maven-gpg-plugin does at deploy time, so a @@ -104,7 +117,7 @@ jobs: runs-on: ubuntu-latest environment: maven-central steps: - - uses: bernardladenthin/actions/common/verify-gpg-key@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/common/verify-gpg-key@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: private-key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -125,7 +138,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: persist-credentials: false - - uses: bernardladenthin/actions/java/verify-signing-key-gradle@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/java/verify-signing-key-gradle@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: private-key: ${{ secrets.GPG_PRIVATE_KEY }} passphrase: ${{ secrets.GPG_PASSPHRASE }} @@ -192,7 +205,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Display CPU Info - uses: bernardladenthin/actions/common/print-host-info@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/common/print-host-info@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0 with: java-version-file: .java-version @@ -267,6 +280,7 @@ jobs: if: failure() run: docker logs llama-server || true - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} with: name: jacoco-report # srcmorph carries the bulk of the test suite; its report is @@ -282,12 +296,13 @@ jobs: # Echo the crash logs into the job log (workspace/policies/ci-test-diagnostics.md 3.1). - name: Print crash logs (on failure) if: failure() - uses: bernardladenthin/actions/java/print-crash-logs@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/print-crash-logs@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: modules: srcmorph srcmorph-cli srcmorph-maven-plugin - name: Upload crash & surefire dumps if: failure() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} with: name: crash-dumps-test # Repo-wide glob: a forked surefire JVM crash can happen in any of the three module @@ -323,6 +338,7 @@ jobs: fi done - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} if: always() with: { name: pit-reports, path: "*/target/pit-reports/" } @@ -333,7 +349,7 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - name: Display CPU Info - uses: bernardladenthin/actions/common/print-host-info@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/common/print-host-info@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0 with: { java-version-file: .java-version, distribution: temurin, cache: maven } - name: Test under vmlens (one class — staged scope) @@ -353,6 +369,7 @@ jobs: mvn --batch-mode --no-transfer-progress -pl srcmorph-maven-plugin -am -Pvmlens test -Dtest=VmlensInterleavingSmokeTest -DfailIfNoTests=false -Dsurefire.failIfNoSpecifiedTests=false - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} if: always() with: name: vmlens-report @@ -405,13 +422,13 @@ jobs: # META-INF/versions/** are skipped because a classpath JVM never loads them. The # java/verify-bytecode action of bernardladenthin/actions. - name: Verify Java 8 bytecode (no class newer than major 52) - uses: bernardladenthin/actions/java/verify-bytecode@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/verify-bytecode@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: max-major: "52" paths: | smoke-jars - name: Run the jar - uses: bernardladenthin/actions/java/smoke-fatjar-cli@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/smoke-fatjar-cli@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: jar-dir: smoke-jars jar-glob: 'srcmorph.jar' @@ -423,7 +440,7 @@ jobs: # the working directory, so a launch that resolves them anywhere else (a wrong base directory, # a lost subtree) fails here; run from examples/, the two would be the same directory. - name: Run the jar from the root and count the planned files - uses: bernardladenthin/actions/java/smoke-fatjar-cli@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/smoke-fatjar-cli@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: jar-dir: smoke-jars jar-glob: 'srcmorph.jar' @@ -451,6 +468,7 @@ jobs: - name: Upload smoke logs if: failure() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} with: name: smoke-jar-logs path: | @@ -511,6 +529,7 @@ jobs: - name: Upload integration-test logs if: failure() uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} with: name: plugin-it-logs path: | @@ -570,6 +589,7 @@ jobs: # pointed at it directly rather than an aggregated multi-module report, matching the # single-primary-module precedent already used by the sibling java-llama.cpp reactor. - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8 + timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }} with: { name: jacoco-report, path: srcmorph/target/site/jacoco/ } continue-on-error: true # The dependency graph is submitted by dependency-submission.yml (on pushes to main, with the @@ -604,7 +624,7 @@ jobs: # a release is tagged on. - name: Require a SNAPSHOT version if: inputs.publish_to_central - uses: bernardladenthin/actions/java/check-release-ref@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/check-release-ref@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: snapshot @@ -619,7 +639,7 @@ jobs: persist-credentials: false # The tag names exactly the project version (v1.2.3 for 1.2.3), which is no SNAPSHOT. - name: Require the release version the tag names - uses: bernardladenthin/actions/java/check-release-ref@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/check-release-ref@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: release @@ -664,7 +684,7 @@ jobs: *) echo "::error::Refusing to publish non-SNAPSHOT version '$VERSION' from the snapshot job. Snapshot publishing requires a -SNAPSHOT version; releases go through the v* tag path."; exit 1 ;; esac # The collect step runs actionlib of bernardladenthin/actions (on PYTHONPATH from here). - - uses: bernardladenthin/actions/common/setup@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/common/setup@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Show effective POM (debug) run: mvn --batch-mode --no-transfer-progress -P release -DskipUpload=true help:effective-pom - name: Stage snapshot @@ -675,7 +695,7 @@ jobs: run: python3 -m actionlib.java.releaseassets central-assets --maven-only - name: Finalize and secure the signed publication id: finalize - uses: bernardladenthin/actions/java/finalize-publication@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/finalize-publication@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: snapshot maven-assets: central-assets @@ -692,7 +712,7 @@ jobs: permissions: contents: write steps: - - uses: bernardladenthin/actions/java/publish-github@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/java/publish-github@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: snapshot assets-complete: ${{ needs.publish-snapshot.outputs.assets_complete }} @@ -730,7 +750,7 @@ jobs: gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE # The collect step runs actionlib of bernardladenthin/actions (on PYTHONPATH from here). - - uses: bernardladenthin/actions/common/setup@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/common/setup@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 - name: Show effective POM (debug) run: mvn --batch-mode --no-transfer-progress -P release -DskipUpload=true help:effective-pom - name: Stage release @@ -741,7 +761,7 @@ jobs: run: python3 -m actionlib.java.releaseassets central-assets --maven-only - name: Finalize and secure the signed publication id: finalize - uses: bernardladenthin/actions/java/finalize-publication@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/finalize-publication@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: release maven-assets: central-assets @@ -755,7 +775,7 @@ jobs: permissions: contents: write steps: - - uses: bernardladenthin/actions/java/publish-github@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/java/publish-github@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: release assets-complete: ${{ needs.publish-release.outputs.assets_complete }} @@ -780,7 +800,7 @@ jobs: with: persist-credentials: false - name: Transfer frozen artifacts (no rebuild, signing or validation polling) - uses: bernardladenthin/actions/java/publish-central@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/publish-central@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: snapshot assets-complete: ${{ needs.publish-snapshot.outputs.assets_complete }} @@ -801,7 +821,7 @@ jobs: with: persist-credentials: false - name: Transfer frozen artifacts (no rebuild, signing or validation polling) - uses: bernardladenthin/actions/java/publish-central@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/java/publish-central@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: release assets-complete: ${{ needs.publish-release.outputs.assets_complete }} @@ -819,7 +839,7 @@ jobs: id-token: write attestations: write steps: - - uses: bernardladenthin/actions/java/attest-publication@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/java/attest-publication@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: snapshot assets-complete: ${{ needs.publish-snapshot.outputs.assets_complete }} @@ -835,7 +855,7 @@ jobs: id-token: write attestations: write steps: - - uses: bernardladenthin/actions/java/attest-publication@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + - uses: bernardladenthin/actions/java/attest-publication@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 with: channel: release assets-complete: ${{ needs.publish-release.outputs.assets_complete }} diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 94068e2b..4ee9060e 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -14,4 +14,4 @@ permissions: jobs: test: - uses: bernardladenthin/actions/.github/workflows/reuse.yml@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/.github/workflows/reuse.yml@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index b6c522b5..48f4863d 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -18,6 +18,6 @@ permissions: jobs: build: - uses: bernardladenthin/actions/.github/workflows/java-sonarqube.yml@a9386a26fe6706204cb4d975e6958d29bc783624 # v1.1.1 + uses: bernardladenthin/actions/.github/workflows/java-sonarqube.yml@68dde11a60623d76c22a3f1975355a236a6ccd39 # v1.2.0 secrets: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 864f4ea0..8e4cf6c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -378,6 +378,21 @@ The entries below hold the details; what a 1.4.0 user changes: search scores from `scores/` (Pearson and Spearman, the card's 32 runs by default). ### Changed +- **CI: every artifact upload and download step times out**, after the minutes of the repository + variable `ARTIFACT_TIMEOUT_MINUTES`, else 20 (7 steps in `publish.yml`). In a Publish run of + java-llama.cpp an `upload-artifact` step hung for hours after a build of a minute and a half, + with GitHub's 360-minute default the only limit; the longest transfer measured over two complete + runs of that pipeline took 18 s. The workflow's top-level `env` reads the variable with the + default, each step says `timeout-minutes: ${{ fromJSON(env.ARTIFACT_TIMEOUT_MINUTES) }}`, and + `common/check-artifact-timeouts` of bernardladenthin/actions v1.2.0 holds that layout in + `repository-checks`. +- **CI: a pull request Dependabot opens or rebases does not run the Publish pipeline.** Its + `startgate` job, which every other job needs, is skipped for it (`github.actor`), so every job + of the run is skipped. Such a run got none of the repository's secrets and Dependabot rebases + its pull requests on every change of `main`. The merge to `main` runs the pipeline; a push of a + person to the branch, or a dispatch on it, runs it too. +- **bernardladenthin/actions v1.2.0** (from v1.1.1) for every action and reusable workflow it + pins. - **Dependencies, build plugins and Actions, in step with the sibling repositories:** Jackson 2.23.0, maven-enforcer-plugin 3.7.0 in `examples/build-your-own-jar` (the reactor had it already), diff --git a/CLAUDE.md b/CLAUDE.md index 9ae242ff..773dcd85 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -774,12 +774,20 @@ in **`.github/actions-config.json`**: names it with a reason; - **run scripts**: `bash -n` over every bash `run:` script of the workflows and local actions, so a broken script (a lost line continuation, say) fails here instead of in the job running it; +- **artifact timeouts**: every `upload-artifact` / `download-artifact` step times out after the + repository variable `ARTIFACT_TIMEOUT_MINUTES`, else 20 minutes (the workflow's top-level `env` + reads it; [`../workspace/policies/ci-artifact-timeouts.md`](../workspace/policies/ci-artifact-timeouts.md)), + instead of GitHub's 360; - **Maven versions** (warnings only): a dependency or plugin (incl. the Spotless formatter version) used here in another version than in a sibling of the `java-maven` family (each sibling's POMs come from its own configuration), and Kotlin Gradle plugins behind the POMs' Kotlin; - **publication**: the publication jobs are wired as the actions expect, and a dry run of `.github/release-assets.json` against the real POMs collects exactly what it promises. +**Dependabot pull requests do not run `publish.yml`**: its `startgate` job, which every other +job needs, is skipped for a pull request Dependabot opens or rebases (`github.actor`). The merge +to `main` runs the pipeline; a push of a person to the branch, or a dispatch on it, runs it too. + The JDK every workflow uses is `.java-version` (setup-java's `java-version-file`), a template of the `java` set. Why a repository instead of copies: [`../workspace/crossrepostatus.md`](../workspace/crossrepostatus.md).