forked from apache/pulsar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix C++ client cannot be built with Boost <=1.53 (apache#10307)
* Fix build failure for Boost 1.53 * Add build CI * Fix Boost version not detected
- Loading branch information
1 parent
f56ae72
commit 2650a36
Showing
6 changed files
with
151 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
name: CI - CPP build on CentOS 7 | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- branch-* | ||
|
||
jobs: | ||
|
||
cpp-build-centos7: | ||
name: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Tune Runner VM | ||
uses: ./.github/actions/tune-runner-vm | ||
|
||
- name: Changed files check | ||
id: changes | ||
uses: apache/pulsar-test-infra/paths-filter@master | ||
with: | ||
filters: | | ||
# pattern syntax: https://github.com/micromatch/picomatch | ||
all: | ||
- 'pulsar-client-cpp/**' | ||
docs: | ||
- 'site2/**' | ||
- 'deployment/**' | ||
- '.asf.yaml' | ||
- '*.md' | ||
- '**/*.md' | ||
- name: build cpp client on centos 7 | ||
if: ${{ steps.changes.outputs.all_count }} > ${{ steps.changes.outputs.docs_count }} | ||
run: | | ||
echo "Build C++ client library on CentOS 7" | ||
pulsar-client-cpp/docker-build-centos7.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
# Build Pulsar C++ client in CentOS 7 container | ||
|
||
set -e | ||
|
||
ROOT_DIR=$(git rev-parse --show-toplevel) | ||
cd $ROOT_DIR/pulsar-client-cpp | ||
|
||
IMAGE="${BUILD_IMAGE_NAME:-apachepulsar/pulsar-cpp-build-centos7}" | ||
cd ./docker/centos-7 | ||
docker build -t "${IMAGE}" . | ||
cd - | ||
|
||
VOLUME_OPTION=${VOLUME_OPTION:-"-v $ROOT_DIR:/pulsar"} | ||
COMMAND="cd /pulsar/pulsar-client-cpp && mkdir -p _builds && cd _builds && | ||
/opt/cmake/cmake-3.4.0-Linux-x86_64/bin/cmake .. -DBUILD_PYTHON_WRAPPER=OFF -DBUILD_TESTS=OFF && make" | ||
|
||
DOCKER_CMD="docker run -i ${VOLUME_OPTION} ${IMAGE}" | ||
|
||
rm -rf _builds | ||
$DOCKER_CMD bash -c "${COMMAND}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
|
||
FROM centos:7.6.1810 | ||
|
||
RUN yum install -y gcc gcc-c++ make \ | ||
protobuf-devel.x86_64 protobuf-lite-devel.x86_64 \ | ||
libcurl-devel openssl-devel \ | ||
boost boost-devel | ||
|
||
RUN mkdir -p /opt/cmake | ||
WORKDIR /opt/cmake | ||
RUN curl -L -O https://cmake.org/files/v3.4/cmake-3.4.0-Linux-x86_64.tar.gz \ | ||
&& tar zxf cmake-3.4.0-Linux-x86_64.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters