Skip to content

Commit

Permalink
Merge pull request #68 from davenverse/timeoutMechanism
Browse files Browse the repository at this point in the history
Add Timeout Mechanism, default to 60 seconds
  • Loading branch information
ChristopherDavenport authored Apr 4, 2023
2 parents 754ca4f + 7eaab26 commit f6ff01d
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 76 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Continuous Integration

on:
pull_request:
branches: ['**']
branches: ['**', '!update/**', '!pr/**']
push:
branches: ['**']
branches: ['**', '!update/**', '!pr/**']
tags: [v*]

env:
Expand All @@ -28,34 +28,34 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15, 2.13.8, 3.1.3]
scala: [2.12.15, 2.13.8, 3.2.2]
java: [temurin@8]
project: [rootJS, rootJVM, rootNative]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
uses: typelevel/download-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: jdkfile
java-version: 8
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -67,26 +67,26 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Check that workflows are up to date
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' 'project /' githubWorkflowCheck
run: sbt githubWorkflowCheck

- name: scalaJSLink
if: matrix.project == 'rootJS'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/scalaJSLinkerResult
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/scalaJSLinkerResult

- name: nativeLink
if: matrix.project == 'rootNative'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/nativeLink
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' Test/nativeLink

- name: Test
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test
run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' test

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

- name: Generate API documentation
if: matrix.java == 'temurin@8'
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' doc
if: matrix.java == 'temurin@8' && matrix.os == 'ubuntu-latest'
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/main')
Expand All @@ -98,7 +98,7 @@ jobs:

- 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
uses: actions/upload-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }}
path: targets.tar
Expand All @@ -115,28 +115,28 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
uses: typelevel/download-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: jdkfile
java-version: 8
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -148,7 +148,7 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.12.15, rootJS)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJS

Expand All @@ -158,7 +158,7 @@ jobs:
rm targets.tar
- name: Download target directories (2.12.15, rootJVM)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootJVM

Expand All @@ -168,7 +168,7 @@ jobs:
rm targets.tar
- name: Download target directories (2.12.15, rootNative)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.15-rootNative

Expand All @@ -178,7 +178,7 @@ jobs:
rm targets.tar
- name: Download target directories (2.13.8, rootJS)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJS

Expand All @@ -188,7 +188,7 @@ jobs:
rm targets.tar
- name: Download target directories (2.13.8, rootJVM)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootJVM

Expand All @@ -198,7 +198,7 @@ jobs:
rm targets.tar
- name: Download target directories (2.13.8, rootNative)
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootNative

Expand All @@ -207,32 +207,32 @@ jobs:
tar xf targets.tar
rm targets.tar
- name: Download target directories (3.1.3, rootJS)
uses: actions/download-artifact@v2
- name: Download target directories (3.2.2, rootJS)
uses: actions/download-artifact@v3
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.3-rootJS
name: target-${{ matrix.os }}-${{ matrix.java }}-3.2.2-rootJS

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

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

- name: Inflate target directories (3.1.3, rootNative)
- name: Inflate target directories (3.2.2, rootNative)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -249,7 +249,7 @@ jobs:
(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
run: sbt '++ ${{ matrix.scala }}' tlCiRelease

site:
name: Generate Site
Expand All @@ -261,28 +261,28 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Download Java (temurin@8)
id: download-java-temurin-8
if: matrix.java == 'temurin@8'
uses: typelevel/download-java@v1
uses: typelevel/download-java@v2
with:
distribution: temurin
java-version: 8

- name: Setup Java (temurin@8)
if: matrix.java == 'temurin@8'
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: jdkfile
java-version: 8
jdkFile: ${{ steps.download-java-temurin-8.outputs.jdkFile }}

- name: Cache sbt
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.sbt
Expand All @@ -294,11 +294,11 @@ jobs:
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Generate site
run: sbt '++${{ matrix.scala }}' site/tlSite
run: sbt '++ ${{ matrix.scala }}' site/tlSite

- name: Publish site
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3.8.0
uses: peaceiris/actions-gh-pages@v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site/target/docs/site
Expand Down
6 changes: 6 additions & 0 deletions .jvmopts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-Dfile.encoding=UTF8
-Xms1G
-Xmx6G
-XX:ReservedCodeCacheSize=250M
-XX:+TieredCompilation
-XX:+UseG1GC
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ ThisBuild / tlCiReleaseBranches := Seq("main")
ThisBuild / tlSonatypeUseLegacyHost := true


val catsV = "2.8.0"
val catsEffectV = "3.3.14"
val fs2V = "3.3.0"
val catsV = "2.9.0"
val catsEffectV = "3.4.8"
val fs2V = "3.6.1"

val munitCatsEffectV = "2.0.0-M3"

ThisBuild / crossScalaVersions := Seq("2.12.15","2.13.8", "3.1.3")
ThisBuild / crossScalaVersions := Seq("2.12.15","2.13.8", "3.2.2")
ThisBuild / scalaVersion := "2.13.8"
ThisBuild / versionScheme := Some("early-semver")

Expand Down
Loading

0 comments on commit f6ff01d

Please sign in to comment.