Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Jul 2, 2021
2 parents 8d5e8fd + 2024311 commit 248d463
Show file tree
Hide file tree
Showing 18 changed files with 216 additions and 3 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Linux

on: [push, pull_request]

jobs:
build:
name: Linux ${{ matrix.type }}

runs-on: 'ubuntu-latest'
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true

- name: Setup
shell: bash -l {0}
run: |
source ./ci/linux/setup.sh
- name: CMake
shell: bash -l {0}
run: |
source ../ci/linux/cmake.sh
working-directory: ./build

- name: Compile
shell: bash -l {0}
run: |
source ../ci/linux/compile.sh
working-directory: ./build

- name: Test
shell: bash -l {0}
run: |
source ../ci/linux/test.sh
working-directory: ./build


42 changes: 42 additions & 0 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: OSX

on: [push, pull_request]

jobs:
build:
name: OSX

runs-on: 'macos-latest'
strategy:
fail-fast: true

steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true

- name: Setup
shell: bash -l {0}
run: |
source ./ci/osx/setup.sh
- name: CMake
shell: bash -l {0}
run: |
source ../ci/osx/cmake.sh
working-directory: ./build

- name: Compile
shell: bash -l {0}
run: |
source ../ci/osx/compile.sh
working-directory: ./build

- name: Test
shell: bash -l {0}
run: |
source ../ci/osx/test.sh
working-directory: ./build

44 changes: 44 additions & 0 deletions .github/workflows/win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Windows

on: [push, pull_request]

jobs:
build:
name: MSVC

runs-on: 'windows-latest'
strategy:
fail-fast: true

steps:
- uses: actions/checkout@v2
- uses: ilammy/msvc-dev-cmd@v1
- uses: conda-incubator/setup-miniconda@v2
with:
channels: conda-forge
auto-update-conda: true
python-version: '3.8'

- name: Setup
shell: bash -l {0}
run: |
source ./ci/win/setup.sh
- name: CMake
shell: bash -l {0}
working-directory: ./build
run: |
source ../ci/win/cmake.sh
- name: Compile
shell: bash -l {0}
working-directory: ./build
run: |
source ../ci/win/compile.sh
- name: Test
shell: bash -l {0}
working-directory: ./build
run: |
source ../ci/win/test.sh
1 change: 1 addition & 0 deletions api/QgisUntwine_win.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <iostream>
#include <algorithm>

#include "QgisUntwine.hpp"

Expand Down
10 changes: 10 additions & 0 deletions ci/linux/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

export PKG_CONFIG_PATH=$CONDA_PREFIX/lib64/pkgconfig

LDFLAGS="$LDFLAGS -Wl,-rpath-link,$CONDA_PREFIX/lib" cmake .. \
-G Ninja \
-DCMAKE_LIBRARY_PATH:FILEPATH="$CONDA_PREFIX/lib" \
-DCMAKE_INCLUDE_PATH:FILEPATH="$CONDA_PREFIX/include" \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}
4 changes: 4 additions & 0 deletions ci/linux/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

ninja
ninja install
10 changes: 10 additions & 0 deletions ci/linux/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

mkdir build

conda update -n base -c defaults conda
conda install -c conda-forge cmake ninja compilers -y


conda install --yes --quiet pdal -y

3 changes: 3 additions & 0 deletions ci/linux/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ctest -V
9 changes: 9 additions & 0 deletions ci/osx/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

cmake .. \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_LIBRARY_PATH:FILEPATH="$CONDA_PREFIX/lib" \
-DCMAKE_INCLUDE_PATH:FILEPATH="$CONDA_PREFIX/include" \
-DCMAKE_FIND_FRAMEWORK="NEVER" \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX}
4 changes: 4 additions & 0 deletions ci/osx/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

ninja
ninja install
9 changes: 9 additions & 0 deletions ci/osx/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

mkdir build

conda update -n base -c defaults conda
conda install cmake ninja compilers -y

conda install -c conda-forge pdal -y

3 changes: 3 additions & 0 deletions ci/osx/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ctest -V
14 changes: 14 additions & 0 deletions ci/win/cmake.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

pwd
where cl.exe
export CC=cl.exe
export CXX=cl.exe
cmake .. -G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \
-DWITH_TESTS=ON \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DCMAKE_LIBRARY_PATH:FILEPATH="$CONDA_PREFIX/Library/lib" \
-DCMAKE_INCLUDE_PATH:FILEPATH="$CONDA_PREFIX/Library/include" \
-DOPENSSL_ROOT_DIR="$CONDA_PREFIX/Library"
4 changes: 4 additions & 0 deletions ci/win/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

ninja -v
ninja install
8 changes: 8 additions & 0 deletions ci/win/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

mkdir build

conda update -n base -c defaults conda
conda install -c conda-forge cmake ninja compilers -y

conda install --yes --quiet pdal -y
3 changes: 3 additions & 0 deletions ci/win/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

ctest -VV --output-on-failure
4 changes: 2 additions & 2 deletions epf/FileProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void FileProcessor::run()

pdal::StreamCallbackFilter f;

const PointCount CountIncrement = 100000;
PointCount CountIncrement = 100000;
PointCount count = 0;
PointCount limit = CountIncrement;

Expand All @@ -50,7 +50,7 @@ void FileProcessor::run()
// This is some random cell that ultimately won't get used, but it contains a buffer
// into which we can write data.
Cell *cell = m_cellMgr.get(VoxelKey());
f.setCallback([this, &count, &limit, &cell](pdal::PointRef& point)
f.setCallback([this, &count, &limit, &cell, &CountIncrement](pdal::PointRef& point)
{
// Write the data into the point buffer in the cell. This is the *last*
// cell buffer that we used. We're hoping that it's the right one.
Expand Down
4 changes: 3 additions & 1 deletion untwine/MapFile.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@

#pragma once

#include <fcntl.h>

#ifdef _WIN32
#include <Windows.h>
#include <io.h>
#else
#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
#endif
Expand Down

0 comments on commit 248d463

Please sign in to comment.