You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Setup Java does not ensure that sbt is installed on Ubuntu 24 #712
Unfortunately, anyone who legitimately expected "setup-java" to set up java for use with sbt which is listed as a supported feature of the actions/setup-java repository:
You're absolutely right that sbt is currently not included in Ubuntu 24.04. The Runner Image team has made cuts to the list of included packages in order to maintain our SLA for free disk space. More details here: actions/runner-images#10636.
Since sbt is not part of the runner image, CI workflows were failing, which is why the workflows have been updated.
The setup-java action provides the environment for sbt, and including sbt by default depends on the runner image configuration.
You can still install sbt manually using sudo apt-get install sbt, but currently, it isn't working with Ubuntu 24.04. Below is a workaround for the issue.
first, your sample code is buggy and you really shouldn't suggest it -- the "" evaluate to empty.
second, apt-key is deprecated and has been since at least ubuntu 22.04 -- suggesting it anywhere is a horrible idea.
third, this action is designed to support sbt -- each consumer of this action shouldn't have to try to avoid making the mistakes that you included in your sample code (or the various other mistakes that may be present or properly maintain it for when the key for ubuntu changes). Or the various other problems entailed here.
Reacted by Aaron Boyd, Niklas Klein and Georgii Kovalev
So all that users need to do is add uses: sbt/setup-sbt@v1 and you're good again.
Reacted by Josh Soref, Niklas Klein, Kolja, Jonas Spenger, Michael Pollmeier, Kimmo Eklund, Gaël Jourdan-Weil, Uwe Sommerlatt, Naoki Aoyama, Jason Bertsche and 1 more
The double quotes "" I used in the original sample code were indeed incorrect, as they would evaluate to empty strings. I appreciate you pointing that out. Here’s the corrected command:
You're right that the setup-java action is designed to support sbt out of the box, and consumers shouldn't have to manually manage dependencies like sbt for typical use cases. The issue here is that sbt is not included in the default Ubuntu 24.04 runner image, and because of this, CI workflows are failing. The Runner Image team made this change to reduce disk usage. The workaround I provided was meant to help in cases where users are facing this problem, but I do agree it’s not an ideal long-term solution.
It doesn't look like you've fixed the doubled quotes. You did fix the apt-key things, which is nice although that's not an alternative command I've seen before...
I recommend using setup-sbt, or if setup-java folks are considering to make sbt runner script available, take the similar approach that I took and use the universal .zip or .tgz file instead of apt-get install sbt:
Deb / RPM packages are hosted by an Artifactory instance, which Scala Center is granted usage by JFrog for free, renewed annually, and we should operate under the assumption that it might someday go away. Thus, in general we should avoid using apt-get install sbt.
For the reason above, I have reduced the file size of .deb file by not including some files .zip contains (so it would be cheaper for whoever who might have to run the Artifactory instance), and the sbt runner script would download them on the fly.
Deb package works only for Linux, but GitHub Action supports macOS and Windows as well.
Activity
v-gowridurgad commentedon Dec 19, 2024
Hello @jsoref,
Thank you for creating this issue. We will investigate it and provide feedback as soon as we have some updates.
boydsa92 commentedon Dec 19, 2024
We are facing the same issue
/home/runner/work/_temp/ff2d4e86-705c-42c5-98eb-92311951ff46.sh: line 2: sbt: command not foundv-mahabaleshwars commentedon Dec 20, 2024
Hi @jsoref,
You're absolutely right that sbt is currently not included in Ubuntu 24.04. The Runner Image team has made cuts to the list of included packages in order to maintain our SLA for free disk space. More details here: actions/runner-images#10636.
Since sbt is not part of the runner image, CI workflows were failing, which is why the workflows have been updated.
The setup-java action provides the environment for sbt, and including sbt by default depends on the runner image configuration.
You can still install sbt manually using
sudo apt-get install sbt, but currently, it isn't working with Ubuntu 24.04. Below is a workaround for the issue.Let me know if it helps resolve your problem.
jsoref commentedon Dec 20, 2024
first, your sample code is buggy and you really shouldn't suggest it -- the
""evaluate to empty.second,
apt-keyis deprecated and has been since at least ubuntu 22.04 -- suggesting it anywhere is a horrible idea.third, this action is designed to support sbt -- each consumer of this action shouldn't have to try to avoid making the mistakes that you included in your sample code (or the various other mistakes that may be present or properly maintain it for when the key for ubuntu changes). Or the various other problems entailed here.
SethTisue commentedon Dec 20, 2024
The maintainers of sbt have made this action available: https://github.com/sbt/setup-sbt cc @eed3si9n
So all that users need to do is add
uses: sbt/setup-sbt@v1and you're good again.fix github actions runner
fix github actions runner (#5192)
v-mahabaleshwars commentedon Dec 27, 2024
Hi @jsoref ,
The double quotes "" I used in the original sample code were indeed incorrect, as they would evaluate to empty strings. I appreciate you pointing that out. Here’s the corrected command:
Reference Link
You're right that the setup-java action is designed to support sbt out of the box, and consumers shouldn't have to manually manage dependencies like sbt for typical use cases. The issue here is that sbt is not included in the default Ubuntu 24.04 runner image, and because of this, CI workflows are failing. The Runner Image team made this change to reduce disk usage. The workaround I provided was meant to help in cases where users are facing this problem, but I do agree it’s not an ideal long-term solution.
jsoref commentedon Dec 27, 2024
It doesn't look like you've fixed the doubled quotes. You did fix the apt-key things, which is nice although that's not an alternative command I've seen before...
SethTisue commentedon Dec 28, 2024
I agree it would make a lot of sense for setup-java to pick this up now that it isn't in the ubuntu-latest anymore.
eed3si9n commentedon Dec 28, 2024
I recommend using setup-sbt, or if setup-java folks are considering to make
sbtrunner script available, take the similar approach that I took and use the universal.zipor.tgzfile instead ofapt-get install sbt:apt-get install sbt..debfile by not including some files.zipcontains (so it would be cheaper for whoever who might have to run the Artifactory instance), and thesbtrunner script would download them on the fly.15 remaining items
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
explicitly install sbt, as is not present in Ubuntu 24.04
explicitly install sbt, as is not present in Ubuntu 24.04
Fix CI failures by pining the ubuntu version for backend CI (#3194)
Fix missing sbt command in GitHub CI
Fix missing sbt command in GitHub CI
Update Chisel from 6.5.0 to 7.0.0 (#11)
Fix CI failures by pining the ubuntu version for backend CI (apache#3194
Fix CI failures by pining the ubuntu version for backend CI (apache#3194
fix github actions runner (#5192)