diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6367c0..6c20652 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,37 +10,10 @@ on: # types: [published] jobs: - linux: + build: strategy: matrix: - os: [ubuntu-latest] - image: ['daunnc/pdal-ubuntu:2.6.0'] - runs-on: ${{ matrix.os }} - container: - image: ${{ matrix.image }} - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - # https://github.com/actions/runner/issues/2033 - - name: Set ownership - run: | - # this is to fix GIT not liking owner of the checkout dir - chown -R $(id -u):$(id -g) $PWD - - - uses: coursier/cache-action@v6 - - - name: Check formatting - run: ./sbt scalafmtCheckAll - - - name: Build project - run: ./sbt +test - - macos: - strategy: - matrix: - os: [macos-latest] + os: [ubuntu-latest, macos-latest] java: [8] distribution: [temurin] pdal: [2.6.2] @@ -61,29 +34,20 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: - # auto-update-conda: true - # auto-activate-base: true activate-environment: "pdal-java" channels: conda-forge - name: Install PDAL run: conda install pdal=${{ matrix.pdal }} - # - name: Check formatting - # run: sbt scalafmtCheckAll + - name: Check formatting + run: sbt scalafmtCheckAll - name: Build project - run: | - # export PDAL_DIR=$CONDAenvs/pdal-java/ - echo "CONA: $CONDA" - ls $CONDA - echo "========" - ls ${CONDA}/envs - echo "=======" - which pdal - sbt +test + run: sbt +test - uses: actions/upload-artifact@v3 + if: ${{ startsWith(matrix.os, 'macos') }} with: name: macos path: native/target/native/x86_64-darwin/bin @@ -92,11 +56,14 @@ jobs: strategy: matrix: os: [ubuntu-latest] - image: ['daunnc/pdal-ubuntu:2.5.1'] + java: [8] + distribution: [temurin] + pdal: [2.6.2] runs-on: ${{ matrix.os }} - needs: [linux, macos] - container: - image: ${{ matrix.image }} + defaults: + run: + shell: bash -el {0} + needs: [build] if: github.event_name != 'pull_request' env: PDAL_DEPEND_ON_NATIVE: "false" @@ -106,13 +73,19 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - # https://github.com/actions/runner/issues/2033 - - name: Set ownership - run: | - # this is to fix GIT not liking owner of the checkout dir - chown -R $(id -u):$(id -g) $PWD - - uses: coursier/cache-action@v6 + - uses: actions/setup-java@v3 + with: + distribution: ${{ matrix.distribution }} + java-version: ${{ matrix.java }} + + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: "pdal-java" + channels: conda-forge + + - name: Install PDAL + run: conda install pdal=${{ matrix.pdal }} - uses: actions/download-artifact@v3 with: @@ -120,7 +93,7 @@ jobs: path: native/target/native/x86_64-darwin/bin - name: Release - run: ./sbt ci-release + run: sbt ci-release env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }} diff --git a/native/src/CMakeLists.txt b/native/src/CMakeLists.txt index c868237..89ad247 100644 --- a/native/src/CMakeLists.txt +++ b/native/src/CMakeLists.txt @@ -32,10 +32,6 @@ if (JNI_FOUND) endif() if (NOT PDAL_BUILD) - if(DEFINED ENV{PDAL_DIR}) - set(PDAL_DIR "$ENV{PDAL_DIR}") - endif() - find_package(PDAL 2.0.0 REQUIRED CONFIG) endif()