Skip to content

Commit

Permalink
Use Conda for Mac PDAL releases
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Jan 8, 2024
1 parent 1584548 commit c10308e
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 35 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
image: ['daunnc/pdal-ubuntu:2.5.1']
image: ['daunnc/pdal-ubuntu:2.6.0']
runs-on: ${{ matrix.os }}
container:
image: ${{ matrix.image }}
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
os: [macos-latest]
java: [8]
distribution: [temurin]
pdal: [2.5.6]
pdal: [2.6.2]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -56,20 +56,13 @@ jobs:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}

- name: Cache Homebrew
uses: actions/cache@v2
- uses: conda-incubator/setup-miniconda@v3
with:
path: ~/Library/Caches/Homebrew
key: ${{ runner.os }}-homebrew

- name: Homebrew update & tap PDAL ${{ matrix.pdal }}
run: |
brew update && \
brew tap-new $USER/local-pdal && \
brew extract --version=${{ matrix.pdal }} pdal $USER/local-pdal
auto-activate-base: true
activate-environment: ""

- name: Install PDAL
run: brew install pdal@${{ matrix.pdal }} || true
run: conda install conda-forge::pdal=${{ matrix.pdal }}

- name: Check formatting
run: sbt scalafmtCheckAll
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.7.2
version=3.7.17
runner.dialect = scala3
align.openParenCallSite = true
align.openParenDefnSite = true
Expand Down
14 changes: 8 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ lazy val core = project
.settings(name := "pdal")
.settings(javah / target := (native / nativeCompile / sourceDirectory).value / "include")
.settings(sbtJniCoreScope := Compile)
.settings(libraryDependencies ++= Seq(
Dependencies.scalaTest % Test,
Dependencies.circe("parser") % Test
))
.settings(
libraryDependencies ++= Seq(
Dependencies.scalaTest % Test,
Dependencies.circe("parser") % Test
)
)
.dependsOn(Environment.dependOnNative(native % Runtime): _*)

lazy val native = project
Expand All @@ -84,9 +86,9 @@ lazy val native = project
.settings(nativeCompile / sourceDirectory := sourceDirectory.value)
.settings(
Compile / unmanagedPlatformDependentNativeDirectories := Seq(
"x86_64-linux" -> target.value / "native/x86_64-linux/bin/",
"x86_64-linux" -> target.value / "native/x86_64-linux/bin/",
"x86_64-darwin" -> target.value / "native/x86_64-darwin/bin/",
"arm64-darwin" -> target.value / "native/arm64-darwin/bin/"
"arm64-darwin" -> target.value / "native/arm64-darwin/bin/"
)
)
.settings(artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
Expand Down
14 changes: 5 additions & 9 deletions core/src/test/resources/quick-info-with-metadata-mac.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
{
"readers.las":
{
"bounds":
{
"readers.las": {
"bounds": {
"maxx": 638982.55,
"maxy": 853535.43,
"maxz": 586.38,
"minx": 635619.85,
"miny": 848899.7,
"minz": 406.59
},
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, Synthetic, KeyPoint, Withheld, Overlap, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"num_points": 1065,
"srs":
{
"srs": {
"compoundwkt": "PROJCS[\"NAD83(HARN) / Oregon LCC (m)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"latitude_of_origin\",41.75],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMETER[\"false_easting\",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2993\"]]",
"horizontal": "PROJCS[\"NAD83(HARN) / Oregon LCC (m)\",GEOGCS[\"NAD83(HARN)\",DATUM[\"NAD83_High_Accuracy_Reference_Network\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6152\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4152\"]],PROJECTION[\"Lambert_Conformal_Conic_2SP\"],PARAMETER[\"latitude_of_origin\",41.75],PARAMETER[\"central_meridian\",-120.5],PARAMETER[\"standard_parallel_1\",43],PARAMETER[\"standard_parallel_2\",45.5],PARAMETER[\"false_easting\",400000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"2993\"]]",
"isgeocentric": false,
Expand Down Expand Up @@ -145,8 +142,7 @@
"prettycompoundwkt": "PROJCS[\"NAD83(HARN) / Oregon LCC (m)\",\n GEOGCS[\"NAD83(HARN)\",\n DATUM[\"NAD83_High_Accuracy_Reference_Network\",\n SPHEROID[\"GRS 1980\",6378137,298.257222101,\n AUTHORITY[\"EPSG\",\"7019\"]],\n AUTHORITY[\"EPSG\",\"6152\"]],\n PRIMEM[\"Greenwich\",0,\n AUTHORITY[\"EPSG\",\"8901\"]],\n UNIT[\"degree\",0.0174532925199433,\n AUTHORITY[\"EPSG\",\"9122\"]],\n AUTHORITY[\"EPSG\",\"4152\"]],\n PROJECTION[\"Lambert_Conformal_Conic_2SP\"],\n PARAMETER[\"latitude_of_origin\",41.75],\n PARAMETER[\"central_meridian\",-120.5],\n PARAMETER[\"standard_parallel_1\",43],\n PARAMETER[\"standard_parallel_2\",45.5],\n PARAMETER[\"false_easting\",400000],\n PARAMETER[\"false_northing\",0],\n UNIT[\"metre\",1,\n AUTHORITY[\"EPSG\",\"9001\"]],\n AXIS[\"Easting\",EAST],\n AXIS[\"Northing\",NORTH],\n AUTHORITY[\"EPSG\",\"2993\"]]",
"prettywkt": "PROJCS[\"NAD83(HARN) / Oregon LCC (m)\",\n GEOGCS[\"NAD83(HARN)\",\n DATUM[\"NAD83_High_Accuracy_Reference_Network\",\n SPHEROID[\"GRS 1980\",6378137,298.257222101,\n AUTHORITY[\"EPSG\",\"7019\"]],\n AUTHORITY[\"EPSG\",\"6152\"]],\n PRIMEM[\"Greenwich\",0,\n AUTHORITY[\"EPSG\",\"8901\"]],\n UNIT[\"degree\",0.0174532925199433,\n AUTHORITY[\"EPSG\",\"9122\"]],\n AUTHORITY[\"EPSG\",\"4152\"]],\n PROJECTION[\"Lambert_Conformal_Conic_2SP\"],\n PARAMETER[\"latitude_of_origin\",41.75],\n PARAMETER[\"central_meridian\",-120.5],\n PARAMETER[\"standard_parallel_1\",43],\n PARAMETER[\"standard_parallel_2\",45.5],\n PARAMETER[\"false_easting\",400000],\n PARAMETER[\"false_northing\",0],\n UNIT[\"metre\",1,\n AUTHORITY[\"EPSG\",\"9001\"]],\n AXIS[\"Easting\",EAST],\n AXIS[\"Northing\",NORTH],\n AUTHORITY[\"EPSG\",\"2993\"]]",
"proj4": "+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",
"units":
{
"units": {
"horizontal": "metre",
"vertical": ""
},
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/quick-info-with-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"miny": 848899.7,
"minz": 406.59
},
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, Synthetic, KeyPoint, Withheld, Overlap, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"num_points": 1065,
"srs":
{
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/quick-info.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"miny": 848899.7,
"minz": 406.59
},
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"dimensions": "X, Y, Z, Intensity, ReturnNumber, NumberOfReturns, ScanDirectionFlag, EdgeOfFlightLine, Classification, Synthetic, KeyPoint, Withheld, Overlap, ScanAngleRank, UserData, PointSourceId, GpsTime, Red, Green, Blue",
"num_points": 1065
}
}
20 changes: 20 additions & 0 deletions core/src/test/resources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@
"size": 1,
"type": "unsigned"
},
{
"name": "Synthetic",
"size": 1,
"type": "unsigned"
},
{
"name": "KeyPoint",
"size": 1,
"type": "unsigned"
},
{
"name": "Withheld",
"size": 1,
"type": "unsigned"
},
{
"name": "Overlap",
"size": 1,
"type": "unsigned"
},
{
"name": "ScanAngleRank",
"size": 4,
Expand Down
3 changes: 2 additions & 1 deletion core/src/test/scala/io/pdal/PipelineSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class PipelineSpec extends TestEnvironmentSpec {
it("layout should have a valid number of dims") {
val pvi = pipeline.getPointViews()
val pv = pvi.next()
pv.layout().dimTypes().length should be(16)
pv.layout().dimTypes().length should be(20)
pv.close()
pvi.close()
}
Expand Down Expand Up @@ -188,6 +188,7 @@ class PipelineSpec extends TestEnvironmentSpec {

it("should get quickInfo") {
val p = Pipeline(json)
println(p.getQuickInfo())
parser.parse(p.getQuickInfo()) shouldBe quickInfoJson
}

Expand Down
8 changes: 6 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.{headerLicense, heade
object Version {
val jts = "1.19.0"
val scalaTest = "3.2.17"
val circe = "0.14.3"
val circe = "0.14.6"
val circeExtras = "0.14.3"
}

object Dependencies {
Expand Down Expand Up @@ -41,7 +42,10 @@ object Dependencies {
)
)

def circe(module: String) = "io.circe" %% s"circe-$module" % Version.circe
def circe(module: String) = module match {
case "generic-extras" => "io.circe" %% s"circe-$module" % Version.circeExtras
case _ => "io.circe" %% s"circe-$module" % Version.circe
}

val jtsCore = "org.locationtech.jts" % "jts-core" % Version.jts
val scalaTest = "org.scalatest" %% "scalatest" % Version.scalaTest
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.6
sbt.version=1.9.7

0 comments on commit c10308e

Please sign in to comment.