Skip to content

Commit 88d5eeb

Browse files
authored
Merge pull request #1 from armanbilge/feature/native
Bootstrap
2 parents 22a93f9 + 95fdc78 commit 88d5eeb

File tree

6 files changed

+214
-5
lines changed

6 files changed

+214
-5
lines changed

.github/workflows/ci.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
os: [ubuntu-latest]
3131
scala: [2.12.16, 2.13.8, 3.1.2]
3232
java: [temurin@8]
33-
project: [rootJS, rootJVM]
33+
project: [rootJS, rootJVM, rootNative]
3434
runs-on: ${{ matrix.os }}
3535
steps:
3636
- name: Checkout current branch (full)
@@ -77,6 +77,10 @@ jobs:
7777
if: matrix.project == 'rootJS'
7878
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/scalaJSLinkerResult
7979

80+
- name: nativeLink
81+
if: matrix.project == 'rootNative'
82+
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' Test/nativeLink
83+
8084
- name: Test
8185
run: sbt 'project ${{ matrix.project }}' '++${{ matrix.scala }}' test
8286

@@ -90,11 +94,11 @@ jobs:
9094

9195
- name: Make target directories
9296
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
93-
run: mkdir -p target .js/target site/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
97+
run: mkdir -p target .js/target core/.native/target site/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
9498

9599
- name: Compress target directories
96100
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
97-
run: tar cf targets.tar target .js/target site/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
101+
run: tar cf targets.tar target .js/target core/.native/target site/target core/.js/target core/.jvm/target .jvm/target .native/target project/target
98102

99103
- name: Upload target directories
100104
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -167,6 +171,16 @@ jobs:
167171
tar xf targets.tar
168172
rm targets.tar
169173
174+
- name: Download target directories (2.12.16, rootNative)
175+
uses: actions/download-artifact@v2
176+
with:
177+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.16-rootNative
178+
179+
- name: Inflate target directories (2.12.16, rootNative)
180+
run: |
181+
tar xf targets.tar
182+
rm targets.tar
183+
170184
- name: Download target directories (2.13.8, rootJS)
171185
uses: actions/download-artifact@v2
172186
with:
@@ -187,6 +201,16 @@ jobs:
187201
tar xf targets.tar
188202
rm targets.tar
189203
204+
- name: Download target directories (2.13.8, rootNative)
205+
uses: actions/download-artifact@v2
206+
with:
207+
name: target-${{ matrix.os }}-${{ matrix.java }}-2.13.8-rootNative
208+
209+
- name: Inflate target directories (2.13.8, rootNative)
210+
run: |
211+
tar xf targets.tar
212+
rm targets.tar
213+
190214
- name: Download target directories (3.1.2, rootJS)
191215
uses: actions/download-artifact@v2
192216
with:
@@ -207,6 +231,16 @@ jobs:
207231
tar xf targets.tar
208232
rm targets.tar
209233
234+
- name: Download target directories (3.1.2, rootNative)
235+
uses: actions/download-artifact@v2
236+
with:
237+
name: target-${{ matrix.os }}-${{ matrix.java }}-3.1.2-rootNative
238+
239+
- name: Inflate target directories (3.1.2, rootNative)
240+
run: |
241+
tar xf targets.tar
242+
rm targets.tar
243+
210244
- name: Import signing key
211245
if: env.PGP_SECRET != '' && env.PGP_PASSPHRASE == ''
212246
run: echo $PGP_SECRET | base64 -di | gpg --import

build.sbt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ ThisBuild / tlBaseVersion := "0.0" // your current series x.y
33

44
ThisBuild / organization := "org.typelevel"
55
ThisBuild / organizationName := "Typelevel"
6+
ThisBuild / startYear := Some(2022)
67
ThisBuild / licenses := Seq(License.Apache2)
78
ThisBuild / developers := List(
89
// your GitHub handle and name
@@ -21,14 +22,19 @@ ThisBuild / scalaVersion := Scala213 // the default Scala
2122

2223
lazy val root = tlCrossRootProject.aggregate(core)
2324

24-
lazy val core = crossProject(JVMPlatform, JSPlatform)
25+
lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform)
2526
.crossType(CrossType.Pure)
2627
.in(file("core"))
2728
.settings(
2829
name := "scalacheck-xml",
2930
libraryDependencies ++= Seq(
3031
"org.scala-lang.modules" %%% "scala-xml" % "2.1.0",
31-
"org.scalacheck" %%% "scalacheck" % "1.16.0",
32+
"org.scalacheck" %%% "scalacheck" % "1.16.0"
33+
)
34+
)
35+
.platformsSettings(JSPlatform, NativePlatform)(
36+
libraryDependencies ++= Seq(
37+
"io.github.cquiroz" %%% "scala-java-locales" % "1.4.0"
3238
)
3339
)
3440

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2022 Typelevel
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package org.typelevel.scalacheck.xml
18+
19+
import org.scalacheck.Prop
20+
import org.scalacheck.Properties
21+
22+
class GeneratorsCheck extends Properties("GeneratorsCheck") {
23+
24+
property("generates xml") = Prop.forAll(generators.genXml) { _ =>
25+
Prop.passed
26+
}
27+
28+
}

flake.lock

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
typelevelShell = {
2121
jdk.package = pkgs.jdk8;
2222
nodejs.enable = true;
23+
native.enable = true;
2324
};
2425
};
2526
}

project/plugins.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.4.11")
22
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % "0.4.11")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")
4+
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.4")
5+
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")

0 commit comments

Comments
 (0)