diff options
author | Jakob Odersky <jakob@odersky.com> | 2019-09-23 01:44:06 -0400 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2019-09-23 01:44:06 -0400 |
commit | 06df66a2dfc8cdd77b435790624eeee565edfd5f (patch) | |
tree | 00ca3b6a146d831a106212ef4c4e0c376bae2a58 | |
parent | a34157844e2128d100e9ba5e86e827b3d0f77866 (diff) | |
download | commando-06df66a2dfc8cdd77b435790624eeee565edfd5f.tar.gz commando-06df66a2dfc8cdd77b435790624eeee565edfd5f.tar.bz2 commando-06df66a2dfc8cdd77b435790624eeee565edfd5f.zip |
build matrix
-rw-r--r-- | .github/workflows/main.yml | 7 | ||||
-rw-r--r-- | build.sc | 10 |
2 files changed, 11 insertions, 6 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d698cd0..6ae537a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,6 +11,9 @@ on: jobs: build: + strategy: + matrix: + scala: ["2.13.1", "2.12.10", "2.11.12"] runs-on: ubuntu-latest steps: @@ -19,12 +22,12 @@ jobs: - uses: jodersky/setup-mill@master - name: Test - run: mill commando.test + run: mill -D scala.version=${{matrix.scala}} commando.test - name: Publish Tag if: startsWith(github.ref, 'refs/tags/') run: | echo "${{secrets.GPG_KEY}}" | gpg --import - mill mill.scalalib.PublishModule/publishAll \ + mill -D scala.version=${{matrix.scala}} mill.scalalib.PublishModule/publishAll \ --sonatypeCreds "8VNUX6+2:${{secrets.SONATYPE_PASSWORD}}" \ --publishArtifacts __.publishArtifacts @@ -1,11 +1,13 @@ import mill._, scalalib._, scalafmt._, scalalib.publish._ object commando extends ScalaModule with ScalafmtModule with PublishModule { - //def scalaVersion = T.input { - //scala.sys.props.toMap.getOrElse("scala.version", "2.13.1").call() - //} - def scalaVersion = "2.13.1" + def scalaVersion = T.input { + sys.props.toMap.get("scala.version") match { + case Some(v) => v + case None => "2.13.1" + } + } object test extends Tests { def ivyDeps = Agg( |