Skip to content

Commit

Permalink
publish scripts update and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Jan 19, 2024
1 parent 6f2649e commit c881f96
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
6 changes: 6 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# PDAL Java publish scripts

This is a set of not well maintained scripts that were used to publish PDAL from a Mac laptop.
Crosscompilation idea in this case is to build linux binaries in a docker conatiner, mac binaries locally, pack all the outputs into the jar.

Similar result is achieved via CI at this point.
2 changes: 1 addition & 1 deletion scripts/crosscompile-linux.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ docker run -it --rm \
-v $HOME/.ivy2:/root/.ivy2 \
-v $HOME/.sbt:/root/.sbt \
-v $HOME/.coursier/cache:/root/.cache/coursier \
daunnc/pdal-ubuntu:2.6.0 bash -c "cd ./pdal-java; ./sbt native/compile"
daunnc/pdal-ubuntu:2.6.0 bash -c "cd ./pdal-java; sbt native/compile"
8 changes: 8 additions & 0 deletions scripts/docker/2.6.0/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ RUN update-alternatives --set java `update-alternatives --list java | grep java-

RUN apt-get -y install bash gcc g++ cmake wget unzip gpg software-properties-common

# Install SBT
RUN apt-get install -y curl gnupg && \
echo 'deb https://repo.scala-sbt.org/scalasbt/debian all main' | tee /etc/apt/sources.list.d/sbt.list && \
echo 'deb https://repo.scala-sbt.org/scalasbt/debian /' | tee /etc/apt/sources.list.d/sbt_old.list && \
curl -sL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823' | apt-key add - && \
apt-get update && \
apt-get install -y sbt

RUN ln -s /opt/conda/envs/pdal/include/pdal /usr/include/pdal && \
ln -s /usr/include /usr/lib/include && \
ln -s /opt/conda/envs/pdal/lib /usr/lib/lib && \
Expand Down
2 changes: 1 addition & 1 deletion scripts/publish-local-native.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

./scripts/crosscompile-linux.sh && \
./sbt native/publishLocal
sbt native/publishLocal
2 changes: 1 addition & 1 deletion scripts/publish-local.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

PDAL_DEPEND_ON_NATIVE=false ./sbt ";+core/publishLocal;+core-scala/publishLocal"
PDAL_DEPEND_ON_NATIVE=false sbt ";+core/publishLocal;+core-scala/publishLocal"
2 changes: 1 addition & 1 deletion scripts/publish-native.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

./scripts/crosscompile-linux.sh && \
./sbt native/publishSigned
sbt native/publishSigned
2 changes: 1 addition & 1 deletion scripts/publish.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

PDAL_DEPEND_ON_NATIVE=false ./sbt ";+core;publishSigned;+core-scala/publishSigned"
PDAL_DEPEND_ON_NATIVE=false sbt ";+core;publishSigned;+core-scala/publishSigned"

0 comments on commit c881f96

Please sign in to comment.