forked from opencv/opencv-python
-
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.
- Loading branch information
Showing
1 changed file
with
81 additions
and
0 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,81 @@ | ||
name: PullRequest | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
buildMac: | ||
name: Build macOS | ||
runs-on: macOS-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
xcode: [ Xcode_12.3 ] | ||
sourceDist: [ 1,0 ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: true | ||
- name: Prepare (before_install) | ||
run: | | ||
source multibuild/common_utils.sh | ||
source multibuild/travis_steps.sh | ||
source travis_multibuild_customize.sh | ||
echo $ENABLE_CONTRIB > contrib.enabled | ||
echo $ENABLE_HEADLESS > headless.enabled | ||
cat contrib.enabled | ||
- name: path | ||
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: check | ||
run: | | ||
brew install python | ||
python --version | ||
pip --version | ||
# export PATH=/usr/local/opt/python/libexec/bin:$PATH | ||
python --version | ||
pip --version | ||
- name: Install | ||
run: | | ||
# export PATH=/usr/local/opt/python/libexec/bin:$PATH | ||
if [[ ${{ matrix.sourceDist }} == 1 ]]; then | ||
python -m pip install --upgrade pip | ||
python -m pip install scikit-build | ||
python setup.py sdist | ||
else | ||
build_wheel $REPO_DIR $PLAT | ||
fi | ||
- name: build | ||
run: | | ||
# export PATH=/usr/local/opt/python/libexec/bin:$PATH | ||
if [[ ${{ matrix.sourceDist }} == 1 ]]; then | ||
echo "skipping tests because of $sourceDist" | ||
else | ||
install_run $PLAT | ||
fi | ||
- name: post | ||
run: | | ||
# export PATH=/usr/local/opt/python/libexec/bin:$PATH | ||
# macpython 3.5 doesn't support recent TLS protocols which causes twine | ||
# upload to fail, so we use the system Python to run twine | ||
/usr/bin/python -m ensurepip --user | ||
/usr/bin/python -m pip install --user -U pip | ||
/usr/bin/python -m pip install --user -U -I twine | ||
if [[ ${{ matrix.sourceDist }} == 1 ]]; then | ||
/usr/bin/python -m twine upload -u ${PYPI_USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/dist/opencv* | ||
else | ||
/usr/bin/python -m twine upload -u ${PYPI_USER} -p ${PASS} --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/opencv* | ||
fi | ||
# - name: Archive artifact | ||
# uses: actions/upload-artifact@v2.2.2 | ||
# if: ${{ success() }} | ||
# with: | ||
# name: openCV-python-${{ matrix.xcode }} | ||
# path: build/release |