Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 43 additions & 21 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,56 @@ on:
branches: [ master ]

jobs:
build:
build-jvm:
runs-on: ubuntu-22.04
name: Sjsonnet jvm build
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
cache: sbt
- uses: sbt/setup-sbt@v1
- name: Cache Coursier cache
uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0
- name: Check Formatting
run: ./mill "_.jvm[_].__.checkFormat"
- name: Run mill tests
timeout-minutes: 15
run: ./mill "_.jvm[_].__.test"
- name: Run sbt tests
timeout-minutes: 15
run: sbt test
build-graal:
runs-on: ubuntu-22.04
name: Sjsonnet Graal Native build
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
- name: Cache Coursier cache
uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0
- name: Run Native Image Test Suites
timeout-minutes: 15
run: sjsonnet/test/graalvm/run_test_suites.py
build-other:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
lang: ['jvm', 'js', 'wasm', 'native']
java: ['21', '25']
name: Sjsonnet build for ${{ matrix.lang }} on JDK ${{ matrix.java }}
lang: ['js', 'wasm', 'native']
name: Sjsonnet ${{ matrix.lang }} build
steps:
- uses: actions/checkout@v6
- name: Set up JDK ${{ matrix.java }}
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
java-version: 21
distribution: 'zulu'
cache: sbt
- uses: sbt/setup-sbt@v1
Expand All @@ -31,20 +67,6 @@ jobs:
uses: coursier/cache-action@90c37294538be80a558fd665531fcdc2b467b475 # 8.1.0
- name: Check Formatting
run: ./mill _.${{ matrix.lang }}[_].__.checkFormat
- name: Compile with mill
timeout-minutes: 15
run: ./mill _.${{ matrix.lang }}[_].__.compile
- name: Run mill tests for ${{ matrix.lang }}
run: ./mill _.${{ matrix.lang }}[_].__.test
- name: Compile with sbt
timeout-minutes: 15
if: ${{ matrix.lang == 'jvm' }}
run: sbt compile bench/compile bench/jmh:compile
- name: Run sbt tests
timeout-minutes: 15
if: ${{ matrix.lang == 'jvm' }}
run: sbt test
- name: Run Native Image Test Suites
timeout-minutes: 30
if: ${{ (matrix.lang == 'jvm') && (matrix.java == '25') }}
run: sjsonnet/test/graalvm/run_test_suites.py
run: ./mill _.${{ matrix.lang }}[_].__.test
3 changes: 2 additions & 1 deletion .github/workflows/push-to-central.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
LANG: C
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
Expand Down Expand Up @@ -73,7 +74,8 @@ jobs:
LANG: C
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
- name: Set up JDK 21
uses: actions/setup-java@v5
with:
java-version: 21
distribution: 'zulu'
Expand Down Expand Up @@ -126,5 +128,5 @@ jobs:
with:
name: sjsonnet-${{ env.VERSION }}-release
path: release/*
retention-days: 30
retention-days: 7
if-no-files-found: error
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ out/
/project/metals.sbt
*.orig
*.rej
*.bak
*.bak
.bazelbsp/
12 changes: 1 addition & 11 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
--enable-native-access=ALL-UNNAMED
-XX:+UseG1GC
-Xms4G
-Xmx4G
-Xss2M
-XX:+AlwaysActAsServerClassMachine
-XX:ReservedCodeCacheSize=512m
-XX:NonProfiledCodeHeapSize=256m
-XX:MaxGCPauseMillis=750
-XX:+UseCompressedOops
-XX:MetaspaceSize=512M
-XX:-ClassUnloadingWithConcurrentMark
-Djava.security.egd=file:/dev/./urandom
-XX:+UseG1GC
1 change: 1 addition & 0 deletions .mill-jvm-opts
10 changes: 7 additions & 3 deletions build.mill
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//| mill-version: 1.1.2
//| mill-jvm-opts: ["-XX:+UseG1GC", "-Xmx4G", "--enable-native-access=ALL-UNNAMED"]
//| mill-jvm-version: zulu:21
//| mvnDeps:
//| - com.lihaoyi::mill-contrib-jmh:$MILL_VERSION
//| - com.lihaoyi::mill-contrib-versionfile:$MILL_VERSION
Expand Down Expand Up @@ -36,10 +36,14 @@ trait SjsonnetPublishModule extends PublishModule {
description = artifactName(),
organization = "com.databricks",
url = "https://github.com/databricks/sjsonnet",
licenses = Seq(License.MIT),
licenses = Seq(License.Common.Apache2),
versionControl = VersionControl.github("databricks", "sjsonnet"),
developers = Seq(
Developer("lihaoyi", "Li Haoyi", "https://github.com/lihaoyi")
Developer(
name = "Databricks Jsonnet Team",
organization = Some("Databricks"),
organizationUrl = Some("https://www.databricks.com")
)
)
)
}
Expand Down
12 changes: 0 additions & 12 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,3 @@ lazy val main = (project in file("sjsonnet"))
Seq(file)
}.taskValue
)

lazy val bench = (project in file("bench"))
.dependsOn(main % "compile->test")
.enablePlugins(JmhPlugin)
.settings(commonSettings: _*)
.settings(
run / fork := true,
run / javaOptions ++= Seq(
"-Xss100m",
"--enable-native-access=ALL-UNNAMED"
)
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.11.6
sbt.version=1.12.5