Skip to content

Commit

Permalink
Fix publishing on Scala 3
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Nov 15, 2023
1 parent 02a829b commit fa255a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
java-version: [8, 11]
scala-version: [2.12.18, 2.13.12, 3.3.1]
scala-version: [2.12.18, 2.13.12, 3.2.2, 3.3.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -24,12 +24,13 @@ jobs:
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i unitTest "${{ matrix.scala-version }}"
- run: ./mill -i unitTest "${{ matrix.scala-version }}"
itest:
strategy:
fail-fast: false
matrix:
java-version: [8, 11]
scala-version: [2.12.18, 2.13.12, 3.3.1]
scala-version: [2.12.18, 2.13.12, 3.2.2, 3.3.1]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -39,3 +40,13 @@ jobs:
with:
java-version: ${{ matrix.java-version }}
- run: ./mill -i integrationTest ${{ matrix.scala-version }}
publishLocal:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 8
- run: ./mill -i __.publishLocal
10 changes: 8 additions & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,12 @@ object amm extends Cross[MainModule](fullCrossScalaVersions:_*){
def ivyDeps = Agg(
Deps.coursierInterface
)
override def docJar = if (isScala3(crossScalaVersion)) T {
val outDir = T.ctx().dest
val javadocDir = outDir / "javadoc"
os.makeDir.all(javadocDir)
mill.api.Result.Success(mill.modules.Jvm.createJar(Agg(javadocDir))(outDir))
} else super.docJar
def constantsSourceDir = T {
val dir = T.dest / "src"
val dest = dir / "Constants.scala"
Expand Down Expand Up @@ -698,14 +704,14 @@ class SshdModule(val crossScalaVersion: String) extends AmmModule{
}
}

def unitTest(scalaVersion: String = sys.env("TRAVIS_SCALA_VERSION")) = T.command{
def unitTest(scalaVersion: String) = T.command{
terminal(scalaVersion).test.test()()
amm.repl(scalaVersion).test.test()()
amm(scalaVersion).test.test()()
sshd(scalaVersion).test.test()()
}

def integrationTest(scalaVersion: String = sys.env("TRAVIS_SCALA_VERSION")) = T.command{
def integrationTest(scalaVersion: String) = T.command{
integration(scalaVersion).test.test()()
}

Expand Down

0 comments on commit fa255a4

Please sign in to comment.