Skip to content

Update scala3-library, ... to 3.4.1 (#107) #254

Update scala3-library, ... to 3.4.1 (#107)

Update scala3-library, ... to 3.4.1 (#107) #254

Workflow file for this run

name: Build
on:
push:
branches: [ main ]
tags: ["*"]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.md'
jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-22.04]
scala: [3.4.1, 2.12.19, 2.13.14]
java: [temurin@17]
project: [rootJS, root, rootNative]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Java (temurin@17)
id: download-java-temurin-17
if: matrix.java == 'temurin@17'
uses: typelevel/download-java@v1
with:
distribution: temurin
java-version: 17
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v2
with:
distribution: jdkfile
java-version: 17
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Install brew formulae (ubuntu)
if: (matrix.project == 'rootNative') && startsWith(matrix.os, 'ubuntu')
run: /home/linuxbrew/.linuxbrew/bin/brew install openssl s2n
- name: Check headers and formatting
if: matrix.java == 'temurin@17'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' headerCheckAll scalafmtCheckAll 'project /' scalafmtSbtCheck
- name: scalaJSLink
if: matrix.project == 'rootJS'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult
- name: nativeLink
if: matrix.project == 'rootNative'
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink
- name: Test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test
- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: mkdir -p target .js/target .jvm/target .native/target project/target
- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
run: tar cf targets.tar target .js/target .jvm/target .native/target project/target
- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
uses: actions/upload-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
path: targets.tar
key: ${{ runner.os }}-target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
publish:
name: Publish Artifacts
needs: [ build ]
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
strategy:
matrix:
os: [ ubuntu-22.04 ]
scala: [ 2.13.14 ]
java: [ temurin@17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Java (temurin@17)
id: download-java-temurin-17
if: matrix.java == 'temurin@17'
uses: typelevel/download-java@v1
with:
distribution: temurin
java-version: 17
- name: Setup Java (temurin@17)
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v2
with:
distribution: jdkfile
java-version: 17
jdkFile: ${{ steps.download-java-temurin-17.outputs.jdkFile }}
- name: Cache sbt
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.coursier/cache/v1
~/.cache/coursier/v1
~/AppData/Local/Coursier/Cache/v1
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
- name: Download target directories (3.4.1, rootJS)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.4.1-rootJS
- name: Inflate target directories (3.4.1, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.4.1, root)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.4.1-root
- name: Inflate target directories (3.4.1, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.4.1, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.4.1-rootNative
- name: Inflate target directories (3.4.1, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.19, rootJS)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.19-rootJS
- name: Inflate target directories (2.12.19, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.19, root)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.19-root
- name: Inflate target directories (2.12.19, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.19, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.19-rootNative
- name: Inflate target directories (2.12.19, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.14, rootJS)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.14-rootJS
- name: Inflate target directories (2.13.14, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.14, root)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.14-root
- name: Inflate target directories (2.13.14, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.14, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.14-rootNative
- name: Inflate target directories (2.13.14, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Publish
run: sbt '++ ${{ matrix.scala }}' ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}