Skip to content

Commit

Permalink
Merge branch 'develop' into update/sbt-1.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pshirshov authored Oct 29, 2024
2 parents 690ffa7 + dc72803 commit 684e841
Show file tree
Hide file tree
Showing 16 changed files with 334 additions and 222 deletions.
174 changes: 0 additions & 174 deletions .build.sh

This file was deleted.

100 changes: 54 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,35 @@ jobs:
TOKEN_BITWARDEN_SM: ${{ secrets.TOKEN_BITWARDEN_SM }}
run: |
echo "HAVE_SECRETS=${{ env.TOKEN_BITWARDEN_SM != '' }}" >> $GITHUB_OUTPUT
build-jvm:
runs-on: ubuntu-latest
needs: [ 'checksecret' ]
strategy:
fail-fast: false
matrix:
java: [ '11', '17' ]
java: [ '11', '17', '22' ]
scala: [ '2.12', '2.13', '3' ]
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: 7mind/github-env@minimal
- name: Build and Test with Coverage
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
if: matrix.scala != '3'
run: |
bash sbtgen.sc
bash .build.sh ${{ matrix.scala }} coverage
run: ./build.sh nix gen coverage
- name: Build and Test without Coverage # coverage leads to verification errors on scala3
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
if: matrix.scala == '3'
run: |
bash sbtgen.sc
bash .build.sh ${{ matrix.scala }} test
run: ./build.sh nix gen test
- uses: dorny/test-reporter@v1
if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
# continue-on-error: ${{ matrix.scala == '3' }}
with:
name: Test reports (JDK ${{ matrix.java }}, Scala ${{ matrix.scala }}, JVM)
path: '**/target/test-reports/TEST-*.xml'
reporter: java-junit
# fail-on-error: ${{ matrix.scala != '3' }}
- uses: bitwarden/sm-action@v2
if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
with:
Expand All @@ -60,70 +60,69 @@ jobs:
continue-on-error: true
with:
token: ${{ env.TOKEN_CODECOV }}
verbose: true # optional (default = false)
# fail_ci_if_error: ${{ matrix.scala != '3' }}
verbose: true
files: "**/cobertura.xml"
# fail_ci_if_error: ${{ matrix.scala != '3' }}
# TODO: do we need scoverage.xml? If so files: may be just omitted
# files: cobertura.xml,scoverage.xml
# flags: unittests
- name: Upload dependency graph
uses: scalacenter/sbt-dependency-submission@ab086b50c947c9774b70f39fc7f6e20ca2706c91
if: github.ref == 'develop'

build-js:
runs-on: ubuntu-latest
needs: [ 'checksecret' ]
strategy:
fail-fast: false
matrix:
java: [ '11', '17' ]
java: [ '11', '17', '22' ]
scala: [ '2.12', '2.13', '3' ]
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: 7mind/github-env@minimal
- name: Build and Test with Coverage
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
if: matrix.scala != '3'
run: |
bash sbtgen.sc --nojvm --js
bash .build.sh ${{ matrix.scala }} coverage
run: ./build.sh nix gen-jsonly coverage
- name: Build and Test without Coverage # coverage leads to verification errors on scala3
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
if: matrix.scala == '3'
run: |
bash sbtgen.sc --nojvm --js
bash .build.sh ${{ matrix.scala }} test
run: ./build.sh nix gen-jsonly test
- uses: dorny/test-reporter@v1
if: (needs.checksecret.outputs.HAVE_SECRETS == 'true') && (success() || failure())
# continue-on-error: ${{ matrix.scala == '3' }}
with:
name: Test reports (JDK ${{ matrix.java }}, Scala ${{ matrix.scala }}, JS)
path: '**/target/test-reports/TEST-*.xml'
reporter: java-junit
# fail-on-error: ${{ matrix.scala != '3' }}

test-site:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
java: [ '22' ]
scala: [ '2.13']
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: 7mind/github-env@minimal
- name: Build Microsite
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} site-test
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
run: ./build.sh nix gen-js site-test

publish-site:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17' ]
java: [ '22' ]
scala: [ '2.13']
needs: [ 'build-jvm', 'build-js', 'test-site', 'checksecret' ]
if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: 7mind/github-env@minimal
- uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.TOKEN_BITWARDEN_SM }}
Expand All @@ -134,21 +133,22 @@ jobs:
key: ${{ env.IZUMI_MICROSITE_KEY }}
known_hosts: 'unnecessary' # github.com is already there
- name: Publish Microsite
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} site-publish
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
run: ./build.sh nix gen-js site-publish

publish-artifacts:
runs-on: ubuntu-latest
needs: [ 'build-jvm', 'build-js', 'checksecret' ]
if: needs.checksecret.outputs.HAVE_SECRETS == 'true'
strategy:
fail-fast: false
matrix:
java: [ '11' ]
scala: [ '2.12', '2.13', '3']
steps:
- uses: 7mind/github-env@main
with:
java-version: ${{ matrix.java }}
- uses: 7mind/github-env@minimal
- uses: bitwarden/sm-action@v2
with:
access_token: ${{ secrets.TOKEN_BITWARDEN_SM }}
Expand All @@ -157,10 +157,18 @@ jobs:
749f4227-9f11-4ceb-9121-b1930110c3a9 > OPENSSL_KEY
a2fe5b5b-5f3f-47f8-961c-b1930110cea7 > OPENSSL_IV
- name: Build and Publish to Sonatype
# continue-on-error: ${{ matrix.scala == '3' }}
env:
SCALA_VERSION: ${{ matrix.scala }}
JAVA_VERSION: ${{ matrix.java }}
SONATYPE_SECRET: .secrets/credentials.sonatype-nexus.properties
run: |
bash sbtgen.sc --js
bash .build.sh ${{ matrix.scala }} secrets publishScala
mkdir .secrets
echo "$SONATYPE_CREDENTIALS_FILE" > "$SONATYPE_SECRET"
openssl aes-256-cbc -K ${OPENSSL_KEY} -iv ${OPENSSL_IV} -in secrets.tar.enc -out secrets.tar -d
tar xvf secrets.tar
./build.sh nix gen-js publish-scala
all-good:
if: always()
runs-on: ubuntu-latest
Expand Down
Loading

0 comments on commit 684e841

Please sign in to comment.