Skip to content
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

chore: cleanup and update gradle #242

Merged
merged 35 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
178f60b
chore: cleanup and update gradle
sgammon Jul 13, 2023
739ebfb
chore: seal state (temp)
sgammon Jul 15, 2023
864792d
chore: upgrade micronaut plugin → `3.7.10`
sgammon Jul 18, 2023
27b6c4f
fix: align jvm versions on `11` for baseline, `19` for targets
sgammon Jul 18, 2023
07bed99
chore: add embedded kotlin compiler deps to cli
sgammon Jul 18, 2023
cca9793
chore: raise embedded micronaut maximum → `3.9.4`
sgammon Jul 18, 2023
e1eab39
chore: add empty `graalvm-py` module
sgammon Jul 18, 2023
54f9eef
chore: begin tuning native flags for gvm latest
sgammon Jul 18, 2023
228b5f7
chore: activate `wasm` by default in jsvm
sgammon Jul 18, 2023
8d26d8c
chore: upgrade graalvm plugins → `0.9.23`, svm → `23.0.0`
sgammon Jul 18, 2023
7e4f5a9
chore: general dependency upgrades
sgammon Jul 18, 2023
ff4c59c
fix: bundler build/cli build
sgammon Jul 19, 2023
7ba3fd8
fix: ci buildless api key mappings
sgammon Jul 20, 2023
e7446aa
fix: toolchain selection against gvm20
sgammon Jul 20, 2023
b4bd43b
fix: build cache for build cache plugin
sgammon Jul 20, 2023
c831d6a
fix: more build cache fixes
sgammon Jul 20, 2023
33c454b
chore: missing apidump for graalvm-py
sgammon Jul 20, 2023
210c778
fix: restore kover plugin on cli package
sgammon Jul 20, 2023
3613c64
feat: wasm support in js vm
sgammon Jul 20, 2023
1c82a63
feat: auxiliary engine caching, other fixes
sgammon Jul 20, 2023
714bcc9
fix: ability to debug/wait/suspend
sgammon Jul 20, 2023
6a4e285
fix: shared vm engine must be disabled when debugging
sgammon Jul 20, 2023
6591199
fix: further fixes for inspection/shared engine
sgammon Jul 20, 2023
5d8d639
chore: add pgo profile (optimized on m2 mac)
sgammon Jul 20, 2023
b721ff8
feat: profile guided optimization for cli
sgammon Jul 20, 2023
1205a3e
fix: dedicated pgo instrumentation flag
sgammon Jul 20, 2023
749a743
fix: infinite loop on esm imports
sgammon Jul 21, 2023
d830f9a
fix: method scoping failures, heap-space exhaustion during tests
sgammon Jul 21, 2023
bb876f9
fix: ci gvm version, skip building/testing samples
sgammon Jul 21, 2023
c5bcc5f
fix: installation of gvm in ci
sgammon Jul 21, 2023
41c965c
fix: disable knit in ci (temp)
sgammon Jul 21, 2023
24ad1e9
fix: script lint errors in ci
sgammon Jul 22, 2023
546d9ec
fix: upgrade ci node to v20
sgammon Jul 22, 2023
eda1a50
fix: properly depend on protos from ktlint task in rpc module
sgammon Jul 22, 2023
cef9ea9
chore: update yarn lock
sgammon Jul 22, 2023
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
11 changes: 5 additions & 6 deletions .github/workflows/bench.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
types: [opened, reopened, synchronize]

env:
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}

jobs:
##
Expand All @@ -21,12 +20,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu]
java: [19]
java: [20]
engine: [graalvm]
experimental: [false]
include:
- os: macos
java: 19
java: 20
engine: graalvm
experimental: false

Expand Down Expand Up @@ -60,8 +59,8 @@ jobs:
uses: graalvm/setup-graalvm@v1
if: ${{ matrix.engine == 'graalvm' }}
with:
components: "native-image,js"
version: latest
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Zulu"
Expand Down
69 changes: 25 additions & 44 deletions .github/workflows/build.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ env:
GRADLE_CACHE_LOCAL: false
GRADLE_CACHE_REMOTE: true
GRADLE_CACHE_PUSH: true
CACHE_ENDPOINT: "https://global.less.build/cache/generic/"
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
CACHE_ENDPOINT: "https://gradle.less.build/cache/generic/"
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
GRADLE_OPTS: "-Xmx6g -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC"

jobs:
Expand All @@ -35,9 +34,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
Expand Down Expand Up @@ -115,12 +114,12 @@ jobs:
steps:
- name: "Setup: Checkout"
uses: actions/checkout@v3
- name: "Setup: GraalVM (Java 19)"
- name: "Setup: GraalVM (Java 20)"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: ${{ matrix.os == 'ubuntu' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Node"
Expand Down Expand Up @@ -214,30 +213,12 @@ jobs:
uses: actions/checkout@v3
- name: "Setup: Git History"
run: git fetch --unshallow || exit 0
- name: "Setup: GraalVM (Java 11)"
- name: "Setup: GraalVM (Java 20)"
uses: graalvm/setup-graalvm@v1
with:
components: "js"
version: 22.3.1
java-version: 11
set-java-home: false
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: GraalVM (Java 17)"
uses: graalvm/setup-graalvm@v1
with:
components: "js"
version: 22.3.1
java-version: 17
set-java-home: false
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: GraalVM (Java 19)"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
Expand All @@ -251,7 +232,7 @@ jobs:
- name: "Setup: Node"
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
cache: "yarn"
- name: "Setup: Yarn"
run: npm install -g yarn@1.22.19 && yarn
Expand Down Expand Up @@ -282,7 +263,7 @@ jobs:
-x testNativeImage
-x nativeCompile
-Pelide.ci=true
-PbuildSamples=true
-PbuildSamples=false
-PbuildDocs=false
-PbuildDocsSite=false
-Pversions.java.language=19
Expand Down Expand Up @@ -345,10 +326,10 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
check-for-updates: false
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
name: "Setup: Authorize Service Account"
Expand Down Expand Up @@ -436,9 +417,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: QEMU"
Expand Down Expand Up @@ -535,9 +516,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: QEMU"
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/publish.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ jobs:
env:
PUBLISH_USER: ${{ secrets.PUBLISH_USER }}
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
GRADLE_CACHE_REMOTE: "true"
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
steps:
- name: "Setup: Checkout"
uses: actions/checkout@v3
Expand All @@ -160,9 +158,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: latest
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Signing Keys"
run: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/qodana.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.0
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: false
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Check: Qodana Scan"
uses: JetBrains/qodana-action@main
env:
GRADLE_ARGS: -PstrictMode=false -PbuildDocs=false -PbuildSamples=false -Porg.gradle.java.home=/opt/hostedtoolcache/graalvm-ce-java19-linux/22.3.0/x64/graalvm-ce-java19-22.3.0 -Porg.gradle.java.installations.paths=/opt/hostedtoolcache/graalvm-ce-java19-linux/22.3.0/x64/graalvm-ce-java19-22.3.0
JAVA_HOME: /opt/hostedtoolcache/graalvm-ce-java19-linux/22.3.0/x64/graalvm-ce-java19-22.3.0
GRADLE_ARGS: -PstrictMode=false -PbuildDocs=false -PbuildSamples=false
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
- name: "Report: SARIF Upload"
uses: github/codeql-action/upload-sarif@v2
with:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/scheduled-checks.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ env:
GRADLE_CACHE_LOCAL: false
GRADLE_CACHE_REMOTE: true
GRADLE_CACHE_PUSH: true
CACHE_ENDPOINT: "https://global.less.build/cache/generic/"
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
GRADLE_OPTS: "-Xmx6g -XX:MaxMetaspaceSize=1024m -XX:+UseParallelGC"

jobs:
Expand Down Expand Up @@ -131,12 +129,12 @@ jobs:
install: true
- name: "Setup: Checkout"
uses: actions/checkout@v3
- name: "Setup: GraalVM (Java 19)"
- name: "Setup: GraalVM (Java 20)"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: 22.3.1
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
check-for-updates: ${{ matrix.os == 'ubuntu' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Node"
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/site.ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ on:
- release/*

env:
GRADLE_CACHE_USERNAME: ${{ secrets.GRADLE_CACHE_USERNAME }}
GRADLE_CACHE_PASSWORD: ${{ secrets.GRADLE_CACHE_PASSWORD }}
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}

jobs:
##
Expand All @@ -43,9 +42,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: latest
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
name: "Setup: Authorize Service Account"
Expand Down Expand Up @@ -160,9 +159,9 @@ jobs:
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
with:
components: "native-image,js"
version: latest
java-version: 19
components: "native-image,js,wasm"
distribution: 'graalvm'
java-version: 20
github-token: ${{ secrets.GITHUB_TOKEN }}
- id: "auth"
name: "Setup: Authorize Service Account"
Expand Down
37 changes: 20 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ val isCI = project.hasProperty("elide.ci") && project.properties["elide.ci"] ==
val javaLanguageVersion = project.properties["versions.java.language"] as String
val kotlinLanguageVersion = project.properties["versions.kotlin.language"] as String
val ecmaVersion = project.properties["versions.ecma.language"] as String
val enableKnit: String? by properties

val buildDocs by properties

Expand All @@ -90,7 +91,7 @@ buildscript {
}
}

apply(plugin = "kotlinx-knit")
if (enableKnit == "true") apply(plugin = "kotlinx-knit")

rootProject.plugins.withType(NodeJsRootPlugin::class.java) {
// 16+ required for Apple Silicon support
Expand Down Expand Up @@ -428,23 +429,25 @@ tasks {
}
}

the<kotlinx.knit.KnitPluginExtension>().siteRoot = "https://beta.elide.dev/docs/kotlin"
the<kotlinx.knit.KnitPluginExtension>().moduleDocs = "build/dokka/htmlMultiModule"
the<kotlinx.knit.KnitPluginExtension>().files = fileTree(project.rootDir) {
include("README.md")
include("docs/guide/**/*.md")
include("docs/guide/**/*.kt")
include("samples/**/*.md")
include("samples/**/*.kt")
include("samples/**/*.kts")
exclude("**/build/**")
exclude("**/.gradle/**")
exclude("**/node_modules/**")
}
if (enableKnit == "true") {
the<kotlinx.knit.KnitPluginExtension>().siteRoot = "https://beta.elide.dev/docs/kotlin"
the<kotlinx.knit.KnitPluginExtension>().moduleDocs = "build/dokka/htmlMultiModule"
the<kotlinx.knit.KnitPluginExtension>().files = fileTree(project.rootDir) {
include("README.md")
include("docs/guide/**/*.md")
include("docs/guide/**/*.kt")
include("samples/**/*.md")
include("samples/**/*.kt")
include("samples/**/*.kts")
exclude("**/build/**")
exclude("**/.gradle/**")
exclude("**/node_modules/**")
}

// Build API docs via Dokka before running Knit.
tasks.named("knitPrepare").configure {
dependsOn("docs")
// Build API docs via Dokka before running Knit.
tasks.named("knitPrepare").configure {
dependsOn("docs")
}
}

val jvmName = project.properties["elide.jvm"] as? String
Expand Down
25 changes: 25 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ plugins {
}

val buildDocs by properties
val javaLanguageVersion = project.properties["versions.java.language"] as String
val javaLanguageTarget = project.properties["versions.java.target"] as String

dependencies {
implementation(gradleApi())
Expand All @@ -37,4 +39,27 @@ dependencies {
api("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}

java {
sourceCompatibility = JavaVersion.toVersion(javaLanguageVersion)
targetCompatibility = JavaVersion.toVersion(javaLanguageTarget)
}

afterEvaluate {
tasks {
compileKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}

compileTestKotlin.configure {
kotlinOptions {
jvmTarget = javaLanguageTarget
javaParameters = true
}
}
}
}

apply(from = "../gradle/loadProps.gradle.kts")
2 changes: 2 additions & 0 deletions buildSrc/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
versions.java.language = 11
versions.java.target = 11
Loading