Skip to content

Commit

Permalink
Fix CIs
Browse files Browse the repository at this point in the history
  • Loading branch information
guizmaii committed Jan 9, 2025
1 parent 8b60b62 commit 1e6874b
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 692 deletions.
74 changes: 46 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ jobs:
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
Expand All @@ -35,7 +37,7 @@ jobs:
with:
swap-size-gb: 7
- name: Lint code
run: ./sbt check
run: sbt check

compile:
runs-on: ubuntu-22.04
Expand All @@ -47,9 +49,11 @@ jobs:
platform: ['JVM', 'JS', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected]
uses: actions/checkout@v4
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
Expand All @@ -61,16 +65,18 @@ jobs:
with:
swap-size-gb: 7
- name: Check all code compiles
run: free --si -tmws 10 & ./sbt +root${{ matrix.platform }}/Test/compile
run: free --si -tmws 10 & sbt +root${{ matrix.platform }}/Test/compile

publishLocal:
runs-on: ubuntu-22.04
timeout-minutes: 60
steps:
- name: Checkout current branch
uses: actions/[email protected]
uses: actions/checkout@v4
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11 # ensure it works on 11 because we publish for 11
Expand All @@ -87,7 +93,7 @@ jobs:
with:
swap-size-gb: 7
- name: Check that building packages works
run: ./sbt +publishLocal
run: sbt +publishLocal
- name: Check website build process
run: sbt docs/clean; sbt docs/buildWebsite

Expand All @@ -102,11 +108,13 @@ jobs:
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
Expand All @@ -119,13 +127,13 @@ jobs:
swap-size-gb: 7
- name: tests 2.12
if: ${{ startsWith(matrix.scala, '2.12.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root212/test
run: free --si -tmws 10 & sbt ++${{ matrix.scala }} root212/test
- name: tests 2.13
if: ${{ startsWith(matrix.scala, '2.13.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root213/test
run: free --si -tmws 10 & sbt ++${{ matrix.scala }} root213/test
- name: tests 3
if: ${{ startsWith(matrix.scala, '3.') }}
run: free --si -tmws 10 & ./sbt ++${{ matrix.scala }} root3/test
run: free --si -tmws 10 & sbt ++${{ matrix.scala }} root3/test

testJvms:
runs-on: ubuntu-22.04
Expand All @@ -137,9 +145,11 @@ jobs:
platform: ['JVM']
steps:
- name: Checkout current branch
uses: actions/[email protected]
uses: actions/checkout@v4
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
Expand All @@ -151,7 +161,7 @@ jobs:
with:
swap-size-gb: 7
- name: Test on different JVM versions
run: ./sbt root${{ matrix.platform }}/test
run: sbt root${{ matrix.platform }}/test

testPlatforms:
runs-on: ubuntu-22.04
Expand All @@ -163,9 +173,11 @@ jobs:
platform: ['JS', 'Native']
steps:
- name: Checkout current branch
uses: actions/[email protected]
uses: actions/checkout@v4
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
Expand All @@ -177,7 +189,7 @@ jobs:
with:
swap-size-gb: 7
- name: Test on different Scala target platforms
run: ./sbt test${{ matrix.platform }}
run: sbt test${{ matrix.platform }}

update-readme:
name: Update README
Expand All @@ -186,11 +198,13 @@ jobs:
if: ${{ github.event_name == 'push' }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Scala
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
Expand Down Expand Up @@ -255,11 +269,13 @@ jobs:
if: github.event_name != 'pull_request'
steps:
- name: Checkout current branch
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Java
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11 # publish for 11
Expand All @@ -271,7 +287,7 @@ jobs:
with:
swap-size-gb: 7
- name: Release artifacts
run: ./sbt ci-release
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
Expand All @@ -287,11 +303,13 @@ jobs:
if: ${{ ((github.event_name == 'release') && (github.event.action == 'published')) || (github.event_name == 'workflow_dispatch') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup sbt
uses: sbt/setup-sbt@v1
- name: Setup Scala
uses: actions/setup-java@v4.6.0
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '11'
Expand All @@ -317,7 +335,7 @@ jobs:
if: ${{ (github.event_name == 'release') && (github.event.action == 'published') }}
steps:
- name: Git Checkout
uses: actions/checkout@v4.2.2
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: notify the main repo about the new release of docs package
Expand Down
Loading

0 comments on commit 1e6874b

Please sign in to comment.