Skip to content

Commit 30b9b48

Browse files
authored
Scala Native (#381)
1 parent 7ff54a3 commit 30b9b48

File tree

38 files changed

+228
-78
lines changed

38 files changed

+228
-78
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.github/workflows/ci.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ jobs:
2727
strategy:
2828
matrix:
2929
os: [ubuntu-latest]
30-
scala: [3.1.2]
31-
java: [graal_21.3.0@11]
30+
scala: [3.2.0]
31+
java: [temurin@11]
3232
runs-on: ${{ matrix.os }}
3333
steps:
3434
- name: Checkout current branch (full)
3535
uses: actions/checkout@v2
3636
with:
3737
fetch-depth: 0
3838

39-
- name: Setup GraalVM (graal_21.3.0@11)
40-
if: matrix.java == 'graal_21.3.0@11'
41-
uses: DeLaGuardo/setup-[email protected]
39+
- name: Setup Java (temurin@11)
40+
if: matrix.java == 'temurin@11'
41+
uses: actions/setup-java@v2
4242
with:
43-
graalvm: 21.3.0
44-
java: java11
43+
distribution: temurin
44+
java-version: 11
4545

4646
- name: Cache sbt
4747
uses: actions/cache@v2
@@ -62,7 +62,7 @@ jobs:
6262
run: sbt ++${{ matrix.scala }} test
6363

6464
- name: Compress target directories
65-
run: tar cf targets.tar target project/target
65+
run: tar cf targets.tar target app/.jvm/target app/.native/target project/target
6666

6767
- name: Upload target directories
6868
uses: actions/upload-artifact@v2
@@ -77,21 +77,21 @@ jobs:
7777
strategy:
7878
matrix:
7979
os: [ubuntu-latest]
80-
scala: [3.1.2]
81-
java: [graal_21.3.0@11]
80+
scala: [3.2.0]
81+
java: [temurin@11]
8282
runs-on: ${{ matrix.os }}
8383
steps:
8484
- name: Checkout current branch (full)
8585
uses: actions/checkout@v2
8686
with:
8787
fetch-depth: 0
8888

89-
- name: Setup GraalVM (graal_21.3.0@11)
90-
if: matrix.java == 'graal_21.3.0@11'
91-
uses: DeLaGuardo/setup-[email protected]
89+
- name: Setup Java (temurin@11)
90+
if: matrix.java == 'temurin@11'
91+
uses: actions/setup-java@v2
9292
with:
93-
graalvm: 21.3.0
94-
java: java11
93+
distribution: temurin
94+
java-version: 11
9595

9696
- name: Cache sbt
9797
uses: actions/cache@v2
@@ -105,12 +105,12 @@ jobs:
105105
~/Library/Caches/Coursier/v1
106106
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}
107107

108-
- name: Download target directories (3.1.2)
108+
- name: Download target directories (3.2.0)
109109
uses: actions/download-artifact@v2
110110
with:
111-
name: target-${{ matrix.os }}-3.1.2-${{ matrix.java }}
111+
name: target-${{ matrix.os }}-3.2.0-${{ matrix.java }}
112112

113-
- name: Inflate target directories (3.1.2)
113+
- name: Inflate target directories (3.2.0)
114114
run: |
115115
tar xf targets.tar
116116
rm targets.tar

.sbtopts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-J-Xmx8G
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.kubukoz.next
2+
3+
import cats.effect.unsafe.IORuntime
4+
5+
object RuntimePlatform {
6+
val default: IORuntime = IORuntime.global
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.kubukoz.next
2+
3+
import epollcat.unsafe.EpollRuntime
4+
import cats.effect.unsafe.IORuntime
5+
6+
object RuntimePlatform {
7+
val default: IORuntime = EpollRuntime.global
8+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)