Skip to content

Commit

Permalink
ci: Switch core to bleep
Browse files Browse the repository at this point in the history
  • Loading branch information
markehammons committed Jun 4, 2023
1 parent 8e2ad0c commit 027d275
Show file tree
Hide file tree
Showing 76 changed files with 49 additions and 107 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/benchmarks.yml

This file was deleted.

80 changes: 5 additions & 75 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,85 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: coursier/setup-action@v1.3.0
with:
jvm: temurin:1.17
apps: mill
- run: mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
- uses: bleep-build/bleep-setup-action@0.0.1
- run: bleep fmt --check

unit-tests:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: coursier/cache-action@v6
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: |
17
19
- uses: bleep-build/bleep-setup-action@0.0.1
- run: mkdir reports
- name: Core tests
run: |
./mill core.compile
./mill core.test
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64}}

- run: |
./mill core.scoverage.xmlReport
cp out/core/scoverage/xmlReport.dest/scoverage.xml reports/core-coverage.xml
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64}}
- name: Java 17 Implementation test
run: |
./mill j17.compile
./mill j17.test
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64}}

- run: |
./mill j17.scoverage.xmlReport
cp out/j17/scoverage/xmlReport.dest/scoverage.xml reports/java17-coverage.xml
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64}}
- name: Java 19 Implementation test
run: |
./mill j19.compile
./mill j19.test
- run: |
./mill j19.scoverage.xmlReport
cp out/j19/scoverage/xmlReport.dest/scoverage.xml reports/java19-coverage.xml
- name: Runtime 17 implementation tests
run: ./mill runtime.test
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}

- run: |
./mill runtime.scoverage.xmlReport
cp out/runtime/scoverage/xmlReport.dest/scoverage.xml reports/java-17-runtime-coverage.xml
env:
JAVA_HOME: ${{ env.JAVA_HOME_17_X64 }}
- name: Runtime 19 implementation tests
run: ./mill runtime.test
- run: |
./mill runtime.scoverage.xmlReport
cp out/runtime/scoverage/xmlReport.dest/scoverage.xml reports/java-19-runtime-coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
directory: reports
flags: ${{ matrix.os }}
run: bleep test core-tests
41 changes: 41 additions & 0 deletions bleep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
$schema: https://raw.githubusercontent.com/oyvindberg/bleep/master/schema.json
$version: 0.0.2
jvm:
name: temurin:1.20.0.1
projects:
core:
dependencies: org.scala-lang::scala3-staging:3.3.0
extends: template-common

core-tests:
dependencies:
- org.scalameta::munit:1.0.0-M7
- org.scalameta::munit-scalacheck:1.0.0-M7
dependsOn: core
extends: template-common
isTestProject: true


j19:
dependsOn: core
extends: template-common

templates:
template-common:
platform:
name: jvm
scala:
version: 3.3.0
options:
- "-deprecation"
- "-Wunused:all"
- "-feature"
- "-unchecked"
- "-Xcheck-macros"
- -Xprint-suspension
- -Yexplicit-nulls
- -Ysafe-init
- -source:future
- -Ykind-projector
- -Vprofile

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ class OptimizableFn[F](
)(optimized: JitCompiler => F):
private val _fn: AtomicReference[F] = AtomicReference(f(inst))
val uuid = UUID.randomUUID().nn
private val _optFn: AtomicReference[F] = AtomicReference(
private val _optFn: AtomicReference[F] =
if inst.getCount() >= limit then
var opt: F | Null = null
optimizer.jitC(uuid, jitCompiler => opt = optimized(jitCompiler))
opt
else null
)
AtomicReference(opt.nn)
else AtomicReference()

def get: F =
val optFn = _optFn.getOpaque()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 027d275

Please sign in to comment.