Skip to content

Commit 00de003

Browse files
committed
Use Rocky Linux to build RPM packages
The RPM packages will be built with GCC 5 ABI to be compatible with new GCC versions.
1 parent 1c725b4 commit 00de003

File tree

2 files changed

+3
-151
lines changed

2 files changed

+3
-151
lines changed

.github/workflows/ci-build-binary-artifacts.yaml

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ jobs:
3939
matrix:
4040
pkg:
4141
- { name: 'RPM', type: 'rpm', path: 'pkg/rpm/RPMS' }
42-
- { name: 'Deb', type: 'deb', path: 'pkg/deb/BUILD/DEB' }
43-
- { name: 'Alpine', type: 'apk', path: 'pkg/apk/build' }
4442
cpu:
4543
- { arch: 'x86_64', platform: 'x86_64' }
4644
- { arch: 'aarch64', platform: 'arm64' }
@@ -80,146 +78,3 @@ jobs:
8078
with:
8179
name: ${{matrix.pkg.type}}-${{matrix.cpu.platform}}
8280
path: ${{matrix.pkg.path}}
83-
84-
package-windows:
85-
timeout-minutes: 120
86-
name: Build CPP Client on ${{ matrix.name }}
87-
runs-on: ${{ matrix.os }}
88-
env:
89-
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
90-
INSTALL_DIR: 'C:\\pulsar-cpp'
91-
strategy:
92-
fail-fast: false
93-
matrix:
94-
include:
95-
- name: 'Windows x64'
96-
os: windows-2019
97-
triplet: x64-windows-static
98-
suffix: 'windows-win64'
99-
generator: 'Visual Studio 16 2019'
100-
arch: '-A x64'
101-
- name: 'Windows x86'
102-
os: windows-2019
103-
triplet: x86-windows-static
104-
suffix: 'windows-win32'
105-
generator: 'Visual Studio 16 2019'
106-
arch: '-A Win32'
107-
108-
steps:
109-
- name: checkout
110-
uses: actions/checkout@v3
111-
112-
- name: Restore vcpkg and its artifacts.
113-
uses: actions/cache@v3
114-
id: vcpkg-cache
115-
with:
116-
path: |
117-
${{ env.VCPKG_ROOT }}
118-
vcpkg_installed
119-
!${{ env.VCPKG_ROOT }}/.git
120-
!${{ env.VCPKG_ROOT }}/buildtrees
121-
!${{ env.VCPKG_ROOT }}/packages
122-
!${{ env.VCPKG_ROOT }}/downloads
123-
key: |
124-
${{ runner.os }}-${{ matrix.triplet }}-${{ hashFiles( 'vcpkg.json' ) }}
125-
126-
- name: Get vcpkg(windows)
127-
if: ${{ runner.os == 'Windows' && steps.vcpkg-cache.outputs.cache-hit != 'true' }}
128-
run: |
129-
cd ${{ github.workspace }}
130-
mkdir build -force
131-
git clone https://github.com/Microsoft/vcpkg.git
132-
cd vcpkg
133-
.\bootstrap-vcpkg.bat
134-
135-
- name: remove system vcpkg(windows)
136-
if: runner.os == 'Windows'
137-
run: rm -rf "$VCPKG_INSTALLATION_ROOT"
138-
shell: bash
139-
140-
- name: Install vcpkg packages
141-
run: |
142-
${{ env.VCPKG_ROOT }}\vcpkg.exe install --triplet ${{ matrix.triplet }} > dependencies.txt
143-
144-
- name: Build and package
145-
shell: bash
146-
run: |
147-
BUILD_DIR=./build
148-
mkdir -p $BUILD_DIR
149-
cmake -B $BUILD_DIR \
150-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
151-
-DBUILD_TESTS=OFF \
152-
-DVCPKG_TRIPLET=${{ matrix.triplet }} \
153-
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
154-
-S .
155-
cmake --build $BUILD_DIR --parallel --config Release
156-
cmake --install $BUILD_DIR
157-
cp dependencies.txt ${{ env.INSTALL_DIR }}
158-
159-
- name: Zip artifact
160-
shell: bash
161-
run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}.zip ${{ env.INSTALL_DIR }}/*
162-
163-
- name: Upload artifacts
164-
uses: actions/upload-artifact@v3
165-
with:
166-
name: ${{ matrix.triplet }}
167-
path: ${{ env.INSTALL_DIR }}
168-
169-
- name: Build and package (Debug)
170-
shell: bash
171-
run: |
172-
BUILD_DIR=./build-debug
173-
INSTALL_DIR_DEBUG=${{ env.INSTALL_DIR }}-Debug
174-
mkdir -p $BUILD_DIR
175-
cmake -B $BUILD_DIR \
176-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
177-
-DBUILD_TESTS=OFF \
178-
-DVCPKG_TRIPLET=${{ matrix.triplet }} \
179-
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR_DEBUG \
180-
-DCMAKE_BUILD_TYPE=Debug \
181-
-S .
182-
cmake --build $BUILD_DIR --parallel --config Debug
183-
cmake --install $BUILD_DIR --config Debug
184-
cp dependencies.txt $INSTALL_DIR_DEBUG
185-
186-
- name: Zip artifact (Debug)
187-
shell: bash
188-
run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}-Debug.zip ${{ env.INSTALL_DIR }}-Debug/*
189-
190-
- name: Upload artifacts (Debug)
191-
uses: actions/upload-artifact@v3
192-
with:
193-
name: ${{ matrix.triplet }}-Debug
194-
path: ${{ env.INSTALL_DIR }}-Debug
195-
196-
package-macos:
197-
name: Build macOS libraries
198-
runs-on: macos-latest
199-
timeout-minutes: 500
200-
201-
strategy:
202-
fail-fast: false
203-
matrix:
204-
arch: [x86_64, arm64]
205-
206-
steps:
207-
- name: checkout
208-
uses: actions/checkout@v3
209-
210-
- name: Install dependencies
211-
run: |
212-
export ARCH=${{ matrix.arch }}
213-
./pkg/mac/build-static-library.sh
214-
215-
- name: Zip artifact
216-
run: |
217-
cd ./pkg/mac/.install
218-
zip -r macos-${{ matrix.arch }}.zip ./include/pulsar/* ./lib/*
219-
cp macos-${{ matrix.arch }}.zip ../../../
220-
221-
- name: Upload artifacts
222-
uses: actions/upload-artifact@v3
223-
with:
224-
name: macos-${{ matrix.arch }}.zip
225-
path: macos-${{ matrix.arch }}.zip

pkg/rpm/Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919

2020
# Build pulsar client library in Centos with tools to build static RPM
2121

22-
FROM centos:7
22+
FROM rockylinux:8
2323

2424
ARG PLATFORM
2525

2626
RUN yum update -y && \
2727
yum install -y \
2828
gcc-c++ \
2929
make \
30+
perl \
3031
rpm-build \
3132
which \
3233
createrepo \
33-
libstdc++-static \
3434
python3
3535

3636
RUN pip3 install pyyaml
@@ -39,15 +39,13 @@ ADD .build/dependencies.yaml /
3939
ADD .build/dep-version.py /usr/local/bin
4040

4141
# Download and compile boost
42-
# GCC 4.8.2 implementation of std::regex is buggy, so we install boost::regex here
4342
RUN BOOST_VERSION=$(dep-version.py boost) && \
4443
echo "BOOST VERSION: '${BOOST_VERSION}'" && \
4544
BOOST_VERSION_UNDESRSCORE=$(echo $BOOST_VERSION | sed 's/\./_/g') && \
4645
curl -O -L https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \
4746
tar xfz boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \
4847
cd boost_${BOOST_VERSION_UNDESRSCORE} && \
49-
./bootstrap.sh --with-libraries=regex && \
50-
./b2 address-model=64 cxxflags=-fPIC link=static threading=multi variant=release install && \
48+
cp -rf ./boost /usr/include/ && \
5149
rm -rf /boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz /boost_${BOOST_VERSION_UNDESRSCORE}
5250

5351
RUN CMAKE_VERSION=$(dep-version.py cmake) && \
@@ -102,7 +100,6 @@ RUN OPENSSL_VERSION=$(dep-version.py openssl) && \
102100
make -j8 && make install && \
103101
rm -rf /OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz /openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
104102

105-
ENV LD_LIBRARY_PATH /usr/local/ssl/lib/:
106103
ENV OPENSSL_ROOT_DIR /usr/local/ssl/
107104

108105
# LibCurl

0 commit comments

Comments
 (0)