-
Notifications
You must be signed in to change notification settings - Fork 7
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
Target JDK 1.8 and use sbt-github-actions for snapshot publish #97
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ jobs: | |
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
scala: [2.12.18] | ||
java: [temurin@11, temurin@17, temurin@21] | ||
java: [temurin@8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Ignore line ending differences in git | ||
|
@@ -45,33 +45,79 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java (temurin@11) | ||
if: matrix.java == 'temurin@11' | ||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 11 | ||
java-version: 8 | ||
cache: sbt | ||
|
||
- name: Setup Java (temurin@17) | ||
if: matrix.java == 'temurin@17' | ||
uses: actions/setup-java@v4 | ||
- name: Check that workflows are up to date | ||
shell: bash | ||
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck | ||
|
||
- shell: bash | ||
run: sbt '++ ${{ matrix.scala }}' test scripted | ||
|
||
- name: Compress target directories | ||
shell: bash | ||
run: tar cf targets.tar target theme/target plugin/target project/target | ||
|
||
- name: Upload target directories | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: sbt | ||
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} | ||
path: targets.tar | ||
|
||
publish: | ||
name: Publish Artifacts | ||
needs: [build] | ||
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.18] | ||
java: [temurin@8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Ignore line ending differences in git | ||
if: contains(runner.os, 'windows') | ||
run: git config --global core.autocrlf false | ||
|
||
- name: Setup Java (temurin@21) | ||
if: matrix.java == 'temurin@21' | ||
- name: Configure pagefile for Windows | ||
if: contains(runner.os, 'windows') | ||
uses: al-cheb/[email protected] | ||
with: | ||
minimum-size: 2GB | ||
maximum-size: 8GB | ||
disk-root: 'C:' | ||
|
||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
java-version: 8 | ||
cache: sbt | ||
|
||
- name: Check that workflows are up to date | ||
shell: bash | ||
run: sbt '++ ${{ matrix.scala }}' githubWorkflowCheck | ||
- name: Download target directories (2.12.18) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: target-${{ matrix.os }}-2.12.18-${{ matrix.java }} | ||
|
||
- shell: bash | ||
run: sbt '++ ${{ matrix.scala }}' test scripted | ||
- name: Inflate target directories (2.12.18) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
|
||
- name: Publish project | ||
env: | ||
NEXUS_USER: ${{ secrets.NEXUS_USER }} | ||
NEXUS_PW: ${{ secrets.NEXUS_PW }} | ||
run: sbt publish |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,10 @@ | |
|
||
import net.bzzt.reproduciblebuilds.ReproducibleBuildsPlugin.reproducibleBuildsCheckResolver | ||
|
||
scalaVersion := "2.13.11" | ||
val scala212 = "2.12.18" | ||
|
||
ThisBuild / scalaVersion := scala212 | ||
ThisBuild / crossScalaVersions := Seq(scala212) | ||
|
||
ThisBuild / apacheSonatypeProjectProfile := "pekko" | ||
ThisBuild / dynverSonatypeSnapshots := true | ||
|
@@ -88,12 +91,18 @@ lazy val pekkoPlugin = project | |
ThisBuild / githubWorkflowBuild := Seq(WorkflowStep.Sbt(List("test", "scripted"))) | ||
|
||
ThisBuild / githubWorkflowTargetTags ++= Seq("v*") | ||
ThisBuild / githubWorkflowPublishTargetBranches := Seq() | ||
ThisBuild / githubWorkflowPublish := Seq() | ||
ThisBuild / githubWorkflowPublishTargetBranches := Seq( | ||
RefPredicate.Equals(Ref.Branch("main"))) | ||
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. This ensures that we only run |
||
|
||
ThisBuild / githubWorkflowPublish := Seq( | ||
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. This is exactly the same as the original |
||
WorkflowStep.Sbt( | ||
commands = List("publish"), | ||
name = Some("Publish project"), | ||
env = Map( | ||
"NEXUS_USER" -> "${{ secrets.NEXUS_USER }}", | ||
"NEXUS_PW" -> "${{ secrets.NEXUS_PW }}"))) | ||
|
||
ThisBuild / githubWorkflowOSes := Seq("ubuntu-latest", "macos-latest", "windows-latest") | ||
|
||
ThisBuild / githubWorkflowJavaVersions := Seq( | ||
JavaSpec.temurin("11"), | ||
JavaSpec.temurin("17"), | ||
JavaSpec.temurin("21")) | ||
JavaSpec.temurin("8")) |
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.
why all this windows stuff? not a blocker
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.
This is just making sure that the plugin can be built on windows for people such as @He-Pin . The specific code you are pointing out is a workaround for how windows handles page files (tl;dr due to limited resources of github actions runners its possible to run out of memory specifically for windows).