Skip to content

Commit

Permalink
ci: bump to jdk 21 (#4632)
Browse files Browse the repository at this point in the history
Signed-off-by: unlsycn <[email protected]>
  • Loading branch information
unlsycn authored Jan 20, 2025
1 parent 455b29f commit ac250b1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
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
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

0 comments on commit ac250b1

Please sign in to comment.