Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Bump to JDK 21 #4632

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-circt-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
matrix:
system: ["ubuntu-22.04"]
jvm: [8]
jvm: [21]
scala: ["2.13.15"]
espresso: ["2.4"]
slang: ["7.0"]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
system: ["ubuntu-22.04"]
jvm: [17]
jvm: [21]
scala: ["2.13.15"]
espresso: ["2.4"]
slang: ["7.0"]
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Setup Scala
uses: VirtusLab/scala-cli-setup@v1
with:
jvm: adopt:8
jvm: adopt:21
apps: sbt
- name: Publish
run: ./mill -i io.kipp.mill.ci.release.ReleaseModule/publishAll
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
java-version: ${{ inputs.jvm }}
- name: Install CIRCT
id: install-circt
if: ${{ inputs.circt }}
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
java-version: ${{ inputs.jvm }}
- name: Check Build Script Formatting
run: ./mill --meta-level 1 mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll sources
- name: Check Source File Format
Expand All @@ -168,7 +168,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
java-version: ${{ inputs.jvm }}
- name: Install CIRCT
id: install-circt
if: ${{ inputs.circt }}
Expand Down Expand Up @@ -198,7 +198,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '21'
java-version: ${{ inputs.jvm }}
- name: JMH
run: ./mill benchmark.runJmh

Expand All @@ -219,7 +219,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '11'
java-version: ${{ inputs.jvm }}
- name: Compile
run: ./mill stdlib.cross[_].compile

Expand Down
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
let
pkgs = import nixpkgs { inherit system; overlays = [ overlay ]; };
deps = with pkgs; [
jdk21
mill
circt
jextract-21
lit
scala-cli
llvm
verilator
];
in
{
Expand Down
14 changes: 1 addition & 13 deletions release.mill
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import mill.scalalib.publish._
import mill.api.Result
import mill.scalalib.api.ZincWorkerUtil.matchingVersions
import mill.util.Jvm.createJar
import $ivy.`io.chris-kipp::mill-ci-release::0.1.10`
import $ivy.`io.chris-kipp::mill-ci-release_mill0.12:0.2.1` // /~https://github.com/ckipp01/mill-ci-release/pull/143
import io.kipp.mill.ci.release.{CiReleaseModule, SonatypeHost}
import de.tobiasroeser.mill.vcs.version.VcsVersion // pulled in by mill-ci-release

Expand Down Expand Up @@ -49,18 +49,6 @@ trait Unipublish extends ScalaModule with ChiselPublishModule {
// This is published as chisel
override def artifactName = "chisel"

// Older versions of Scala do not work with newer versions of the JVM
// This is a hack to ensure we always use Java 8 to publish Chisel with Scala 2.13
// We could use Java 11 with -release 8
// Note that this target is used by real publishing but not by publishLocal
Comment on lines -52 to -55
Copy link
Member

Choose a reason for hiding this comment

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

I think we don't need to support older version of Scala, bumping Scala version is always safe. Feel free to revert it.

override def publishArtifacts = Task {
// TODO when we publish for Scala 3, only do this check for Scala 2.13
if (v.javaVersion != 8) {
throw new Exception(s"Publishing requires Java 8, current JDK is ${v.javaVersion}")
}
super.publishArtifacts
}

/** Publish both this project and the plugin (for the default Scala version) */
override def publishLocal(localIvyRepo: String = null) = Task.Command {
// TODO consider making this parallel and publishing all cross-versions for plugin
Expand Down
Loading