Skip to content

Commit

Permalink
Merge branch 'master' into benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
mvieth authored Jun 25, 2021
2 parents f2740ce + 853afb7 commit 6ed4d35
Show file tree
Hide file tree
Showing 495 changed files with 4,859 additions and 4,285 deletions.
52 changes: 29 additions & 23 deletions .ci/azure-pipelines/azure-pipelines.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
trigger:
paths:
exclude:
- doc
- README.md
- CHANGES.md
- CONTRIBUTING.md

pr:
paths:
exclude:
- doc
- README.md
- CHANGES.md
- CONTRIBUTING.md

resources:
containers:
- container: winx86
image: pointcloudlibrary/env:winx86
- container: winx64
image: pointcloudlibrary/env:winx64
- container: fmt
image: pointcloudlibrary/fmt
- container: env1804
Expand All @@ -8,8 +28,6 @@ resources:
image: pointcloudlibrary/env:20.04
- container: env2010
image: pointcloudlibrary/env:20.10
- container: doc
image: pointcloudlibrary/doc

stages:
- stage: formatting
Expand Down Expand Up @@ -38,8 +56,6 @@ stages:
CC: gcc
CXX: g++
BUILD_GPU: OFF
# surface is not ready for re-entrant QHull
CMAKE_ARGS: '-DBUILD_tests_surface=OFF'
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
variables:
Expand Down Expand Up @@ -126,37 +142,27 @@ stages:
displayName: Build MSVC
dependsOn: formatting
jobs:
- job: vs2017
displayName: Windows VS2017 Build
- job: Windows
displayName: Windows Build
pool:
vmImage: 'vs2017-win2016'
vmImage: 'windows-2019'
strategy:
matrix:
x86:
CONTAINER: winx86
PLATFORM: 'x86'
ARCHITECTURE: 'x86'
GENERATOR: 'Visual Studio 15 2017'
GENERATOR: '"Visual Studio 16 2019" -A Win32'
x64:
CONTAINER: winx64
PLATFORM: 'x64'
ARCHITECTURE: 'x86_amd64'
GENERATOR: 'Visual Studio 15 2017 Win64'
GENERATOR: '"Visual Studio 16 2019" -A x64'
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
variables:
BUILD_DIR: 'c:\build'
CONFIGURATION: 'Release'
VCPKG_ROOT: 'C:\vcpkg'
VCPKG_ROOT: 'c:\vcpkg'
steps:
- template: build/windows.yaml

- stage: documentation
displayName: Documentation
dependsOn: []
jobs:
- template: documentation.yaml

- stage: tutorials
displayName: Tutorials
dependsOn: build_gcc
jobs:
- template: tutorials.yaml

22 changes: 6 additions & 16 deletions .ci/azure-pipelines/build/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,26 @@ steps:
- checkout: self
# find the commit hash on a quick non-forced update too
fetchDepth: 10
- pwsh: Get-PSDrive
displayName: "Check free space"
- script: |
vcpkg.exe install eigen3 flann gtest qhull benchmark ^
boost-date-time boost-filesystem boost-iostreams ^
boost-property-tree boost-graph boost-interprocess ^
boost-signals2 boost-sort boost-multi-array boost-asio ^
boost-ptr-container ^
--triplet %PLATFORM%-windows && vcpkg.exe list
displayName: 'Install C++ Dependencies Via Vcpkg'
- script: |
mkdir %BUILD_DIR% && cd %BUILD_DIR%
mkdir %BUILD_DIR% && cd %BUILD_DIR% && dir
cmake $(Build.SourcesDirectory) ^
-G"%GENERATOR%" ^
-G%GENERATOR% ^
-DVCPKG_TARGET_TRIPLET=%PLATFORM%-windows-rel ^
-DCMAKE_BUILD_TYPE="MinSizeRel" ^
-DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake ^
-DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake" ^
-DVCPKG_APPLOCAL_DEPS=ON ^
-DPCL_BUILD_WITH_BOOST_DYNAMIC_LINKING_WIN32=ON ^
-DPCL_BUILD_WITH_FLANN_DYNAMIC_LINKING_WIN32=ON ^
-DPCL_BUILD_WITH_QHULL_DYNAMIC_LINKING_WIN32=ON ^
-DBUILD_global_tests=ON ^
-DBUILD_benchmarks=ON ^
-DBUILD_tools=OFF ^
-DBUILD_surface_on_nurbs=ON
-DBUILD_surface_on_nurbs=ON ^
-DPCL_DISABLE_VISUALIZATION_TESTS=ON
displayName: 'CMake Configuration'
workingDirectory: 'c:'
- script: |
cd %BUILD_DIR% && cmake --build . --config %CONFIGURATION%
displayName: 'Build Library'
workingDirectory: 'c:'
- script: |
cd %BUILD_DIR% && cmake --build . --target tests --config %CONFIGURATION%
displayName: 'Run Unit Tests'
Expand Down
46 changes: 46 additions & 0 deletions .ci/azure-pipelines/docs-pipeline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
trigger:
paths:
include:
- doc

pr:
paths:
include:
- doc

resources:
pipelines:
- pipeline: Build-CI
source: Build
trigger:
stages:
- build_gcc
containers:
- container: fmt # for formatting.yaml
image: pointcloudlibrary/fmt
- container: doc # for documentation.yaml
image: pointcloudlibrary/doc
- container: env1804 # for tutorials.yaml
image: pointcloudlibrary/env:18.04

stages:
- stage: formatting
displayName: Formatting
# if docs pipeline triggered by build_gcc stage,
# the formatting stage has already run, thus it
# won't run for a second time here.
condition: ne(variables['Build.Reason'], 'ResourceTrigger')
jobs:
- template: formatting.yaml

- stage: documentation
displayName: Documentation
condition: in(dependencies.formatting.result, 'Succeeded', 'SucceededWithIssues', 'Skipped')
jobs:
- template: documentation.yaml

- stage: tutorials
displayName: Tutorials
condition: in(dependencies.documentation.result, 'Succeeded', 'SucceededWithIssues')
jobs:
- template: tutorials.yaml
71 changes: 62 additions & 9 deletions .ci/azure-pipelines/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ trigger:
paths:
include:
- .dev/docker/env/Dockerfile
- .dev/docker/windows
- .ci/azure-pipelines/env.yml

pr:
paths:
include:
- .dev/docker/env/Dockerfile
- .dev/docker/windows
- .ci/azure-pipelines/env.yml

schedules:
Expand All @@ -32,7 +34,7 @@ variables:
dockerHubID: "pointcloudlibrary"

jobs:
- job: BuildAndPush
- job: BuildAndPushUbuntu
timeoutInMinutes: 360
displayName: "Env"
pool:
Expand All @@ -44,27 +46,27 @@ jobs:
UBUNTU_DISTRO: 18.04
USE_CUDA: true
VTK_VERSION: 6
tag: 18.04
TAG: 18.04
Ubuntu 20.04:
CUDA_VERSION: 11.2.1
UBUNTU_DISTRO: 20.04
VTK_VERSION: 7
USE_CUDA: true
tag: 20.04
TAG: 20.04
Ubuntu 20.10:
CUDA_VERSION: 11.2.1
UBUNTU_DISTRO: 20.10
VTK_VERSION: 7
# nvidia-cuda docker image has not been released for 20.10 yet
USE_CUDA: ""
tag: 20.10
TAG: 20.10
Ubuntu 21.04:
CUDA_VERSION: 11.2.1
UBUNTU_DISTRO: 21.04
VTK_VERSION: 9
# nvidia-cuda docker image has not been released for 21.04 yet
USE_CUDA: ""
tag: 21.04
TAG: 21.04
steps:
- task: Docker@2
displayName: "Build docker image"
Expand All @@ -76,12 +78,12 @@ jobs:
--build-arg UBUNTU_DISTRO=$(UBUNTU_DISTRO)
--build-arg USE_CUDA=$(USE_CUDA)
--build-arg VTK_VERSION=$(VTK_VERSION)
-t $(dockerHubID)/env:$(tag)
-t $(dockerHubID)/env:$(TAG)
dockerfile: '$(Build.SourcesDirectory)/.dev/docker/env/Dockerfile'
tags: "$(tag)"
tags: "$(TAG)"
- script: |
set -x
docker run --rm -v "$(Build.SourcesDirectory)":/pcl $(dockerHubID)/env:$(tag) bash -c ' \
docker run --rm -v "$(Build.SourcesDirectory)":/pcl $(dockerHubID)/env:$(TAG) bash -c ' \
mkdir /pcl/build && cd /pcl/build && \
cmake /pcl \
-DCMAKE_BUILD_TYPE="Release" \
Expand All @@ -96,6 +98,57 @@ jobs:
command: push
containerRegistry: $(dockerHub)
repository: $(dockerHubID)/env
tags: "$(tag)"
tags: "$(TAG)"
condition: and(eq(variables['Build.Repository.Name'], 'PointCloudLibrary/pcl'),
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
- job: BuildAndPushWindows
timeoutInMinutes: 360
displayName: "Env"
pool:
vmImage: 'windows-2019'
strategy:
matrix:
Winx86:
PLATFORM: x86
TAG: winx86
GENERATOR: "'Visual Studio 16 2019' -A Win32"
VCPKGCOMMIT: 2bc10eae2fb0b8c7c098325c4e9d82aa5d0329d9
Winx64:
PLATFORM: x64
TAG: winx64
GENERATOR: "'Visual Studio 16 2019' -A x64"
VCPKGCOMMIT: master
steps:
- task: Docker@2
displayName: "Build docker image"
inputs:
command: build
arguments: |
--no-cache
--build-arg PLATFORM=$(PLATFORM)
--build-arg VCPKGCOMMIT=$(VCPKGCOMMIT)
-t $(dockerHubID)/env:$(TAG)
dockerfile: '$(Build.SourcesDirectory)/.dev/docker/windows/Dockerfile'
tags: "$(TAG)"

- script: >
docker run --rm -v "$(Build.SourcesDirectory)":c:\pcl $(dockerHubID)/env:$(TAG)
powershell -command "mkdir c:\pcl\build; cd c:\pcl\build;
cmake c:\pcl -G$(GENERATOR)
-DVCPKG_TARGET_TRIPLET=$(PLATFORM)-windows-rel
-DCMAKE_BUILD_TYPE='Release'
-DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake
-DPCL_ONLY_CORE_POINT_TYPES=ON
-DBUILD_io:BOOL=OFF
-DBUILD_kdtree:BOOL=OFF;
cmake --build . "
displayName: 'Verify Dockerimage'
- task: Docker@2
displayName: "Push docker image"
inputs:
command: push
containerRegistry: $(dockerHub)
repository: $(dockerHubID)/env
tags: "$(TAG)"
condition: and(eq(variables['Build.Repository.Name'], 'PointCloudLibrary/pcl'),
eq(variables['Build.SourceBranch'], 'refs/heads/master'))
2 changes: 1 addition & 1 deletion .ci/scripts/build_tutorials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ for DIRECTORY in "$SOURCE_DIR"/*/ ; do
TUTORIAL_BUILD_DIR="$BUILD_DIR/$NAME"
mkdir -p "$TUTORIAL_BUILD_DIR" && cd "$TUTORIAL_BUILD_DIR" || exit
echo "Configuring tutorial: $NAME"
if ! cmake "$TUTORIAL_SOURCE_DIR" -DPCL_DIR="$INSTALL_DIR" -DCMAKE_CXX_FLAGS="-Werror"; then
if ! cmake "$TUTORIAL_SOURCE_DIR" -DPCL_DIR="$INSTALL_DIR" -DCMAKE_CXX_FLAGS="-Wall -Wextra -Wpedantic -Werror"; then
STATUS="cmake error"
else
echo "Building tutorial: $NAME"
Expand Down
47 changes: 47 additions & 0 deletions .dev/docker/windows/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# escape=`

FROM mcr.microsoft.com/windows/servercore:ltsc2019

# Use "--build-arg platform=x64" for 64 bit or x86 for 32 bit.
ARG PLATFORM

# Use to set specific commit to checkout
ARG VCPKGCOMMIT

# Download channel for fixed install.
ARG CHANNEL_BASE_URL=https://aka.ms/vs/16/release

ADD $CHANNEL_BASE_URL/channel C:\TEMP\VisualStudio.chman

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Download and install Build Tools for Visual Studio 2019 for native desktop
RUN wget $Env:CHANNEL_BASE_URL/vs_buildtools.exe -OutFile 'C:\TEMP\vs_buildtools.exe'; `
Start-Process -FilePath C:\TEMP\vs_buildtools.exe -ArgumentList `
"--quiet", `
"--norestart", `
"--nocache", `
"--installPath", `
"C:\BuildTools", `
"--wait", `
"--channelUri", `
"C:\TEMP\VisualStudio.chman", `
"--installChannelUri", `
"C:\TEMP\VisualStudio.chman", `
"--add", `
"Microsoft.VisualStudio.Workload.VCTools", `
"--includeRecommended" `
-Wait -PassThru; `
del c:\temp\vs_buildtools.exe;

RUN iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')); `
choco install cmake git --installargs 'ADD_CMAKE_TO_PATH=System' -y --no-progress

RUN git clone https://github.com/microsoft/vcpkg.git; cd vcpkg; git checkout $Env:VCPKGCOMMIT;

# To explicit set VCPKG to only build Release version of the libraries.
COPY $PLATFORM'-windows-rel.cmake' 'c:\vcpkg\triplets\'$PLATFORM'-windows-rel.cmake'
RUN cd .\vcpkg; `
.\bootstrap-vcpkg.bat; `
.\vcpkg install boost flann eigen3 qhull vtk[qt,opengl] gtest --triplet $Env:PLATFORM-windows-rel --clean-after-build;
4 changes: 4 additions & 0 deletions .dev/docker/windows/x64-windows-rel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
4 changes: 4 additions & 0 deletions .dev/docker/windows/x86-windows-rel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set(VCPKG_TARGET_ARCHITECTURE x86)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)
set(VCPKG_BUILD_TYPE release)
2 changes: 1 addition & 1 deletion .dev/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

format() {
# don't use a directory with whitespace
local whitelist="apps/3d_rec_framework apps/modeler 2d geometry ml octree simulation stereo tracking registration"
local whitelist="apps/3d_rec_framework apps/include apps/modeler apps/src 2d geometry ml octree simulation stereo tracking registration gpu/containers"

local PCL_DIR="${2}"
local formatter="${1}"
Expand Down
Loading

0 comments on commit 6ed4d35

Please sign in to comment.