Update quickstart example to show bigger difference between code by hand and Chimney DSL #956
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
types: ['opened', 'reopened', 'labeled', 'synchronize'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || github.event.action != 'labeled' # run for 'opened', 'reopened' and 'synchronize' | |
strategy: | |
matrix: | |
scala: ["2_12", "2_13", "3"] | |
platform: ["jvm", "js", "native"] | |
jvm: ['adopt:1.8.0-292', 'temurin:1.19.0.2'] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: coursier/cache-action@v6 | |
- uses: coursier/[email protected] | |
with: | |
jvm: ${{ matrix.jvm }} | |
apps: sbt | |
- name: Clean, Check code formatting, compile, test, generate coverage report | |
run: sbt ci-${{ matrix.platform }}-${{ matrix.scala }} | |
- uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
benchmark: | |
needs: build | |
runs-on: benchmarks | |
concurrency: 'benchmark' | |
if: > | |
github.event_name == 'push' || | |
(github.event.action == 'labeled' && github.event.label.name == 'benchmark') || | |
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'benchmark')) | |
environment: 'benchmark' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# coursier parallel fetch is faster than cache download+upload on our custom runner machine | |
# - uses: coursier/cache-action@v6 | |
- uses: coursier/[email protected] | |
with: | |
jvm: 'temurin:1.19.0.2' # TODO LB java version from matrix | |
apps: sbt | |
- name: Run Scala 2 benchmarks # TODO: run for Scala 3 too | |
run: sbt "benchmarks/Jmh/run -rf json -rff $(pwd)/$(git describe --tags --always).json" | |
- name: Fetch benchmarks metadata | |
run: curl https://raw.githubusercontent.com/scalalandio/chimney-benchmark-results/main/meta.json -o meta.json | |
- name: Get nope.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Process current benchmarks results | |
run: node .github/scripts/process-benchmarks.mjs "$GITHUB_CONTEXT" "$(git describe --tags --always)" | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
- name: Save benchmark results | |
run: | | |
SHA=$(cat sha) | |
mkdir -p ./results/${{ github.event_name }}/$SHA | |
mv meta.json ./results | |
mv sha ./results | |
mv $(git describe --tags --always).json ./results/${{ github.event_name }}/$SHA | |
echo "$(git describe --tags --always)" > ./results/version | |
echo "${{ github.event_name }}" > ./results/event | |
- name: Upload benchmark results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: benchmark-results | |
path: results |