Skip to content

Commit

Permalink
ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
luksow committed Oct 15, 2024
1 parent 35ab598 commit 06b06f3
Showing 1 changed file with 67 additions and 12 deletions.
79 changes: 67 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
os: [ubuntu-latest]
scala: [2.13, 3]
java: [temurin@11, temurin@17]
project: [rootJS, rootJVM, rootNative]
exclude:
- project: rootJS
java: temurin@17
- project: rootNative
java: temurin@17
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand Down Expand Up @@ -70,30 +76,38 @@ jobs:
- name: Check that workflows are up to date
run: sbt githubWorkflowCheck

- 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 '++ ${{ matrix.scala }}' test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

- name: Check binary compatibility
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt '++ ${{ matrix.scala }}' mimaReportBinaryIssues
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' mimaReportBinaryIssues

- name: Generate API documentation
if: matrix.java == 'temurin@11' && matrix.os == 'ubuntu-latest'
run: sbt '++ ${{ matrix.scala }}' doc
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc

- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
run: mkdir -p sealedmonad/.native/target target sealedmonad/.jvm/target sealedmonad/.js/target project/target
run: mkdir -p sealedmonad/.native/target sealedmonad/.jvm/target sealedmonad/.js/target project/target

- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
run: tar cf targets.tar sealedmonad/.native/target target sealedmonad/.jvm/target sealedmonad/.js/target project/target
run: tar cf targets.tar sealedmonad/.native/target sealedmonad/.jvm/target sealedmonad/.js/target project/target

- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
path: targets.tar

publish:
Expand Down Expand Up @@ -140,22 +154,62 @@ jobs:
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- name: Download target directories (2.13)
- 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, rootJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13-rootJVM

- name: Inflate target directories (2.13, rootJVM)
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: Download target directories (3, rootJS)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJS

- name: Inflate target directories (3, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3, rootJVM)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootJVM

- name: Inflate target directories (2.13)
- name: Inflate target directories (3, rootJVM)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (3)
- name: Download target directories (3, rootNative)
uses: actions/download-artifact@v4
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3
name: target-${{ matrix.os }}-${{ matrix.java }}-3-rootNative

- name: Inflate target directories (3)
- name: Inflate target directories (3, rootNative)
run: |
tar xf targets.tar
rm targets.tar
Expand Down Expand Up @@ -230,4 +284,5 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
modules-ignore: root_2.13 root_3 rootjs_2.13 rootjs_3 rootjvm_2.13 rootjvm_3 rootnative_2.13 rootnative_3
configs-ignore: test scala-tool scala-doc-tool test-internal

0 comments on commit 06b06f3

Please sign in to comment.