Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b8b409f

Browse filesBrowse files
committed
Add missed source distribution build
1 parent e411b08 commit b8b409f
Copy full SHA for b8b409f

File tree

1 file changed

+84
-5
lines changed
Filter options

1 file changed

+84
-5
lines changed

‎.github/workflows/build_wheels.yml

Copy file name to clipboardExpand all lines: .github/workflows/build_wheels.yml
+84-5Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Update submodules
4545
run: |
4646
git submodule update --remote
47-
47+
4848
- name: Set up Python ${{ matrix.python-version }}
4949
uses: actions/setup-python@v2
5050
with:
@@ -127,7 +127,7 @@ jobs:
127127
- name: Update submodules
128128
run: |
129129
git submodule update --remote
130-
130+
131131
- name: Set up Python ${{ matrix.python-version }}
132132
uses: actions/setup-python@v2
133133
with:
@@ -141,7 +141,7 @@ jobs:
141141
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
142142
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
143143
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
144-
144+
145145
- name: before install
146146
run: |
147147
set -e
@@ -192,9 +192,89 @@ jobs:
192192
name: wheels
193193
path: wheelhouse/opencv*.whl
194194

195+
196+
build_sdist:
197+
runs-on: ${{ matrix.os }}
198+
defaults:
199+
run:
200+
shell: bash
201+
202+
strategy:
203+
fail-fast: false
204+
matrix:
205+
os: [ubuntu-latest]
206+
python-version: [3.8]
207+
platform: [x64]
208+
with_contrib: [0, 1]
209+
without_gui: [0]
210+
build_sdist: [1]
211+
212+
env:
213+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
214+
REPO_DIR: .
215+
BUILD_COMMIT: master
216+
PROJECT_SPEC: opencv-python
217+
PLAT: x86_64
218+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
219+
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
220+
MB_ML_VER: 2014
221+
NP_TEST_DEP: numpy
222+
TRAVIS_BUILD_DIR: ${{ github.workspace }}
223+
CONFIG_PATH: travis_config.sh
224+
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
225+
USE_CCACHE: 1
226+
UNICODE_WIDTH: 32
227+
SDIST: ${{ matrix.build_sdist || 0}}
228+
ENABLE_HEADLESS: ${{ matrix.without_gui || 0 }}
229+
ENABLE_CONTRIB: ${{ matrix.with_contrib || 0}}
230+
231+
steps:
232+
- name: Checkout
233+
uses: actions/checkout@v2
234+
with:
235+
submodules: true
236+
fetch-depth: 0
237+
238+
- name: Update submodules
239+
run: |
240+
git submodule update --remote
241+
242+
- name: Set up Python ${{ matrix.python-version }}
243+
uses: actions/setup-python@v2
244+
with:
245+
python-version: ${{ matrix.python-version }}
246+
architecture: ${{ matrix.platform }}
247+
248+
- name: Setup Environment variables
249+
run: |
250+
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
251+
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
252+
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
253+
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
254+
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
255+
256+
- name: before install
257+
run: |
258+
set -e
259+
# Build and package
260+
set -x
261+
python -m pip install --upgrade pip
262+
python -m pip install scikit-build
263+
python setup.py sdist
264+
set +x
265+
# Install and run tests
266+
set -x
267+
echo "skipping tests because of sdist"
268+
- name: saving artifacts
269+
uses: actions/upload-artifact@v2
270+
with:
271+
name: wheels
272+
path: dist/opencv*.tar.gz
273+
274+
195275
release:
196276
if: startsWith(github.ref, 'refs/tags/v')
197-
needs: [build, build-windows-x86_64]
277+
needs: [build, build-windows-x86_64, build_sdist]
198278
runs-on: ubuntu-latest
199279
defaults:
200280
run:
@@ -206,7 +286,6 @@ jobs:
206286
path: wheelhouse/
207287

208288
- name: Upload wheels ${{ matrix.os }}
209-
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} && startsWith(github.ref, 'refs/tags/')
210289
env:
211290
# PYPI repository credentials
212291
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.