未验证 提交 65f12d96 编写于 作者: A Andrey Senyaev 提交者: GitHub

Merge pull request #639 from asenyaev/asen/pre_downloaded_files

Added pre-downloaded 3rdparty files to source packages
......@@ -171,12 +171,14 @@ jobs:
- name: Build a package
run: |
# Download all 3rdparty files
source scripts/source-packages-preparation.sh ${{ github.workspace }}
set -e
# Build and package
set -x
python -m pip install --upgrade pip
python -m pip install scikit-build
python setup.py sdist
python setup.py sdist --formats=xztar
set +x
# Install and run tests
set -x
......@@ -186,7 +188,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist/opencv*.tar.gz
path: dist/opencv*.tar.xz
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
......
#!/bin/bash
# ${1} variable is a path to repository opencv-python
# Define flags
if [ "0" == $ENABLE_CONTRIB ]; then
git submodule update --init opencv
EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty"
else
git submodule update --init opencv opencv_contrib
EXTRA_CMAKE_OPTIONS="-DOPENCV_DOWNLOAD_PATH=${1}/opencv/3rdparty -DOPENCV_EXTRA_MODULES_PATH=${1}/opencv_contrib/modules"
fi
# Download 3rdparty files
cd opencv && \
mkdir generate && \
cd generate && \
cmake $EXTRA_CMAKE_OPTIONS ${1}/opencv && \
cd ${1} && \
rm -rf opencv/generate
......@@ -162,6 +162,8 @@ def main():
"-DPYTHON3_LIMITED_API=ON",
"-DBUILD_OPENEXR=ON",
"-DBUILD_PNG=ON",
# To have all 3rdparty files in one place for source packages
"-DOPENCV_DOWNLOAD_PATH=%s" % (os.path.join(os.path.dirname(os.path.abspath(__file__)), "opencv", "3rdparty")),
]
+ (
# If it is not defined 'linker flags: /machine:X86' on Windows x64
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册