Skip to content

Commit

Permalink
set githubWorkflowScalaVersions to a fake value since sbt-projectmatr…
Browse files Browse the repository at this point in the history
…ix controls the version on a per-project basis
  • Loading branch information
bpholt committed Mar 14, 2024
1 parent 157e030 commit ac96fb9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 31 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13, 2.12]
scala: [per-project-matrix]
java: [temurin@8]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
Expand Down Expand Up @@ -108,22 +108,12 @@ jobs:
if: matrix.java == 'temurin@8' && steps.setup-java-temurin-8.outputs.cache-hit == 'false'
run: sbt +update

- name: Download target directories (2.13)
- name: Download target directories (per-project-matrix)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
name: target-${{ matrix.os }}-${{ matrix.java }}-per-project-matrix

- name: Inflate target directories (2.13)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12

- name: Inflate target directories (2.12)
- name: Inflate target directories (per-project-matrix)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
3 changes: 1 addition & 2 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ pull_request_rules:
- or:
- body~=labels:.*early-semver-patch
- body~=labels:.*early-semver-minor
- status-success=Build and Test (ubuntu-latest, 2.13, temurin@8)
- status-success=Build and Test (ubuntu-latest, 2.12, temurin@8)
- status-success=Build and Test (ubuntu-latest, per-project-matrix, temurin@8)
- status-success=Validate Steward Config (ubuntu-latest, temurin@11)
actions:
merge: {}
Expand Down
1 change: 0 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ ThisBuild / developers := List(
ThisBuild / startYear := Option(2021)
ThisBuild / tlSonatypeUseLegacyHost := true
ThisBuild / tlBaseVersion := "1.1"
ThisBuild / githubWorkflowScalaVersions := Seq("2.13", "2.12")
ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / mergifyRequiredJobs ++= Seq("validate-steward")
ThisBuild / mergifyStewardConfig ~= { _.map(_.copy(
Expand Down
20 changes: 6 additions & 14 deletions project/AsyncUtilsBuildPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ import org.scalajs.jsenv.nodejs.NodeJSEnv
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport.*
import org.typelevel.sbt.TypelevelMimaPlugin.autoImport.*
import org.typelevel.sbt.TypelevelSettingsPlugin
import org.typelevel.sbt.TypelevelSettingsPlugin.autoImport.*
import org.typelevel.sbt.TypelevelSonatypeCiReleasePlugin.autoImport.*
import org.typelevel.sbt.TypelevelSonatypePlugin.autoImport.*
import org.typelevel.sbt.TypelevelVersioningPlugin.autoImport.*
import org.typelevel.sbt.gha.GenerativePlugin.autoImport.*
import org.typelevel.sbt.gha.GitHubActionsPlugin.autoImport.*
import org.typelevel.sbt.mergify.MergifyPlugin
import org.typelevel.sbt.mergify.MergifyPlugin.autoImport.*
import sbt.*
Expand Down Expand Up @@ -318,20 +323,7 @@ object AsyncUtilsBuildPlugin extends AutoPlugin {
.map(x => x -> file(x))
.toMap,

/* this is misleading, because we're actually running the build for all supported
* scala versions, but unfortunately this seems to be our best option until
* sbt-typelevel 0.5.
*
* sbt-projectmatrix creates separate projects for each crossed Scala version
* setting githubWorkflowScalaVersions to a single (ignored) version minimizes
* the build matrix, and setting githubWorkflowBuildSbtStepPreamble to an empty
* list ensures that the build phase ignores the scala version set in
* githubWorkflowScalaVersions.
*
* '++ ${{ matrix.scala }}' will still be used in the Publish stage, but it
* sounds like the tlCiRelease will do the right thing anyway.
*/
githubWorkflowScalaVersions := Seq("2.13"),
githubWorkflowScalaVersions := Seq("per-project-matrix"),
githubWorkflowBuildSbtStepPreamble := Nil,

nodeExecutable :=
Expand Down

0 comments on commit ac96fb9

Please sign in to comment.