-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
228 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,21 +27,21 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3.1.2] | ||
java: [graal_21.3.0@11] | ||
scala: [3.2.0] | ||
java: [temurin@11] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup GraalVM (graal_21.3.0@11) | ||
if: matrix.java == 'graal_21.3.0@11' | ||
uses: DeLaGuardo/setup-[email protected] | ||
- name: Setup Java (temurin@11) | ||
if: matrix.java == 'temurin@11' | ||
uses: actions/setup-java@v2 | ||
with: | ||
graalvm: 21.3.0 | ||
java: java11 | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
|
@@ -62,7 +62,7 @@ jobs: | |
run: sbt ++${{ matrix.scala }} test | ||
|
||
- name: Compress target directories | ||
run: tar cf targets.tar target project/target | ||
run: tar cf targets.tar target app/.jvm/target app/.native/target project/target | ||
|
||
- name: Upload target directories | ||
uses: actions/upload-artifact@v2 | ||
|
@@ -77,21 +77,21 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
scala: [3.1.2] | ||
java: [graal_21.3.0@11] | ||
scala: [3.2.0] | ||
java: [temurin@11] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout current branch (full) | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup GraalVM (graal_21.3.0@11) | ||
if: matrix.java == 'graal_21.3.0@11' | ||
uses: DeLaGuardo/setup-[email protected] | ||
- name: Setup Java (temurin@11) | ||
if: matrix.java == 'temurin@11' | ||
uses: actions/setup-java@v2 | ||
with: | ||
graalvm: 21.3.0 | ||
java: java11 | ||
distribution: temurin | ||
java-version: 11 | ||
|
||
- name: Cache sbt | ||
uses: actions/cache@v2 | ||
|
@@ -105,12 +105,12 @@ jobs: | |
~/Library/Caches/Coursier/v1 | ||
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} | ||
|
||
- name: Download target directories (3.1.2) | ||
- name: Download target directories (3.2.0) | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: target-${{ matrix.os }}-3.1.2-${{ matrix.java }} | ||
name: target-${{ matrix.os }}-3.2.0-${{ matrix.java }} | ||
|
||
- name: Inflate target directories (3.1.2) | ||
- name: Inflate target directories (3.2.0) | ||
run: | | ||
tar xf targets.tar | ||
rm targets.tar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-J-Xmx8G |
7 changes: 7 additions & 0 deletions
7
app/.jvm/src/main/scala/com/kubukoz/next/RuntimePlatform.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.kubukoz.next | ||
|
||
import cats.effect.unsafe.IORuntime | ||
|
||
object RuntimePlatform { | ||
val default: IORuntime = IORuntime.global | ||
} |
8 changes: 8 additions & 0 deletions
8
app/.native/src/main/scala/com/kubukoz/next/RuntimePlatform.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.kubukoz.next | ||
|
||
import epollcat.unsafe.EpollRuntime | ||
import cats.effect.unsafe.IORuntime | ||
|
||
object RuntimePlatform { | ||
val default: IORuntime = EpollRuntime.global | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package monocle | ||
|
||
import cats.Functor | ||
|
||
type Lens[S, A] = PLens[S, S, A, A] | ||
|
||
object Lens { | ||
|
||
def apply[S, A](_get: S => A)(_set: A => S => S): Lens[S, A] = new Lens[S, A] { | ||
|
||
def get(s: S): A = _get(s) | ||
|
||
def set(s: S, a: A): S = _set(a)(s) | ||
} | ||
|
||
} | ||
|
||
trait PLens[S, T, A, B] { | ||
def get(s: S): A | ||
def set(s: S, b: B): T | ||
def replace(b: B): S => T = set(_, b) | ||
|
||
def asGetter: Getter[S, A] = get(_) | ||
|
||
def modifyF[F[_]: Functor](f: A => F[B])(s: S): F[T] = Functor[F].map(f(get(s)))(set(s, _)) | ||
} | ||
|
||
object PLens { | ||
|
||
def apply[S, T, A, B](_get: S => A)(_set: B => S => T): PLens[S, T, A, B] = new PLens[S, T, A, B] { | ||
|
||
def get(s: S): A = _get(s) | ||
|
||
def set(s: S, b: B): T = _set(b)(s) | ||
|
||
} | ||
|
||
} | ||
|
||
trait Getter[S, A] { | ||
def get(s: S): A | ||
def map[B](f: A => B): Getter[S, B] = s => f(get(s)) | ||
} | ||
|
||
object syntax { | ||
object all {} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
inputs.nixpkgs.url = "github:nixos/nixpkgs"; | ||
inputs.flake-utils.url = "github:numtide/flake-utils"; | ||
|
||
outputs = { self, nixpkgs, flake-utils, ... }@inputs: | ||
flake-utils.lib.eachDefaultSystem ( | ||
system: | ||
let | ||
pkgs = import nixpkgs { inherit system; }; | ||
in | ||
{ | ||
devShells.default = pkgs.mkShell { | ||
nativeBuildInputs = [ pkgs.s2n-tls ]; | ||
}; | ||
} | ||
); | ||
} |
Oops, something went wrong.