Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions .github/workflows/python-whl-osx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#
# 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: Python 37 wheel osx
on:
pull_request:
branches:
- master

jobs:

build-wheel-10_15:
name: build-wheel-10_15
runs-on: macos-latest
timeout-minutes: 15

steps:
- name: checkout
uses: actions/checkout@v1

- name: brew pakages
run: brew install boost boost-python3 protobuf python jsoncpp openssl zlib

- name: build wheel file
run: |
cd pulsar-client-cpp
cmake . -DBUILD_TESTS=OFF \
-DLINK_STATIC=ON \
-DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m
make _pulsar -j8
cd python
python3 setup.py bdist_wheel
cd ../..

- uses: actions/upload-artifact@master
name: upload wheel artifact
with:
name: python-wheel-artifacts
path: pulsar-client-cpp/python/dist

build-wheel-10_14:
name: build-wheel-10_14
runs-on: macos-10.14
timeout-minutes: 15

steps:
- name: checkout
uses: actions/checkout@v1

- name: brew pakages
run: brew install boost boost-python3 protobuf python jsoncpp openssl zlib

- name: build wheel file
run: |
cd pulsar-client-cpp
cmake . -DBUILD_TESTS=OFF \
-DLINK_STATIC=ON \
-DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/3.7/include/python3.7m
make _pulsar -j8
cd python
python3 setup.py bdist_wheel
cd ../..

- uses: actions/upload-artifact@master
name: upload wheel artifact
with:
name: python-wheel-artifacts
path: pulsar-client-cpp/python/dist
4 changes: 2 additions & 2 deletions pulsar-client-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ if (BUILD_PYTHON_WRAPPER)
endif (BUILD_PYTHON_WRAPPER)

if (APPLE)
set(OPENSSL_INCLUDE_DIR /usr/local/opt/openssl/include/)
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl/)
set(OPENSSL_INCLUDE_DIR /usr/local/opt/openssl@1.1/include/)
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl@1.1/)
endif ()

find_package(OpenSSL REQUIRED)
Expand Down