Skip to content

Commit 21be400

Browse files
authored
Update SBT up to 1.4.6, upd GitHub Actions (#51)
1 parent 822a424 commit 21be400

File tree

9 files changed

+48
-28
lines changed

9 files changed

+48
-28
lines changed

.github/workflows/actions.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [ubuntu-latest]
12-
scala: [2.13.3, 2.12.12]
12+
scala: [2.13.4, 2.12.12]
1313

1414
container:
1515
image: daunnc/pdal-ubuntu:2.2.0
@@ -19,19 +19,19 @@ jobs:
1919
uses: actions/checkout@v2
2020

2121
- name: Cache SBT ivy cache
22-
uses: actions/cache@v1
22+
uses: actions/cache@v2
2323
with:
2424
path: ~/.ivy2/cache
2525
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
2626

2727
- name: Cache SBT coursier cache
28-
uses: actions/cache@v1
28+
uses: actions/cache@v2
2929
with:
30-
path: ~/.cache
30+
path: ~/.cache/coursier/v1
3131
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
3232

3333
- name: Cache SBT
34-
uses: actions/cache@v1
34+
uses: actions/cache@v2
3535
with:
3636
path: ~/.sbt
3737
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
@@ -50,32 +50,32 @@ jobs:
5050
strategy:
5151
matrix:
5252
os: [macos-latest]
53-
scala: [2.13.3, 2.12.12]
53+
scala: [2.13.4, 2.12.12]
5454

5555
steps:
5656
- name: Checkout
5757
uses: actions/checkout@v2
5858

5959
- name: Cache SBT ivy cache
60-
uses: actions/cache@v1
60+
uses: actions/cache@v2
6161
with:
6262
path: ~/.ivy2/cache
6363
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/build.sbt') }}
6464

6565
- name: Cache SBT coursier cache
66-
uses: actions/cache@v1
66+
uses: actions/cache@v2
6767
with:
68-
path: ~/.coursier
68+
path: ~/Library/Caches/Coursier/v1
6969
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/build.sbt') }}
7070

7171
- name: Cache SBT
72-
uses: actions/cache@v1
72+
uses: actions/cache@v2
7373
with:
7474
path: ~/.sbt
7575
key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
7676

7777
- name: Cache Homebrew
78-
uses: actions/cache@v1
78+
uses: actions/cache@v2
7979
with:
8080
path: ~/Library/Caches/Homebrew
8181
key: ${{ runner.os }}-homebrew

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,20 @@ README.html
3434
*.sublime-workspace
3535

3636
# VSCode files
37+
3738
.vscode
3839
.history
3940

4041
# Metals
42+
4143
.metals
4244
.bloop
4345
metals.sbt
4446

47+
# SBT
48+
49+
.bsp
50+
4551
# Test data files #
4652

4753
java/data

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name := "pdal-jni"
22

33
lazy val commonSettings = Seq(
44
version := "2.2.1" + Environment.versionSuffix,
5-
scalaVersion := "2.13.3",
6-
crossScalaVersions := Seq("2.13.3", "2.12.12", "2.11.12"),
5+
scalaVersion := "2.13.4",
6+
crossScalaVersions := Seq("2.13.4", "2.12.12", "2.11.12"),
77
organization := "io.pdal",
88
description := "PDAL JNI bindings",
99
licenses := Seq("BSD" -> url("https://github.com/PDAL/PDAL/blob/master/LICENSE.txt")),

core/src/test/scala/io/pdal/PipelineSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class PipelineSpec extends TestEnvironmentSpec {
169169
it("should read crs correct") {
170170
val pvi = pipeline.getPointViews()
171171
val pv = pvi.next()
172-
pv.getCrsProj4 should (be (proj4String) or be(proj4StringNew))
172+
pv.getCrsProj4 should (be (proj4String) or be(proj4StringMac))
173173
pv.close()
174174
pvi.close()
175175
}

core/src/test/scala/io/pdal/TestEnvironmentSpec.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ trait TestEnvironmentSpec extends AnyFunSpec with Matchers with BeforeAndAfterAl
6161
|}
6262
""".stripMargin
6363

64-
val proj4String = "+proj=lcc +lat_1=43 +lat_2=45.5 +lat_0=41.75 +lon_0=-120.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
65-
val proj4StringNew = "+proj=lcc +lat_0=41.75 +lon_0=-120.5 +lat_1=43 +lat_2=45.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
64+
val proj4String = "+proj=lcc +lat_0=41.75 +lon_0=-120.5 +lat_1=43 +lat_2=45.5 +x_0=400000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
65+
val proj4StringMac = "+proj=lcc +lat_0=41.75 +lon_0=-120.5 +lat_1=43 +lat_2=45.5 +x_0=400000 +y_0=0 +ellps=GRS80 +units=m +no_defs"
6666

6767
val pipeline: Pipeline = Pipeline(json)
6868
val pipelineDelaunay: Pipeline = Pipeline(jsonDelaunay)

examples/pdal-jni/sbt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535
set -o pipefail
3636

37-
declare -r sbt_release_version="1.3.13"
38-
declare -r sbt_unreleased_version="1.4.0-RC1"
37+
declare -r sbt_release_version="1.4.6"
38+
declare -r sbt_unreleased_version="1.4.6"
3939

40-
declare -r latest_213="2.13.3"
40+
declare -r latest_213="2.13.4"
4141
declare -r latest_212="2.12.12"
4242
declare -r latest_211="2.11.12"
4343
declare -r latest_210="2.10.7"
@@ -247,11 +247,18 @@ java_version() {
247247
echo "$version"
248248
}
249249

250+
is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]; }
251+
250252
# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+
251253
default_jvm_opts() {
252254
local -r v="$(java_version)"
253255
if [[ $v -ge 10 ]]; then
254-
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
256+
if is_apple_silicon; then
257+
# As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI
258+
echo "$default_jvm_opts_common"
259+
else
260+
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
261+
fi
255262
elif [[ $v -ge 8 ]]; then
256263
echo "$default_jvm_opts_common"
257264
else
@@ -471,7 +478,7 @@ process_args() {
471478
-trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;;
472479
-debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;;
473480

474-
-no-colors) addJava "-Dsbt.log.noformat=true" && shift ;;
481+
-no-colors) addJava "-Dsbt.log.noformat=true" && addJava "-Dsbt.color=false" && shift ;;
475482
-sbt-create) sbt_create=true && shift ;;
476483
-sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;;
477484
-sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;;

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ object Dependencies {
4545
)
4646

4747
val jtsCore = "org.locationtech.jts" % "jts-core" % "1.16.1"
48-
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.2"
48+
val scalaTest = "org.scalatest" %% "scalatest" % "3.2.3"
4949
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.3.13
1+
sbt.version=1.4.6

sbt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434

3535
set -o pipefail
3636

37-
declare -r sbt_release_version="1.3.13"
38-
declare -r sbt_unreleased_version="1.4.0-RC1"
37+
declare -r sbt_release_version="1.4.6"
38+
declare -r sbt_unreleased_version="1.4.6"
3939

40-
declare -r latest_213="2.13.3"
40+
declare -r latest_213="2.13.4"
4141
declare -r latest_212="2.12.12"
4242
declare -r latest_211="2.11.12"
4343
declare -r latest_210="2.10.7"
@@ -247,11 +247,18 @@ java_version() {
247247
echo "$version"
248248
}
249249

250+
is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]; }
251+
250252
# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+
251253
default_jvm_opts() {
252254
local -r v="$(java_version)"
253255
if [[ $v -ge 10 ]]; then
254-
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
256+
if is_apple_silicon; then
257+
# As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI
258+
echo "$default_jvm_opts_common"
259+
else
260+
echo "$default_jvm_opts_common -XX:+UnlockExperimentalVMOptions -XX:+UseJVMCICompiler"
261+
fi
255262
elif [[ $v -ge 8 ]]; then
256263
echo "$default_jvm_opts_common"
257264
else
@@ -471,7 +478,7 @@ process_args() {
471478
-trace) require_arg integer "$1" "$2" && trace_level="$2" && shift 2 ;;
472479
-debug-inc) addJava "-Dxsbt.inc.debug=true" && shift ;;
473480

474-
-no-colors) addJava "-Dsbt.log.noformat=true" && shift ;;
481+
-no-colors) addJava "-Dsbt.log.noformat=true" && addJava "-Dsbt.color=false" && shift ;;
475482
-sbt-create) sbt_create=true && shift ;;
476483
-sbt-dir) require_arg path "$1" "$2" && sbt_dir="$2" && shift 2 ;;
477484
-sbt-boot) require_arg path "$1" "$2" && addJava "-Dsbt.boot.directory=$2" && shift 2 ;;

0 commit comments

Comments
 (0)