Skip to content

Commit

Permalink
Merge pull request #4131 from shrijitsingh99/clang-ci
Browse files Browse the repository at this point in the history
Add a job for clang in Ubuntu 18.04
  • Loading branch information
SergioRAgostinho authored May 29, 2020
2 parents 19a08d7 + 054aea9 commit 158e33c
Show file tree
Hide file tree
Showing 8 changed files with 238 additions and 210 deletions.
110 changes: 100 additions & 10 deletions .ci/azure-pipelines/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ resources:
image: pointcloudlibrary/fmt
- container: env1604
image: pointcloudlibrary/env:16.04
- container: env1804
image: pointcloudlibrary/env:18.04
- container: env2004
image: pointcloudlibrary/env:20.04
- container: doc
Expand All @@ -14,29 +16,117 @@ stages:
displayName: Formatting
jobs:
- template: formatting.yaml
- stage: build_ubuntu
displayName: Build Ubuntu

- stage: build_gcc
displayName: Build GCC
dependsOn: formatting
jobs:
- template: build-ubuntu.yaml
- stage: build_osx
displayName: Build macOS
- job: ubuntu
displayName: Ubuntu
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
16.04 GCC:
CONTAINER: env1604
CC: gcc
CXX: g++
CMAKE_ARGS: '-DPCL_WARNINGS_ARE_ERRORS=ON'
20.04 GCC:
CONTAINER: env2004
CC: gcc
CXX: g++
CMAKE_ARGS: ''
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
variables:
BUILD_DIR: '$(Agent.BuildDirectory)/build'
CMAKE_CXX_FLAGS: '-Wall -Wextra'
steps:
- template: build/ubuntu.yaml

- stage: build_clang
displayName: Build Clang
dependsOn: formatting
jobs:
- template: build-macos.yaml
- stage: build_windows
displayName: Build Windows
- job: osx
displayName: macOS
pool:
vmImage: '$(VMIMAGE)'
strategy:
matrix:
Catalina 10.15:
VMIMAGE: 'macOS-10.15'
OSX_VERSION: '10.15'
Mojave 10.14:
VMIMAGE: 'macOS-10.14'
OSX_VERSION: '10.14'
timeoutInMinutes: 0
variables:
BUILD_DIR: '$(Agent.WorkFolder)/build'
GOOGLE_TEST_DIR: '$(Agent.WorkFolder)/googletest'
CMAKE_CXX_FLAGS: '-Wall -Wextra -Werror -Wabi'
steps:
- template: build/macos.yaml
- job: ubuntu
displayName: Ubuntu
# Placement of Ubuntu Clang job after macOS ensures an extra parallel job doesn't need to be created.
# Total time per run remains same since macOS is quicker so it finishes earlier, and remaining time is used by this job
# Therefore, number of parallel jobs and total run time of entire pipeline remains unchanged even after addition of this job
dependsOn: osx
condition: succeededOrFailed()
pool:
vmImage: 'Ubuntu 16.04'
strategy:
matrix:
18.04 Clang:
CONTAINER: env1804
CC: clang
CXX: clang++
CMAKE_ARGS: ''
container: $[ variables['CONTAINER'] ]
timeoutInMinutes: 0
variables:
BUILD_DIR: '$(Agent.BuildDirectory)/build'
CMAKE_CXX_FLAGS: '-Wall -Wextra'
steps:
- template: build/ubuntu.yaml

- stage: build_msvc
displayName: Build MSVC
dependsOn: formatting
jobs:
- template: build-windows.yaml
- job: vs2017
displayName: Windows VS2017 Build
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
x86:
PLATFORM: 'x86'
ARCHITECTURE: 'x86'
GENERATOR: 'Visual Studio 15 2017'
x64:
PLATFORM: 'x64'
ARCHITECTURE: 'x86_amd64'
GENERATOR: 'Visual Studio 15 2017 Win64'
timeoutInMinutes: 0
variables:
BUILD_DIR: '$(Agent.WorkFolder)\build'
CONFIGURATION: 'Release'
VCPKG_ROOT: 'C:\vcpkg'
steps:
- template: build/windows.yaml

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

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

65 changes: 0 additions & 65 deletions .ci/azure-pipelines/build-macos.yaml

This file was deleted.

69 changes: 0 additions & 69 deletions .ci/azure-pipelines/build-ubuntu.yaml

This file was deleted.

65 changes: 0 additions & 65 deletions .ci/azure-pipelines/build-windows.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions .ci/azure-pipelines/build/macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
steps:
- checkout: self
# find the commit hash on a quick non-forced update too
fetchDepth: 10
- script: |
brew install pkg-config qt5 libpcap brewsci/science/openni libomp
brew install vtk --with-qt --without-python@2
brew install --only-dependencies pcl
git clone https://github.com/abseil/googletest.git $GOOGLE_TEST_DIR # the official endpoint changed to abseil/googletest
cd $GOOGLE_TEST_DIR && git checkout release-1.8.1
displayName: 'Install Dependencies'
- script: |
mkdir $BUILD_DIR && cd $BUILD_DIR
# Surface switched off due to OpenGL deprecation on Mac
cmake $(Build.SourcesDirectory) \
-DCMAKE_BUILD_TYPE="MinSizeRel" \
-DCMAKE_OSX_SYSROOT="/Library/Developer/CommandLineTools/SDKs/MacOSX$(OSX_VERSION).sdk" \
-DCMAKE_CXX_FLAGS="$CMAKE_CXX_FLAGS" \
-DGTEST_SRC_DIR="$GOOGLE_TEST_DIR/googletest" \
-DGTEST_INCLUDE_DIR="$GOOGLE_TEST_DIR/googletest/include" \
-DQt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5 \
-DPCL_ONLY_CORE_POINT_TYPES=ON \
-DBUILD_simulation=ON \
-DBUILD_surface=OFF \
-DBUILD_global_tests=ON \
-DBUILD_examples=ON \
-DBUILD_tools=ON \
-DBUILD_apps=ON \
-DBUILD_apps_3d_rec_framework=ON \
-DBUILD_apps_cloud_composer=ON \
-DBUILD_apps_in_hand_scanner=ON \
-DBUILD_apps_modeler=ON \
-DBUILD_apps_point_cloud_editor=ON
displayName: 'CMake Configuration'
- script: |
cd $BUILD_DIR
cmake --build . -- -j2
displayName: 'Build Library'
- script: cd $BUILD_DIR && cmake --build . -- tests
displayName: 'Run Unit Tests'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: '**/Test*.xml'
searchFolder: '$(Agent.WorkFolder)/build'
condition: succeededOrFailed()

Loading

0 comments on commit 158e33c

Please sign in to comment.