Skip to content

Commit

Permalink
feat: KSP/Kotlin compiler plugin support
Browse files Browse the repository at this point in the history
This changeset restructures the build to provide more control over
Kotlin targets. Support is introduced for KSP processors and Kotlin
compiler plugins.

The plugins don't do much yet, but will host rich functionality
later down the road once the build flow is perfected. A number of
other important changes are also enclosed which prepare the lib for
an initial beta release.

Changes enclosed:
- Cleanup all workflow configs
- Add sharing of codebase-wide properties
- Add ABI check validation (fixes and closes #70), + build step
- Refactor convention plugins (relates to #71)
- Prep version catalog and platform releases (relates to #73)
- Prep for SSG compiler (relates to #65 and #76)
- Fix state sharing issue (fixes and closes #35)
- Fix benchmarks module, add continuous micro-benchmarking job
  • Loading branch information
sgammon committed Nov 19, 2022
1 parent d0eadf0 commit 1284518
Show file tree
Hide file tree
Showing 142 changed files with 4,065 additions and 1,210 deletions.
111 changes: 111 additions & 0 deletions .github/workflows/bench.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Benchmark

on:
push:
branches:
- stable
- v3
pull_request:
types: [opened, reopened, synchronize]

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

jobs:
##
## Job: Benchmarks
##

bench:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
java: [17]
engine: [graalvm]
experimental: [false]
include:
- os: macos
java: 17
engine: graalvm
experimental: false

name: "JVM"
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.experimental }}

permissions:
actions: "read"
checks: "write"
contents: "write"
pull-requests: "write"

defaults:
run:
shell: bash

steps:
- name: "Setup: Checkout"
uses: actions/checkout@v3
- name: "Setup: GraalVM"
uses: graalvm/setup-graalvm@v1
if: ${{ matrix.engine == 'graalvm' }}
with:
components: "native-image,js"
version: latest
java-version: ${{ matrix.java }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Setup: Zulu"
uses: actions/setup-java@v3
if: ${{ matrix.engine != 'graalvm' }}
with:
distribution: ${{ matrix.engine }}
java-version: ${{ matrix.java }}
- name: "Setup: Node"
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: "Setup: Yarn"
run: yarn
- name: "Run Benchmarks"
uses: gradle/gradle-build-action@v2.3.3
id: gradlebench
continue-on-error: ${{ matrix.experimental }}
env:
CI: true
GRADLE_CACHE_PUSH: false
with:
cache-read-only: true
arguments: |
:benchmarks:server:benchmark
--no-daemon
--warning-mode=none
--dependency-verification=lenient
-Pelide.ci=true
-PbuildBenchmarks=true
-PbuildSamples=false
-PbuildDocs=false
-Pversions.java.language=${{ matrix.java }}
- name: "Locate Benchmark Report"
id: benchreport
run: |
echo "BENCHMARK_REPORT=$(find benchmarks/server/build/reports/benchmarks/main -name "*.json" | head -n 1)" >> $GITHUB_OUTPUT
- name: "Restore Previous Benchmark"
uses: actions/cache@v1
with:
path: ./benchmark_reports
key: ${{ runner.os }}-${{ matrix.engine }}-${{ matrix.java }}-benchmark
- name: "Upload Benchmark Report"
uses: benchmark-action/github-action-benchmark@v1
with:
name: "Elide: Server"
tool: "jmh"
auto-push: false
external-data-json-path: benchmark_reports/benchmark-data.json
comment-on-alert: true
comment-always: ${{ !matrix.experimental }}
output-file-path: ${{ steps.benchreport.outputs.BENCHMARK_REPORT }}
github-token: ${{ secrets.GITHUB_TOKEN }}
fail-on-alert: ${{ !matrix.experimental }}
Loading

2 comments on commit 1284518

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elide: Server

Benchmark suite Current: 1284518 Previous: 627cb9b Ratio
elide.benchmarks.PageBenchmarkDirect.controllerCSS 441274.6138335485 ops/s 368674.1416692193 ops/s 1.20
elide.benchmarks.PageBenchmarkDirect.controllerHTML 184637.006168911 ops/s 158664.51338603592 ops/s 1.16
elide.benchmarks.PageBenchmarkDirect.controllerServeAsset 451801.0809152401 ops/s 375923.12127715367 ops/s 1.20
elide.benchmarks.PageBenchmarkDirect.controllerServeJSON 6301317.31525791 ops/s 5498043.81165404 ops/s 1.15

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Elide: Server

Benchmark suite Current: 1284518 Previous: 627cb9b Ratio
elide.benchmarks.PageBenchmarkDirect.controllerCSS 301738.74833177874 ops/s 270755.3057330316 ops/s 1.11
elide.benchmarks.PageBenchmarkDirect.controllerHTML 217379.74422921162 ops/s 202953.27551675693 ops/s 1.07
elide.benchmarks.PageBenchmarkDirect.controllerServeAsset 275362.2583459695 ops/s 293128.50666754885 ops/s 0.94
elide.benchmarks.PageBenchmarkDirect.controllerServeJSON 5445507.1845194325 ops/s 5735503.355209672 ops/s 0.95

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.