Skip to content

Commit 2f30eab

Browse files
committed
Use Rocky Linux to build RPM packages
The default GCC version is 8 on Rocky Linux 8, which uses new C++ ABI. It also skips Windows build because it's broken currently.
1 parent 79147b8 commit 2f30eab

File tree

2 files changed

+4
-124
lines changed

2 files changed

+4
-124
lines changed

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

Lines changed: 0 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -80,120 +80,3 @@ jobs:
8080
with:
8181
name: ${{matrix.pkg.type}}-${{matrix.cpu.platform}}
8282
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-
# See https://github.com/microsoft/vcpkg/issues/32600#issuecomment-1638907069
143-
mkdir -p ${{ env.VCPKG_ROOT }}/downloads
144-
cd ${{ env.VCPKG_ROOT }}/downloads
145-
curl -O -L https://github.com/microsoft/vcpkg/files/12073957/nasm-2.16.01-win64.zip
146-
cd -
147-
${{ env.VCPKG_ROOT }}\vcpkg.exe install --triplet ${{ matrix.triplet }} > dependencies.txt
148-
149-
- name: Build and package
150-
shell: bash
151-
run: |
152-
BUILD_DIR=./build
153-
mkdir -p $BUILD_DIR
154-
cmake -B $BUILD_DIR \
155-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
156-
-DBUILD_TESTS=OFF \
157-
-DVCPKG_TRIPLET=${{ matrix.triplet }} \
158-
-DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} \
159-
-S .
160-
cmake --build $BUILD_DIR --parallel --config Release
161-
cmake --install $BUILD_DIR
162-
cp dependencies.txt ${{ env.INSTALL_DIR }}
163-
164-
- name: Zip artifact
165-
shell: bash
166-
run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}.zip ${{ env.INSTALL_DIR }}/*
167-
168-
- name: Upload artifacts
169-
uses: actions/upload-artifact@v3
170-
with:
171-
name: ${{ matrix.triplet }}
172-
path: ${{ env.INSTALL_DIR }}
173-
174-
- name: Build and package (Debug)
175-
shell: bash
176-
run: |
177-
BUILD_DIR=./build-debug
178-
INSTALL_DIR_DEBUG=${{ env.INSTALL_DIR }}-Debug
179-
mkdir -p $BUILD_DIR
180-
cmake -B $BUILD_DIR \
181-
-G "${{ matrix.generator }}" ${{ matrix.arch }} \
182-
-DBUILD_TESTS=OFF \
183-
-DVCPKG_TRIPLET=${{ matrix.triplet }} \
184-
-DCMAKE_INSTALL_PREFIX=$INSTALL_DIR_DEBUG \
185-
-DCMAKE_BUILD_TYPE=Debug \
186-
-S .
187-
cmake --build $BUILD_DIR --parallel --config Debug
188-
cmake --install $BUILD_DIR --config Debug
189-
cp dependencies.txt $INSTALL_DIR_DEBUG
190-
191-
- name: Zip artifact (Debug)
192-
shell: bash
193-
run: 7z a -tzip pulsar-client-cpp-${{ matrix.triplet }}-Debug.zip ${{ env.INSTALL_DIR }}-Debug/*
194-
195-
- name: Upload artifacts (Debug)
196-
uses: actions/upload-artifact@v3
197-
with:
198-
name: ${{ matrix.triplet }}-Debug
199-
path: ${{ env.INSTALL_DIR }}-Debug

pkg/rpm/Dockerfile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,19 @@
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 \
28+
gcc \
2829
gcc-c++ \
2930
make \
31+
perl \
3032
rpm-build \
3133
which \
3234
createrepo \
33-
libstdc++-static \
3435
python3
3536

3637
RUN pip3 install pyyaml
@@ -39,15 +40,13 @@ ADD .build/dependencies.yaml /
3940
ADD .build/dep-version.py /usr/local/bin
4041

4142
# Download and compile boost
42-
# GCC 4.8.2 implementation of std::regex is buggy, so we install boost::regex here
4343
RUN BOOST_VERSION=$(dep-version.py boost) && \
4444
echo "BOOST VERSION: '${BOOST_VERSION}'" && \
4545
BOOST_VERSION_UNDESRSCORE=$(echo $BOOST_VERSION | sed 's/\./_/g') && \
4646
curl -O -L https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \
4747
tar xfz boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz && \
4848
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 && \
49+
cp -rf ./boost /usr/include/ && \
5150
rm -rf /boost_${BOOST_VERSION_UNDESRSCORE}.tar.gz /boost_${BOOST_VERSION_UNDESRSCORE}
5251

5352
RUN CMAKE_VERSION=$(dep-version.py cmake) && \
@@ -102,7 +101,6 @@ RUN OPENSSL_VERSION=$(dep-version.py openssl) && \
102101
make -j8 && make install && \
103102
rm -rf /OpenSSL_${OPENSSL_VERSION_UNDERSCORE}.tar.gz /openssl-OpenSSL_${OPENSSL_VERSION_UNDERSCORE}
104103

105-
ENV LD_LIBRARY_PATH /usr/local/ssl/lib/:
106104
ENV OPENSSL_ROOT_DIR /usr/local/ssl/
107105

108106
# LibCurl
@@ -114,4 +112,3 @@ RUN CURL_VERSION=$(dep-version.py curl) && \
114112
CFLAGS=-fPIC ./configure --with-ssl=/usr/local/ssl/ --without-zstd && \
115113
make -j8 && make install && \
116114
rm -rf /curl-${CURL_VERSION}.tar.gz /curl-${CURL_VERSION}
117-

0 commit comments

Comments
 (0)