diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f894190..b56f4c48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,9 @@ name: Continuous Integration on: pull_request: - branches: ['**'] + branches: ['**', '!update/**', '!pr/**'] push: - branches: ['**'] + branches: ['**', '!update/**', '!pr/**'] tags: [v*] env: @@ -30,7 +30,7 @@ jobs: os: [ubuntu-latest] scala: [2.12.15, 2.13.8, 3.1.2] java: [temurin@8] - project: [rootJS, rootJVM] + project: [rootJS, rootJVM, rootNative] runs-on: ${{ matrix.os }} steps: - name: Checkout current branch (full) @@ -38,12 +38,21 @@ jobs: with: fetch-depth: 0 + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' uses: actions/setup-java@v2 with: - distribution: temurin + distribution: jdkfile java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} - name: Cache sbt uses: actions/cache@v2 @@ -61,12 +70,17 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck - name: Check formatting - run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' scalafmtCheckAll root/scalafmtSbtCheck + if: matrix.java == 'temurin@8' + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' scalafmtCheckAll 'project /' scalafmtSbtCheck - name: scalaJSLink if: matrix.project == 'rootJS' run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/scalaJSLinkerResult + - name: nativeLink + if: matrix.project == 'rootNative' + run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/nativeLink + - name: Test run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test @@ -80,11 +94,11 @@ jobs: - name: Make target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/dotty') - run: mkdir -p target .js/target core/.js/target core/.jvm/target .jvm/target .native/target project/target + run: mkdir -p target .js/target core/.native/target core/.js/target core/.jvm/target .jvm/target .native/target project/target - name: Compress target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/dotty') - run: tar cf targets.tar target .js/target core/.js/target core/.jvm/target .jvm/target .native/target project/target + run: tar cf targets.tar target .js/target core/.native/target core/.js/target core/.jvm/target .jvm/target .native/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/dotty') @@ -109,12 +123,21 @@ jobs: with: fetch-depth: 0 + - name: Download Java (temurin@8) + id: download-java-temurin-8 + if: matrix.java == 'temurin@8' + uses: typelevel/download-java@v1 + with: + distribution: temurin + java-version: 8 + - name: Setup Java (temurin@8) if: matrix.java == 'temurin@8' uses: actions/setup-java@v2 with: - distribution: temurin + distribution: jdkfile java-version: 8 + jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} - name: Cache sbt uses: actions/cache@v2 @@ -148,6 +171,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (2.12.15, rootNative) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootNative + + - name: Inflate target directories (2.12.15, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Download target directories (2.13.8, rootJS) uses: actions/download-artifact@v2 with: @@ -168,6 +201,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (2.13.8, rootNative) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootNative + + - name: Inflate target directories (2.13.8, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Download target directories (3.1.2, rootJS) uses: actions/download-artifact@v2 with: @@ -188,6 +231,16 @@ jobs: tar xf targets.tar rm targets.tar + - name: Download target directories (3.1.2, rootNative) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.2-rootNative + + - name: Inflate target directories (3.1.2, rootNative) + run: | + tar xf targets.tar + rm targets.tar + - name: Import signing key if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' run: echo $PGP_SECRET | base64 -di | gpg --import diff --git a/build.sbt b/build.sbt index a4a0de69..9d6f8033 100644 --- a/build.sbt +++ b/build.sbt @@ -9,9 +9,9 @@ ThisBuild / scalaVersion := scala3 ThisBuild / tlBaseVersion := "3.0" ThisBuild / organization := "org.typelevel" -val catsVersion = "2.7.0" -val munitVersion = "0.7.29" -val disciplineMunitVersion = "1.0.9" +val catsVersion = "2.8.0" +val munitVersion = "1.0.0-M5" +val disciplineMunitVersion = "2.0.0-M2" val kindProjectorVersion = "0.13.2" val shapeless2Version = "2.3.8" val shapeless3Version = "3.1.0" @@ -58,7 +58,7 @@ console / initialCommands := """import shapeless._, cats._, cats.derived._""" lazy val root = tlCrossRootProject.aggregate(core) -lazy val core = crossProject(JVMPlatform, JSPlatform) +lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) .crossType(CrossType.Pure) .settings(moduleName := "kittens") .settings(commonSettings: _*) @@ -86,9 +86,4 @@ ThisBuild / developers := List( ) ThisBuild / tlCiReleaseBranches := Seq("dotty") -ThisBuild / githubWorkflowBuild ~= { steps => - WorkflowStep.Sbt( - List("scalafmtCheckAll", "root/scalafmtSbtCheck"), - name = Some("Check formatting") - ) +: steps -} +ThisBuild / tlCiScalafmtCheck := true diff --git a/core/src/test/scala-3/cats/derived/KittensSuite.scala b/core/src/test/scala-3/cats/derived/KittensSuite.scala index 8640cabf..562c7bcf 100644 --- a/core/src/test/scala-3/cats/derived/KittensSuite.scala +++ b/core/src/test/scala-3/cats/derived/KittensSuite.scala @@ -53,7 +53,7 @@ object KittensSuite: test(s"No $tc for $target")(assert(errors.contains(message), s"$errors did not contain $message")) inline def testNoAuto(inline tc: String, target: String): Unit = - testNoInstance(tc, target, "Could not find an instance of " + tc) + testNoInstance(tc, target, "no implicit argument of type") inline def testNoSemi(inline tc: String, target: String): Unit = testNoInstance("semiauto." + deCapitalize(tc), target, "Could not derive an instance of " + tc) diff --git a/project/plugins.sbt b/project/plugins.sbt index 07a17558..60590377 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,7 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.9.0") -addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.3") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0") -addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.1.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") -addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.4.5") +addSbtPlugin("org.typelevel" % "sbt-typelevel-ci-release" % "0.4.12") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")