-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripted on GitHub Action #53
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
branches: ['**'] | ||
push: | ||
branches: ['**'] | ||
tags: [v*] | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
cache: sbt | ||
|
||
- shell: bash | ||
run: sbt compile | ||
|
||
- shell: bash | ||
run: sbt sbt-paradox-material-theme/scripted |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ lazy val root = project("paradox-material-theme-parent", file(".")) | |
Compile / paradoxNavigationDepth := 3, | ||
makeSite := makeSite.dependsOn(Compile / paradox).value, | ||
paradoxMaterialTheme / version := version.value, | ||
// this is to avoid triggering update, which will fail | ||
Compile / compile := sbt.internal.inc.Analysis.empty, | ||
Compile / paradoxProperties ++= Map( | ||
"project.name" -> "Paradox Material Theme", | ||
"github.base_url" -> "https://github.com/sbt/sbt-paradox-material-theme" | ||
|
@@ -70,7 +72,6 @@ lazy val plugin = project("sbt-paradox-material-theme", file("plugin")) | |
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.4.4"), | ||
libraryDependencies += "org.jsoup" % "jsoup" % "1.10.3", | ||
libraryDependencies += "io.circe" %% "circe-core" % "0.9.3", | ||
update := update.dependsOn(theme / publishLocal).value, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this was put in deliberately because otherwise you cannot So I don't what to do here, it seems like a catch 22. At least you found out what's causing the issue although I am still somewhat perplexed as to why this is screwing with the resolver in the CI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mkurz Does this help trigger your memories wrt #48 (comment) ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, can't remember. Great you solved this meanwhile 👍 |
||
Compile / resourceGenerators += Def.task { | ||
val file = (Compile / resourceManaged).value / "paradox-material-theme.properties" | ||
IO.write(file, s"version=${version.value}") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mdedetrich @mkurz Here's my hypothesis on the mysterious behavior. This build uses intertwined dependency pattern wherein the build itself uses the sbt plugin defined in the build, and specifically the root subproject enables
ParadoxMaterialThemePlugin
.So while the root subproject does not contain any Scala source,
compile
will trigger anupdate
at the root-level, which likely triggers the dependency resolution against theme version 0.6.0-SNAPSHOT, which doesn't exist yet. I don't know if the missing/
is actually true, or some other red herring bug. In any case, the above demonstrates that short-circuiting the rootCompile / compile
fixes the issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this! I will update the original PR and give you credit for it