Skip to content

Commit 68d6cf2

Browse files
authored
PDAL 2.4.3 (#62)
* Bump PDAL version up to 2.4.3
1 parent c80ac16 commit 68d6cf2

File tree

9 files changed

+78
-48
lines changed

9 files changed

+78
-48
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,43 @@ on:
1111

1212
jobs:
1313
linux:
14-
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest]
17+
image: ['daunnc/pdal-ubuntu:2.4.3']
18+
runs-on: ${{ matrix.os }}
1519
container:
16-
image: daunnc/pdal-ubuntu:2.3.0
20+
image: ${{ matrix.image }}
1721

1822
steps:
19-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v3
2024
with:
2125
fetch-depth: 0
2226
- uses: coursier/cache-action@v6
23-
- uses: olafurpg/setup-scala@v13
24-
with:
25-
java-version: [email protected]
2627

2728
- name: Check formatting
28-
run: sbt scalafmtCheckAll
29+
run: ./sbt scalafmtCheckAll
2930

3031
- name: Build project
31-
run: sbt +test
32+
run: ./sbt +test
3233

3334
macos:
34-
runs-on: macos-latest
35+
strategy:
36+
matrix:
37+
os: [macos-latest]
38+
java: [8]
39+
distribution: [temurin]
40+
runs-on: ${{ matrix.os }}
3541

3642
steps:
37-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v3
3844
with:
3945
fetch-depth: 0
4046
- uses: coursier/cache-action@v6
41-
- uses: olafurpg/setup-scala@v13
47+
- uses: actions/setup-java@v3
4248
with:
43-
java-version: [email protected]
49+
distribution: ${{ matrix.distribution }}
50+
java-version: ${{ matrix.java }}
4451

4552
- name: Cache Homebrew
4653
uses: actions/cache@v2
@@ -59,37 +66,38 @@ jobs:
5966
- name: Build project
6067
run: sbt +test
6168

62-
- uses: actions/upload-artifact@v2
69+
- uses: actions/upload-artifact@v3
6370
with:
6471
name: macos
6572
path: native/target/native/x86_64-darwin/bin
6673

6774
publish:
68-
runs-on: ubuntu-latest
75+
strategy:
76+
matrix:
77+
os: [ubuntu-latest]
78+
image: ['daunnc/pdal-ubuntu:2.4.3']
79+
runs-on: ${{ matrix.os }}
6980
needs: [linux, macos]
7081
container:
71-
image: daunnc/pdal-ubuntu:2.3.0
82+
image: ${{ matrix.image }}
7283
if: github.event_name != 'pull_request'
7384
env:
7485
PDAL_DEPEND_ON_NATIVE: "false"
7586
CI_CLEAN: ""
7687

7788
steps:
78-
- uses: actions/checkout@v2
89+
- uses: actions/checkout@v3
7990
with:
8091
fetch-depth: 0
8192
- uses: coursier/cache-action@v6
82-
- uses: olafurpg/setup-scala@v13
83-
with:
84-
java-version: [email protected]
8593

86-
- uses: actions/download-artifact@v2
94+
- uses: actions/download-artifact@v3
8795
with:
8896
name: macos
8997
path: native/target/native/x86_64-darwin/bin
9098

9199
- name: Release
92-
run: sbt ci-release
100+
run: ./sbt ci-release
93101
env:
94102
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
95103
PGP_SECRET: ${{ secrets.PGP_SECRET }}

build.sbt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name := "pdal-jni"
22

3-
val scalaVersions = Seq("3.0.1", "2.13.6", "2.12.14")
3+
val scala212 = "2.12.17"
4+
val scala213 = "2.13.10"
5+
val scala3 = "3.2.1"
6+
val scalaVersions = Seq(scala3, scala213, scala212)
47

58
lazy val commonSettings = Seq(
69
scalaVersion := scalaVersions.head,
@@ -47,7 +50,7 @@ lazy val `core-scala` = project
4750
.settings(commonSettings: _*)
4851
.settings(Dependencies.macroSettings)
4952
.settings(Dependencies.licenseSettings)
50-
.settings(scalaVersion := "2.13.6", crossScalaVersions := Seq("2.13.6", "2.12.14"))
53+
.settings(scalaVersion := scala213, crossScalaVersions := Seq(scala213, scala212))
5154
.settings(name := "pdal-scala")
5255
.settings(javah / target := (native / nativeCompile / sourceDirectory).value / "include")
5356
.settings(
@@ -78,8 +81,9 @@ lazy val native = project
7881
.settings(nativeCompile / sourceDirectory := sourceDirectory.value)
7982
.settings(
8083
Compile / unmanagedPlatformDependentNativeDirectories := Seq(
81-
"x86_64-linux" -> target.value / "native/x86_64-linux/bin/",
82-
"x86_64-darwin" -> target.value / "native/x86_64-darwin/bin/"
84+
"x86_64-linux" -> target.value / "native/x86_64-linux/bin/",
85+
"x86_64-darwin" -> target.value / "native/x86_64-darwin/bin/",
86+
"arm64-darwin" -> target.value / "native/arm64-darwin/bin/"
8387
)
8488
)
8589
.settings(artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>

core/src/main/scala/io/pdal/Pipeline.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ class Pipeline(val json: String) extends Native {
4141
@native def getLog(): String
4242
}
4343

44-
object Pipeline extends NativeLoader("pdaljni.2.3") {
44+
object Pipeline extends NativeLoader("pdaljni.2.4") {
4545
def apply(json: String): Pipeline = { val p = new Pipeline(json); p.initialize(); p }
4646
}

native/src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(MAKE_COLOR_MAKEFILE ON)
99

1010
project (pdaljni)
1111
set(PROJECT_VERSION_MAJOR 2)
12-
set(PROJECT_VERSION_MINOR 3)
12+
set(PROJECT_VERSION_MINOR 4)
1313
set(PROJECT_VERSION_PATCH 0)
1414

1515
set(PDAL_LIB_NAME pdalcpp)
@@ -22,7 +22,7 @@ if (APPLE)
2222
endif ()
2323

2424
if (NOT PDAL_BUILD)
25-
set(CMAKE_CXX_FLAGS "-std=c++11")
25+
set(CMAKE_CXX_FLAGS "-std=c++14")
2626
endif()
2727

2828
# Setup JNI

project/Dependencies.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import de.heikoseeberger.sbtheader.{CommentCreator, CommentStyle, FileType}
55
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.{headerLicense, headerMappings, HeaderLicense}
66

77
object Version {
8-
val jts = "1.16.1"
9-
val scalaTest = "3.2.9"
10-
val circe = "0.14.1"
8+
val jts = "1.19.0"
9+
val scalaTest = "3.2.14"
10+
val circe = "0.14.3"
1111
}
1212

1313
object Dependencies {

project/build.properties

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

sbt

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434

3535
set -o pipefail
3636

37-
declare -r sbt_release_version="1.5.5"
38-
declare -r sbt_unreleased_version="1.5.5"
37+
declare -r sbt_release_version="1.8.0"
38+
declare -r sbt_unreleased_version="1.8.0"
3939

40-
declare -r latest_213="2.13.6"
41-
declare -r latest_212="2.12.14"
40+
declare -r latest_213="2.13.10"
41+
declare -r latest_212="2.12.17"
4242
declare -r latest_211="2.11.12"
4343
declare -r latest_210="2.10.7"
4444
declare -r latest_29="2.9.3"
@@ -216,7 +216,8 @@ getJavaVersion() {
216216
# but on 9 and 10 it's 9.x.y and 10.x.y.
217217
if [[ "$str" =~ ^1\.([0-9]+)(\..*)?$ ]]; then
218218
echo "${BASH_REMATCH[1]}"
219-
elif [[ "$str" =~ ^([0-9]+)(\..*)?$ ]]; then
219+
# Fixes https://github.com/dwijnand/sbt-extras/issues/326
220+
elif [[ "$str" =~ ^([0-9]+)(\..*)?(-ea)?$ ]]; then
220221
echo "${BASH_REMATCH[1]}"
221222
elif [[ -n "$str" ]]; then
222223
echoerr "Can't parse java version from: $str"
@@ -252,7 +253,9 @@ is_apple_silicon() { [[ "$(uname -s)" == "Darwin" && "$(uname -m)" == "arm64" ]]
252253
# MaxPermSize critical on pre-8 JVMs but incurs noisy warning on 8+
253254
default_jvm_opts() {
254255
local -r v="$(java_version)"
255-
if [[ $v -ge 10 ]]; then
256+
if [[ $v -ge 17 ]]; then
257+
echo "$default_jvm_opts_common"
258+
elif [[ $v -ge 10 ]]; then
256259
if is_apple_silicon; then
257260
# As of Dec 2020, JVM for Apple Silicon (M1) doesn't support JVMCI
258261
echo "$default_jvm_opts_common"
@@ -385,12 +388,10 @@ usage() {
385388
set_sbt_version
386389
cat <<EOM
387390
Usage: $script_name [options]
388-
389391
Note that options which are passed along to sbt begin with -- whereas
390392
options to this runner use a single dash. Any sbt command can be scheduled
391393
to run first by prefixing the command with --, so --warn, --error and so on
392394
are not special.
393-
394395
-h | -help print this message
395396
-v verbose operation (this runner is chattier)
396397
-d, -w, -q aliases for --debug, --warn, --error (q means quiet)
@@ -408,15 +409,13 @@ are not special.
408409
-batch Disable interactive mode
409410
-prompt <expr> Set the sbt prompt; in expr, 's' is the State and 'e' is Extracted
410411
-script <file> Run the specified file as a scala script
411-
412412
# sbt version (default: sbt.version from $buildProps if present, otherwise $sbt_release_version)
413413
-sbt-version <version> use the specified version of sbt (default: $sbt_release_version)
414414
-sbt-force-latest force the use of the latest release of sbt: $sbt_release_version
415415
-sbt-dev use the latest pre-release version of sbt: $sbt_unreleased_version
416416
-sbt-jar <path> use the specified jar as the sbt launcher
417417
-sbt-launch-dir <path> directory to hold sbt launchers (default: $sbt_launch_dir)
418418
-sbt-launch-repo <url> repo url for downloading sbt launcher jar (default: $(url_base "$sbt_version"))
419-
420419
# scala version (default: as chosen by sbt)
421420
-28 use $latest_28
422421
-29 use $latest_29
@@ -427,10 +426,8 @@ are not special.
427426
-scala-home <path> use the scala build at the specified directory
428427
-scala-version <version> use the specified version of scala
429428
-binary-version <version> use the specified scala version when searching for dependencies
430-
431429
# java version (default: java from PATH, currently $(java -version 2>&1 | grep version))
432430
-java-home <path> alternate JAVA_HOME
433-
434431
# passing options to the jvm - note it does NOT use JAVA_OPTS due to pollution
435432
# The default set is used if JVM_OPTS is unset and no -jvm-opts file is found
436433
<default> $(default_jvm_opts)
@@ -440,14 +437,12 @@ are not special.
440437
-jvm-opts <path> file containing jvm args (if not given, .jvmopts in project root is used if present)
441438
-Dkey=val pass -Dkey=val directly to the jvm
442439
-J-X pass option -X directly to the jvm (-J is stripped)
443-
444440
# passing options to sbt, OR to this runner
445441
SBT_OPTS environment variable holding either the sbt args directly, or
446442
the reference to a file containing sbt args if given path is prepended by '@' (e.g. '@/etc/sbtopts')
447443
Note: "@"-file is overridden by local '.sbtopts' or '-sbt-opts' argument.
448444
-sbt-opts <path> file containing sbt args (if not given, .sbtopts in project root is used if present)
449445
-S-X add -X to sbt's scalacOptions (-S is stripped)
450-
451446
# passing options exclusively to this runner
452447
SBTX_OPTS environment variable holding either the sbt-extras args directly, or
453448
the reference to a file containing sbt-extras args if given path is prepended by '@' (e.g. '@/etc/sbtxopts')
@@ -600,7 +595,6 @@ fi
600595
$(pwd) doesn't appear to be an sbt project.
601596
If you want to start sbt anyway, run:
602597
$0 -sbt-create
603-
604598
EOM
605599
exit 1
606600
}

scripts/crosscompile-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ docker run -it --rm \
66
-v $HOME/.ivy2:/root/.ivy2 \
77
-v $HOME/.sbt:/root/.sbt \
88
-v $HOME/.coursier/cache:/root/.cache/coursier \
9-
daunnc/pdal-ubuntu:2.3.0 bash -c "cd ./pdal-java; ./sbt native/compile"
9+
daunnc/pdal-ubuntu:2.4.3 bash -c "cd ./pdal-java; ./sbt native/compile"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM pdal/pdal:2.4.3
2+
LABEL Grigory Pomadchin <[email protected]>
3+
4+
ENV DEBIAN_FRONTEND noninteractive
5+
6+
RUN set -ex && \
7+
apt update -y && \
8+
apt install --no-install-recommends -y openjdk-8-jdk
9+
10+
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-amd6
11+
RUN update-alternatives --set java `update-alternatives --list java | grep java-8`
12+
13+
RUN apt-get -y install bash gcc g++ cmake wget unzip gpg software-properties-common
14+
15+
RUN ln -s /opt/conda/envs/pdal/include/pdal /usr/include/pdal && \
16+
ln -s /usr/include /usr/lib/include && \
17+
ln -s /opt/conda/envs/pdal/lib /usr/lib/lib && \
18+
ln -s /opt/conda/envs/pdal/share/* /usr/share/* || true && \
19+
ln -s /opt/conda/envs/pdal/lib/* /usr/lib/* || true
20+
21+
# upd g++
22+
RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test
23+
# strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
24+
RUN apt update -y && apt install -y g++-11

0 commit comments

Comments
 (0)