Skip to content

Give some love to the project #1847

Give some love to the project

Give some love to the project #1847

Workflow file for this run

name: CI
env:
JDK_JAVA_OPTIONS: -XX:+PrintCommandLineFlags -XX:MaxMetaspaceSize=4G -Xmx4G -Xss8M # JDK_JAVA_OPTIONS is _the_ env. variable to use for modern Java
JVM_OPTS: -XX:+PrintCommandLineFlags -XX:MaxMetaspaceSize=4G -Xmx4G -Xss8M # for Java 8 only (sadly, it is not modern enough for JDK_JAVA_OPTIONS)
NODE_OPTIONS: --max_old_space_size=6144
on:
pull_request:
push:
branches: ['series/2.x']
release:
types:
- published
jobs:
lint:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Lint code
run: ./sbt check
compile:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
java: ['17']
platform: ['JVM', 'JS', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Check all code compiles
run: free --si -tmws 10 & ./sbt +root${{ matrix.platform }}/Test/compile
publishLocal:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8 # ensure it works on 8 because we publish for 8
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Check that building packages works
run: ./sbt +publishLocal
test:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
scala: ['2.12.*', '2.13.*', '3.*']
java: ['17']
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: tests 2.12
if: ${{ startsWith(matrix.scala, '2.12.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root212/test
- name: tests 2.13
if: ${{ startsWith(matrix.scala, '2.13.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root213/test
- name: tests 3
if: ${{ startsWith(matrix.scala, '3.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root3/test
testJvms:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
java: ['8', '11']
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Test on different JVM versions
run: ./sbt root${{ matrix.platform }}/test
testPlatforms:
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
java: ['17']
platform: ['JS', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected]
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: ${{ matrix.java }}
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Test on different Scala target platforms
run: ./sbt root${{ matrix.platform }}/test
ci:
runs-on: ubuntu-22.04
needs: [lint, compile, publishLocal, test, testJvms, testPlatforms]
steps:
- name: Aggregate of lint, and all tests
run: echo "ci passed"
publish:
runs-on: ubuntu-22.04
timeout-minutes: 60
needs: [ci]
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 8 # publish for 8
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Install libuv
run: sudo apt-get update && sudo apt-get install -y libuv1-dev
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 7
- name: Release artifacts
run: ./sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}