Skip to content

docs(examples): update the example workflows - #252

Open
SuperMuel wants to merge 2 commits into
mainfrom
cod-3885-update-example-workflows
Open

SuperMuel wants to merge 2 commits into
mainfrom
cod-3885-update-example-workflows

Conversation

@SuperMuel

@SuperMuel SuperMuel commented Oct 15, 2026 •

Copy link
Copy Markdown

Updates the example workflows and the README:

  • Bump actions/checkout, setup-python, setup-node and setup-go to v7, and moonrepo/setup-rust to v1. Their breaking changes do not affect these examples.
  • Use Python 3.13 instead of 3.9, which is no longer supported.
  • Use the current macro runner label in the Go example. The old codspeed-macro label still works.
  • Fix the README Rust workflow: name was in the wrong place, so GitHub could not read the file.
  • Add examples for Java, Kotlin and Scala (JMH with Gradle) and for CLI commands (codspeed.yml). Now examples/ covers every language of the Supported Languages page. The new examples follow the workflows of the docs pages, with actions/setup-java v6.

I ran the 9 examples on small test projects, on ubuntu-latest because the test organization has no macro runner. Every job passed and uploaded its results to CodSpeed. On ubuntu-latest, the 3 JVM examples needed ./gradlew jmh --no-daemon: with the Gradle daemon, the CodSpeed step does not end after the build. The macro runner does not have this problem: the codspeed-jvm CI runs ./gradlew jmh there.

Closes COD-3885

Bump the actions in the example workflows and in the README to their
latest major versions: actions/checkout, actions/setup-python,
actions/setup-node and actions/setup-go v7, and moonrepo/setup-rust v1.
Also:

- use Python 3.13 instead of 3.9, which reached its end of life in
  October 2025
- use the current `codspeed-macro-arm64-graviton-ubuntu-22-04` label in
  the Go example instead of the former `codspeed-macro` label
- move `name` into the job of the README Rust workflow: it was directly
  under `jobs`, which made the workflow invalid

Closes COD-3885
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SuperMuel
SuperMuel force-pushed the cod-3885-update-example-workflows branch from aab5068 to d71cb8c Compare October 15, 2026 13:28
@SuperMuel
SuperMuel marked this pull request as ready for review October 15, 2026 13:42

@adriencaccia adriencaccia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add new example of the missing languages that we support in https://codspeed.io/docs/benchmarks/overview
Otherwise lgtm

Add example workflows for the languages of the Supported Languages docs
page that had none:

- Java, Kotlin and Scala run JMH through Gradle with the CodSpeed JMH
  fork, a Git submodule, in walltime mode on a macro runner, like the
  workflows of their docs pages
- CLI commands runs the benchmarks of codspeed.yml: the action has no
  `run` input

They use actions/setup-java v6, its latest major version.

Closes COD-3885
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@SuperMuel

Copy link
Copy Markdown
Author

Let's add new example of the missing languages that we support in https://codspeed.io/docs/benchmarks/overview

I added the 4 missing languages in 1b1a3d1

And I apologize for the meat-proxying, here's Claude explanation of a problem and questions


Problem: on ubuntu-latest, the 3 JVM examples never finish. ./gradlew jmh builds and runs the benchmarks in about 1 minute, then the CodSpeed step waits until the job times out. This happened in 4 out of 4 runs.

Cause: in walltime mode, the CodSpeed step waits until every process that the command started has exited. Gradle starts a daemon that keeps running after the build: by default, Gradle stops an idle daemon only after 3 hours. Control runs with runner 5.6.0:

  • ./gradlew jmh --no-daemon, or ./gradlew jmh && ./gradlew --stop: the step ends in about 2 minutes.
  • sh -c 'sleep 240 &': the step waits the full 4 minutes. The result is the same when sleep has its output closed, and with CODSPEED_ISOLATION=false.

The codspeed-jvm CI runs ./gradlew jmh on a macro runner and does not hang. So I kept the examples the same as the docs: macro runner and ./gradlew jmh.

Questions:

  1. Is this expected? Should the runner stop waiting for background processes when the command exits?
  2. Until then, should we add --no-daemon to the 3 examples and to the JVM docs pages, so that they also work on GitHub-hosted runners?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants