-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from davenverse/updates
Update Build and Deps
- Loading branch information
Showing
13 changed files
with
204 additions
and
106 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,11 @@ on: | |
tags: [v*] | ||
|
||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_CREDENTIAL_HOST: ${{ secrets.SONATYPE_CREDENTIAL_HOST }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
|
@@ -23,19 +28,31 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.12.10, 2.13.6, 3.1.2] | ||
java: [[email protected], [email protected]] | ||
scala: [2.12.15, 2.13.8, 3.2.1] | ||
java: [temurin@8] | ||
project: [rootJVM] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v12 | ||
- name: Download Java (temurin@8) | ||
id: download-java-temurin-8 | ||
if: matrix.java == 'temurin@8' | ||
uses: typelevel/download-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
java-version: 8 | ||
|
||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: jdkfile | ||
java-version: 8 | ||
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
|
@@ -49,25 +66,34 @@ jobs: | |
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Setup Ruby | ||
if: matrix.scala == '2.13.6' | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.1 | ||
- name: Check that workflows are up to date | ||
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck | ||
|
||
- name: Install microsite dependencies | ||
if: matrix.scala == '2.13.6' | ||
run: | | ||
gem install saas | ||
gem install jekyll -v 4.2.0 | ||
- name: Test | ||
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test | ||
|
||
- name: Check that workflows are up to date | ||
run: sbt --client '++${{ matrix.scala }}; githubWorkflowCheck' | ||
- name: Check binary compatibility | ||
if: matrix.java == 'temurin@8' | ||
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' mimaReportBinaryIssues | ||
|
||
- run: sbt --client '++${{ matrix.scala }}; test; mimaReportBinaryIssues' | ||
- name: Generate API documentation | ||
if: matrix.java == 'temurin@8' | ||
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc | ||
|
||
- if: matrix.scala == '2.13.6' | ||
run: sbt --client '++${{ matrix.scala }}; site/makeMicrosite' | ||
- 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 site/target .jvm/target .native/target core/target example/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 site/target .jvm/target .native/target core/target example/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 | ||
|
||
publish: | ||
name: Publish Artifacts | ||
|
@@ -76,19 +102,30 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3.1.2] | ||
java: [adopt@1.8] | ||
scala: [2.13.8] | ||
java: [temurin@8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v12 | ||
- name: Download Java (temurin@8) | ||
id: download-java-temurin-8 | ||
if: matrix.java == 'temurin@8' | ||
uses: typelevel/download-java@v1 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
java-version: 8 | ||
|
||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: jdkfile | ||
java-version: 8 | ||
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
|
@@ -102,27 +139,99 @@ jobs: | |
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- uses: olafurpg/setup-gpg@v3 | ||
- name: Download target directories (2.12.15, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJVM | ||
|
||
- name: Inflate target directories (2.12.15, rootJVM) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Download target directories (2.13.8, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM | ||
|
||
- name: Inflate target directories (2.13.8, rootJVM) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
- name: Download target directories (3.2.1, rootJVM) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
ruby-version: 3.0.1 | ||
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.1-rootJVM | ||
|
||
- name: Install microsite dependencies | ||
- name: Inflate target directories (3.2.1, rootJVM) | ||
run: | | ||
gem install saas | ||
gem install jekyll -v 4.2.0 | ||
tar xf targets.tar | ||
rm targets.tar | ||
- name: Import signing key | ||
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == '' | ||
run: echo $PGP_SECRET | base64 -di | gpg --import | ||
|
||
- name: Import signing key and strip passphrase | ||
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE != '' | ||
run: | | ||
echo "$PGP_SECRET" | base64 -di > /tmp/signing-key.gpg | ||
echo "$PGP_PASSPHRASE" | gpg --pinentry-mode loopback --passphrase-fd 0 --import /tmp/signing-key.gpg | ||
(echo "$PGP_PASSPHRASE"; echo; echo) | gpg --command-fd 0 --pinentry-mode loopback --change-passphrase $(gpg --list-secret-keys --with-colons 2> /dev/null | grep '^sec:' | cut --delimiter ':' --fields 5 | tail -n 1) | ||
- name: Publish | ||
run: sbt '++${{ matrix.scala }}' tlRelease | ||
|
||
site: | ||
name: Generate Site | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [2.13.8] | ||
java: [temurin@8] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Download Java (temurin@8) | ||
id: download-java-temurin-8 | ||
if: matrix.java == 'temurin@8' | ||
uses: typelevel/download-java@v1 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
|
||
- name: Setup Java (temurin@8) | ||
if: matrix.java == 'temurin@8' | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: jdkfile | ||
java-version: 8 | ||
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }} | ||
|
||
- name: Publish artifacts to Sonatype | ||
env: | ||
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | ||
PGP_SECRET: ${{ secrets.PGP_SECRET }} | ||
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | ||
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | ||
run: sbt --client '++${{ matrix.scala }}; ci-release' | ||
- 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') }} | ||
|
||
- uses: christopherdavenport/create-ghpages-ifnotexists@v1 | ||
- name: Generate site | ||
run: sbt '++${{ matrix.scala }}' site/tlSite | ||
|
||
- name: Publish microsite | ||
run: sbt --client '++${{ matrix.scala }}; site/publishMicrosite' | ||
- name: Publish site | ||
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: site/target/docs/site | ||
keep_files: true |
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
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
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
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
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
Oops, something went wrong.