Skip to content

Update sbt, scripted-plugin to 1.10.4 (#136) #316

Update sbt, scripted-plugin to 1.10.4 (#136)

Update sbt, scripted-plugin to 1.10.4 (#136) #316

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-latest ]
scala: [ 2.12, 2.13, 3.3 ]
java: [ temurin@17 ]
project: [ rootJS, root, rootNative ]
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: sbt
- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update
- 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@v4
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-latest ]
java: [ temurin@17 ]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: sbt
- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update
- name: Download target directories (3.3, rootJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3-rootJS
- name: Inflate target directories (3.3, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.3, root)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3-root
- name: Inflate target directories (3.3, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.3, rootNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.3-rootNative
- name: Inflate target directories (3.3, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12, rootJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootJS
- name: Inflate target directories (2.12, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12, root)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-root
- name: Inflate target directories (2.12, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12, rootNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12-rootNative
- name: Inflate target directories (2.12, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13, rootJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJS
- name: Inflate target directories (2.13, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13, root)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-root
- name: Inflate target directories (2.13, root)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13, rootNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootNative
- name: Inflate target directories (2.13, 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 }}