Skip to content

Commit aceb2a3

Browse files
committed
Reduce architectures to x64 for both OSX and Ubuntu as x86 is supported for windows only
1 parent 176a99b commit aceb2a3

File tree

1 file changed

+3
-115
lines changed

1 file changed

+3
-115
lines changed

.github/workflows/build_wheels.yml

Lines changed: 3 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -82,119 +82,7 @@ jobs:
8282
name: wheels
8383
path: wheelhouse/opencv*.whl
8484

85-
86-
build_linux:
87-
runs-on: ${{ matrix.os }}
88-
defaults:
89-
run:
90-
shell: bash
91-
92-
strategy:
93-
fail-fast: false
94-
matrix:
95-
os: [ubuntu-latest]
96-
python-version: [3.6, 3.7, 3.8, 3.9]
97-
platform: [x86, x64]
98-
with_contrib: [0, 1]
99-
without_gui: [0, 1]
100-
build_sdist: [0]
101-
102-
env:
103-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
104-
REPO_DIR: .
105-
BUILD_COMMIT: master
106-
PROJECT_SPEC: opencv-python
107-
MB_PYTHON_VERSION: ${{ matrix.python-version }}
108-
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
109-
MB_ML_VER: 2014
110-
NP_TEST_DEP: numpy
111-
TRAVIS_BUILD_DIR: ${{ github.workspace }}
112-
CONFIG_PATH: travis_config.sh
113-
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
114-
USE_CCACHE: 1
115-
UNICODE_WIDTH: 32
116-
SDIST: ${{ matrix.build_sdist || 0}}
117-
ENABLE_HEADLESS: ${{ matrix.without_gui }}
118-
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
119-
120-
steps:
121-
- name: Checkout
122-
uses: actions/checkout@v2
123-
with:
124-
submodules: true
125-
fetch-depth: 0
126-
127-
- name: Update submodules
128-
run: |
129-
git submodule update --remote
130-
131-
- name: Set up Python ${{ matrix.python-version }}
132-
uses: actions/setup-python@v2
133-
with:
134-
python-version: ${{ matrix.python-version }}
135-
architecture: ${{ matrix.platform }}
136-
137-
- name: Setup Environment variables
138-
run: |
139-
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
140-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
141-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
142-
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
143-
if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
144-
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
145-
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
146-
147-
- name: before install
148-
run: |
149-
set -e
150-
if [[ $SDIST == 0 ]]; then
151-
# Check out and prepare the source
152-
# Multibuild doesn't have releases, so --depth would break eventually (see
153-
# https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
154-
git submodule update --init multibuild
155-
source multibuild/common_utils.sh
156-
# https://github.com/matthew-brett/multibuild/issues/116
157-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
158-
source multibuild/travis_steps.sh
159-
# This sets -x
160-
# source travis_multibuild_customize.sh
161-
echo $ENABLE_CONTRIB > contrib.enabled
162-
echo $ENABLE_HEADLESS > headless.enabled
163-
echo "end"
164-
# Not interested in travis internal scripts' output
165-
fi
166-
set +x
167-
# Build and package
168-
set -x
169-
ls
170-
if [[ $SDIST == 1 ]]; then
171-
python -m pip install --upgrade pip
172-
python -m pip install scikit-build
173-
python setup.py sdist
174-
else
175-
build_wheel $REPO_DIR $PLAT
176-
fi
177-
set +x
178-
# Install and run tests
179-
set -x
180-
if [[ $SDIST == 1 ]]; then
181-
echo "skipping tests because of sdist"
182-
rc=0
183-
else
184-
install_run $PLAT && rc=$? || rc=$?
185-
fi
186-
set +x
187-
#otherwise, Travis logic terminates prematurely
188-
#https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817
189-
trap ERR
190-
test "$rc" -eq 0
191-
- name: saving artifacts
192-
uses: actions/upload-artifact@v2
193-
with:
194-
name: wheels
195-
path: wheelhouse/opencv*.whl
196-
197-
build_macos:
85+
build:
19886
runs-on: ${{ matrix.os }}
19987
defaults:
20088
run:
@@ -203,7 +91,7 @@ jobs:
20391
strategy:
20492
fail-fast: false
20593
matrix:
206-
os: [macos-latest]
94+
os: [ubuntu-latest, macos-latest]
20795
python-version: [3.6, 3.7, 3.8, 3.9]
20896
platform: [x64]
20997
with_contrib: [0, 1]
@@ -387,7 +275,7 @@ jobs:
387275

388276
release:
389277
if: startsWith(github.ref, 'refs/tags/v')
390-
needs: [build_linux, build_macos, build-windows-x86_64, build_sdist]
278+
needs: [build, build-windows-x86_64, build_sdist]
391279
runs-on: ubuntu-latest
392280
defaults:
393281
run:

0 commit comments

Comments
 (0)