Skip to content

Commit 9f980d7

Browse files
authored
Merge pull request #4073 from kunaltyagi/release_2
2 parents f2c30dd + a39cff2 commit 9f980d7

File tree

7 files changed

+201
-37
lines changed

7 files changed

+201
-37
lines changed

.ci/azure-pipelines/release.yaml

Lines changed: 99 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,35 @@ resources:
1313
- repo: self
1414

1515
variables:
16-
dockerHub: "PersonalDockerHub"
17-
dockerHubID: "kunaltyagi"
16+
dockerHub: "[email protected]"
17+
dockerHubID: "pointcloudlibrary"
18+
# VERSION and RC need to be provided via the UI
19+
# UI priority is the lowest and can't override the file data
20+
# RC: 0 # number of pre-release
21+
# VERSION: 1.99
1822

1923
stages:
24+
- stage: Info
25+
displayName: "Version"
26+
jobs:
27+
- job: additional_info
28+
displayName: "More Info"
29+
pool:
30+
vmImage: 'ubuntu-latest'
31+
steps:
32+
- checkout: self
33+
# find the commit hash on a quick non-forced update too
34+
fetchDepth: 10
35+
- script: |
36+
echo "Prev release: $(git tag | sort -rV | head -1 | cut -d- -f 2)"
37+
echo "Current release: "$(VERSION)-rc$(RC)
38+
if [ -z $VERSION ] || [ -z $RC ]; then
39+
echo "Bad version and release candidate number"
40+
exit 3
41+
fi
42+
displayName: "Test for and display version info"
2043
- stage: Debian
21-
dependsOn: []
44+
dependsOn: ["Info"]
2245
jobs:
2346
- job: BuildDebian
2447
displayName: "Build Debian Latest"
@@ -41,7 +64,7 @@ stages:
4164
dockerfile: '$(Build.SourcesDirectory)/.dev/docker/release/Dockerfile'
4265
tags: "$(tag)"
4366
- stage: ROS
44-
dependsOn: []
67+
dependsOn: ["Info"]
4568
jobs:
4669
- job: PerceptionPCL
4770
displayName: "perception_pcl compile"
@@ -80,7 +103,7 @@ stages:
80103
pool:
81104
vmImage: 'ubuntu-latest'
82105
variables:
83-
SOURCE_TAR: '$(Build.ArtifactStagingDirectory)/source.tar.gz'
106+
PUBLISH_LOCATION: '$(Build.ArtifactStagingDirectory)'
84107
steps:
85108
- checkout: self
86109
# find the commit hash on a quick non-forced update too
@@ -93,40 +116,96 @@ stages:
93116
workingDirectory: '$(Build.SourcesDirectory)'
94117
failOnStderr: true
95118
- task: ArchiveFiles@2
96-
displayName: "Create release archive"
119+
displayName: "Create release archive (.tar.gz)"
97120
inputs:
98121
rootFolderOrFile: '$(Build.SourcesDirectory)'
99122
includeRootFolder: true
100123
archiveType: 'tar'
101-
archiveFile: '$(SOURCE_TAR)'
124+
archiveFile: '$(PUBLISH_LOCATION)/source.tar.gz'
102125
replaceExistingArchive: true
103126
verbose: true
127+
- task: ArchiveFiles@2
128+
displayName: "Create release archive (.zip)"
129+
inputs:
130+
rootFolderOrFile: '$(Build.SourcesDirectory)'
131+
includeRootFolder: true
132+
archiveType: 'zip'
133+
archiveFile: '$(PUBLISH_LOCATION)/source.zip'
134+
replaceExistingArchive: true
135+
verbose: true
136+
- script: |
137+
for file in $(ls "$(PUBLISH_LOCATION)/"); do
138+
sha256sum "$(PUBLISH_LOCATION)"/"${file}" >> $(PUBLISH_LOCATION)/sha256_checksums.txt
139+
sha512sum "$(PUBLISH_LOCATION)"/"${file}" >> $(PUBLISH_LOCATION)/sha512_checksums.txt
140+
done
141+
echo "SHA 256 Checksums:"
142+
cat $(PUBLISH_LOCATION)/sha256_checksums.txt
143+
echo "SHA 512 Checksums:"
144+
cat $(PUBLISH_LOCATION)/sha512_checksums.txt
145+
displayName: "Generate checksum"
104146
- task: PublishBuildArtifacts@1
105147
displayName: "Publish archive"
106148
inputs:
107-
PathtoPublish: '$(SOURCE_TAR)'
108-
ArtifactName: 'source.tar.gz'
149+
PathtoPublish: '$(PUBLISH_LOCATION)/'
150+
ArtifactName: 'source'
109151
publishLocation: 'Container'
110-
- job: documentation
111-
displayName: Generate Documentation
112-
container:
113-
image: pointcloudlibrary/doc
152+
- job: changelog
153+
displayName: Generate Change Log
114154
pool:
115155
vmImage: 'ubuntu-latest'
116156
variables:
117-
BUILD_DIR: '$(Agent.BuildDirectory)/build'
118157
CHANGELOG: '$(Build.ArtifactStagingDirectory)/changelog.md'
119158
steps:
120-
- checkout: self
121-
# find the commit hash on a quick non-forced update too
122-
fetchDepth: 10
159+
- checkout: none
123160
- script: |
124-
$(Build.SourcesDirectory)/.dev/scripts/generate_changelog.py --with-misc > $(CHANGELOG)
125-
pandoc -f markdown -t plain --wrap=none $(CHANGELOG)
161+
cat > $(CHANGELOG) <<EOF
162+
## Insert Summary Here
163+
164+
For an exhaustive list of newly added features, deprecations and other changes
165+
in PCL $(VERSION), please see [CHANGES.md](https://github.com/PointCloudLibrary/pcl/blob/master/CHANGES.md). **Remember to edit the URL**
166+
EOF
126167
displayName: 'Generate Changelog'
127168
- task: PublishBuildArtifacts@1
128169
displayName: "Publish Changelog"
129170
inputs:
130171
PathtoPublish: '$(CHANGELOG)'
131-
ArtifactName: 'changelog.md'
172+
ArtifactName: 'changelog'
132173
publishLocation: 'Container'
174+
- stage: Release
175+
dependsOn: ["Prepare"]
176+
jobs:
177+
- job: release
178+
displayName: "Release the kraken"
179+
timeoutInMinutes: 360
180+
variables:
181+
DOWNLOAD_LOCATION: '$(Build.ArtifactStagingDirectory)'
182+
pool:
183+
vmImage: 'ubuntu-latest'
184+
steps:
185+
- checkout: self
186+
# find the commit hash on a quick non-forced update too
187+
fetchDepth: 10
188+
- bash: |
189+
if [ -z $RC ] || [ $RC -eq 0 ]; then isPreRelease=false; else isPreRelease=true; fi
190+
echo "##vso[task.setvariable variable=isPreRelease]${isPreRelease}"
191+
- task: DownloadBuildArtifacts@0
192+
inputs:
193+
downloadType: 'all' # can be anything except single
194+
downloadPath: '$(DOWNLOAD_LOCATION)'
195+
- task: GitHubRelease@1
196+
inputs:
197+
action: 'create'
198+
addChangeLog: false
199+
# assets, one pattern per line
200+
assets: |
201+
$(DOWNLOAD_LOCATION)/source/*
202+
isDraft: true
203+
isPreRelease: $(isPreRelease)
204+
gitHubConnection: 'Release to GitHub'
205+
releaseNotesFilePath: '$(DOWNLOAD_LOCATION)/changelog/changelog.md'
206+
repositoryName: $(Build.Repository.Name)
207+
tagSource: 'userSpecifiedTag'
208+
tag: "pcl-$(VERSION)-rc$(RC)"
209+
tagPattern: 'pcl-*'
210+
target: '$(Build.SourceVersion)'
211+
title: 'PCL $(VERSION)'

.dev/docker/perception_pcl_ros/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ RUN sed -i "s/^# deb-src/deb-src/" /etc/apt/sources.list \
1919
&& apt install -y \
2020
libeigen3-dev \
2121
libflann-dev \
22+
libqhull-dev \
2223
python-pip \
2324
ros-${flavor}-tf2-eigen \
24-
&& apt build-dep pcl -y \
2525
&& pip install -U pip \
2626
&& pip install catkin_tools \
2727
&& cd ${workspace}/src \
@@ -34,6 +34,7 @@ COPY package.xml ${workspace}/src/pcl/
3434

3535
RUN cd ${workspace} \
3636
&& . "/opt/ros/${flavor}/setup.sh" \
37-
&& catkin config --install \
37+
&& catkin config --install --link-devel \
3838
&& catkin build -j2 libpcl-all-dev --cmake-args -DWITH_OPENGL:BOOL=OFF \
39-
&& catkin build
39+
&& rm -fr build/libpcl-all-dev \
40+
&& catkin build --start-with pcl_msgs
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# flavor appears twice, once for the FOR, once for the contents since
2+
# Dockerfile seems to reset arguments after a FOR appears
3+
ARG flavor="dashing"
4+
FROM ros:${flavor}-ros-base
5+
6+
ARG flavor="dashing"
7+
ARG workspace="/root/catkin_ws"
8+
9+
COPY ${flavor}_rosinstall.yaml ${workspace}/src/.rosinstall
10+
11+
# Be careful:
12+
# * source ROS setup file in evey RUN snippet
13+
#
14+
# TODO: The dependencies of PCL can be reduced since
15+
# * we don't need to build visualization or docs
16+
RUN sed -i "s/^# deb-src/deb-src/" /etc/apt/sources.list \
17+
&& apt update \
18+
&& apt install -y \
19+
libeigen3-dev \
20+
libflann-dev \
21+
ros-${flavor}-tf2-eigen \
22+
&& apt build-dep pcl -y \
23+
&& pip3 install -U pip \
24+
&& pip3 install wstool \
25+
&& cd ${workspace}/src \
26+
&& . "/opt/ros/${flavor}/setup.sh" \
27+
&& catkin_init_workspace \
28+
&& cd .. \
29+
&& wstool update -t src
30+
31+
COPY package.xml ${workspace}/src/pcl/
32+
33+
RUN cd ${workspace} \
34+
&& . "/opt/ros/${flavor}/setup.sh" \
35+
&& catkin config --install \
36+
&& catkin build -j2 libpcl-all-dev --cmake-args -DWITH_OPENGL:BOOL=OFF \
37+
&& catkin build

.dev/docker/release/Dockerfile

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM debian:testing
22

3+
ARG VTK_VERSION=7
34
ENV DEBIAN_FRONTEND=noninteractive
45

56
# Add sources so we can just install build-dependencies of PCL
@@ -10,12 +11,30 @@ RUN sed -i 's/^deb \(.*\)$/deb \1\ndeb-src \1/' /etc/apt/sources.list \
1011
cmake \
1112
dpkg-dev \
1213
git \
13-
&& apt build-dep pcl -y \
14+
g++ \
15+
libboost-date-time-dev \
16+
libboost-filesystem-dev \
17+
libboost-iostreams-dev \
18+
libeigen3-dev \
19+
libflann-dev \
20+
libglew-dev \
21+
libgtest-dev \
22+
libopenni-dev \
23+
libopenni2-dev \
24+
libproj-dev \
25+
libqhull-dev \
26+
libqt5opengl5-dev \
27+
libusb-1.0-0-dev \
28+
libvtk${VTK_VERSION}-dev \
29+
libvtk${VTK_VERSION}-qt-dev \
30+
qtbase5-dev \
31+
wget \
1432
&& rm -rf /var/lib/apt/lists/*
1533

1634
# CMake flags are from dpkg helper
1735
# PCL config is from debian repo:
1836
# https://salsa.debian.org/science-team/pcl/-/blob/master/debian/rules
37+
# MinSizeRel is used for the CI and should have no impact on releaseability
1938
RUN cd \
2039
&& git clone --depth=1 https://github.com/PointCloudLibrary/pcl \
2140
&& mkdir pcl/build \
@@ -24,19 +43,20 @@ RUN cd \
2443
&& export DEB_CFLAGS_MAINT_APPEND="-Wall -pedantic" \
2544
&& export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed" \
2645
&& cmake .. \
27-
-DCMAKE_CXX_FLAGS="`dpkg-buildflags --get CXXFLAGS`" \
28-
-DCMAKE_EXE_LINKER_FLAGS:STRING="`dpkg-buildflags --get LDFLAGS`" \
46+
-DCMAKE_BUILD_TYPE=MinSizeRel \
47+
-DCMAKE_CXX_FLAGS:STRING="`dpkg-buildflags --get CXXFLAGS`" \
48+
-DCMAKE_EXE_LINKER_FLAGS:STRING="`dpkg-buildflags --get LDFLAGS`" \
2949
-DCMAKE_SHARED_LINKER_FLAGS:STRING="`dpkg-buildflags --get LDFLAGS`" \
30-
-DCMAKE_SKIP_RPATH=ON -DPCL_ENABLE_SSE=OFF \
31-
-DBUILD_TESTS=OFF -DBUILD_apps=ON -DBUILD_common=ON \
32-
-DBUILD_examples=ON -DBUILD_features=ON -DBUILD_filters=ON \
33-
-DBUILD_geometry=ON -DBUILD_global_tests=OFF -DBUILD_io=ON \
34-
-DBUILD_kdtree=ON -DBUILD_keypoints=ON -DBUILD_octree=ON \
35-
-DBUILD_registration=ON -DBUILD_sample_consensus=ON \
36-
-DBUILD_search=ON -DBUILD_segmentation=ON -DBUILD_surface=ON \
37-
-DBUILD_tools=ON -DBUILD_tracking=ON -DBUILD_visualization=ON \
38-
-DBUILD_apps_cloud_composer=OFF -DBUILD_apps_modeler=ON \
39-
-DBUILD_apps_point_cloud_editor=ON -DBUILD_apps_in_hand_scanner=ON \
50+
-DCMAKE_SKIP_RPATH=ON -DPCL_ENABLE_SSE=OFF \
51+
-DBUILD_TESTS=OFF -DBUILD_apps=ON -DBUILD_common=ON \
52+
-DBUILD_examples=ON -DBUILD_features=ON -DBUILD_filters=ON \
53+
-DBUILD_geometry=ON -DBUILD_global_tests=OFF -DBUILD_io=ON \
54+
-DBUILD_kdtree=ON -DBUILD_keypoints=ON -DBUILD_octree=ON \
55+
-DBUILD_registration=ON -DBUILD_sample_consensus=ON \
56+
-DBUILD_search=ON -DBUILD_segmentation=ON -DBUILD_surface=ON \
57+
-DBUILD_tools=ON -DBUILD_tracking=ON -DBUILD_visualization=ON \
58+
-DBUILD_apps_cloud_composer=OFF -DBUILD_apps_modeler=ON \
59+
-DBUILD_apps_point_cloud_editor=ON -DBUILD_apps_in_hand_scanner=ON \
4060
&& make install -j2 \
4161
&& cd \
4262
&& rm -fr pcl

.dev/scripts/bump_post_release.bash

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#! /usr/bin/env bash
2+
3+
new_version=$(git tag | sort -rV | head -1 | cut -d- -f 2).99
4+
5+
# Mac users either use gsed or add "" after -i
6+
if ls | grep README -q; then
7+
sed -i "s,VERSION [0-9.]*),VERSION ${new_version})," CMakeLists.txt
8+
else
9+
echo "Don't think this is the root directory" 1>&2
10+
exit 4
11+
fi

.dev/scripts/bump_release.bash

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#! /usr/bin/env bash
2+
3+
if [ $# != 1 ]; then
4+
echo "Need (only) the release version" 1>&2
5+
exit 3
6+
fi
7+
8+
# Mac users either use gsed or add "" after -i
9+
new_version="$1"
10+
if ls | grep README -q; then
11+
sed -i "s,[0-9]\+\.[0-9]\+\.[0-9]\+,${new_version}," README.md
12+
sed -i "s,VERSION [0-9.]*),VERSION ${new_version})," CMakeLists.txt
13+
else
14+
echo "Don't think this is the root directory" 1>&2
15+
exit 4
16+
fi

.dev/scripts/generate_changelog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646

4747

4848
CATEGORIES = {
49-
"new feature": ("New features", ""),
49+
"new feature": ("New features", "added to PCL"),
5050
"deprecation": (
5151
"Deprecation",
5252
"of public APIs, scheduled to be removed after two minor releases",

0 commit comments

Comments
 (0)