Skip to content

Commit c7a05d3

Browse files
committed
Test secrets usage
1 parent 0022232 commit c7a05d3

File tree

1 file changed

+159
-156
lines changed

1 file changed

+159
-156
lines changed

.github/workflows/build_wheels.yml

Lines changed: 159 additions & 156 deletions
Original file line numberDiff line numberDiff line change
@@ -4,166 +4,168 @@ on:
44
pull_request:
55
branches:
66
- master
7+
push:
8+
branches:
79
release:
810
types: [published, edited]
911

1012

1113
jobs:
12-
build-windows-x86_64:
13-
runs-on: ${{ matrix.os }}
14-
defaults:
15-
run:
16-
shell: powershell
17-
18-
strategy:
19-
fail-fast: false
20-
matrix:
21-
os: [windows-latest]
22-
python-version: [3.6, 3.7, 3.8, 3.9]
23-
platform: [x86, x64]
24-
with_contrib: [0, 1]
25-
without_gui: [0, 1]
26-
build_sdist: [0]
27-
28-
env:
29-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
30-
SDIST: ${{ matrix.build_sdist || 0}}
31-
ENABLE_HEADLESS: ${{ matrix.without_gui }}
32-
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
33-
34-
steps:
35-
- name: Checkout
36-
uses: actions/checkout@v2
37-
with:
38-
submodules: true
39-
fetch-depth: 0
40-
41-
- name: Update submodules
42-
run: |
43-
git submodule update --remote
44-
45-
- name: Set up Python ${{ matrix.python-version }}
46-
uses: actions/setup-python@v2
47-
with:
48-
python-version: ${{ matrix.python-version }}
49-
architecture: ${{ matrix.platform }}
50-
51-
- name: Setup MSBuild.exe
52-
uses: warrenbuckley/Setup-MSBuild@v1
53-
54-
- name: build script
55-
run: |
56-
python --version
57-
python -m pip install --upgrade pip
58-
python -m pip install --upgrade setuptools
59-
set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\wheelhouse . --verbose
60-
shell: cmd
61-
62-
- name: before test
63-
run: |
64-
cd ${{ github.workspace }}/tests
65-
&python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
66-
if ($LastExitCode -ne 0) {throw $LastExitCode}
67-
shell: powershell
68-
69-
- name: run test
70-
run: |
71-
cd ${{ github.workspace }}/tests
72-
python -m unittest test
73-
shell: cmd
74-
75-
- name: saving artifacts
76-
uses: actions/upload-artifact@v2
77-
with:
78-
name: wheels
79-
path: wheelhouse/opencv*.whl
80-
81-
build:
82-
runs-on: ${{ matrix.os }}
83-
defaults:
84-
run:
85-
shell: bash
86-
87-
strategy:
88-
fail-fast: false
89-
matrix:
90-
os: [ubuntu-latest, macos-latest]
91-
python-version: [3.6, 3.7, 3.8, 3.9]
92-
platform: [x64]
93-
with_contrib: [0, 1]
94-
without_gui: [0, 1]
95-
build_sdist: [0]
96-
97-
env:
98-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
99-
REPO_DIR: .
100-
BUILD_COMMIT: master
101-
PROJECT_SPEC: opencv-python
102-
MB_PYTHON_VERSION: ${{ matrix.python-version }}
103-
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
104-
MB_ML_VER: 2014
105-
NP_TEST_DEP: numpy
106-
TRAVIS_BUILD_DIR: ${{ github.workspace }}
107-
CONFIG_PATH: travis_config.sh
108-
DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
109-
USE_CCACHE: 1
110-
UNICODE_WIDTH: 32
111-
SDIST: ${{ matrix.build_sdist || 0}}
112-
ENABLE_HEADLESS: ${{ matrix.without_gui }}
113-
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
114-
115-
steps:
116-
- name: Checkout
117-
uses: actions/checkout@v2
118-
with:
119-
submodules: true
120-
fetch-depth: 0
121-
122-
- name: Update submodules
123-
run: |
124-
git submodule update --remote
125-
126-
- name: Set up Python ${{ matrix.python-version }}
127-
uses: actions/setup-python@v2
128-
if: ${{ 'macos-latest' == matrix.os }}
129-
with:
130-
python-version: ${{ matrix.python-version }}
131-
architecture: ${{ matrix.platform }}
132-
133-
- name: Setup Environment variables
134-
run: |
135-
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
136-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
137-
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
138-
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
139-
if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
140-
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
141-
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
142-
143-
- name: before install
144-
run: |
145-
set -e
146-
# Check out and prepare the source
147-
# Multibuild doesn't have releases, so --depth would break eventually (see
148-
# https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
149-
git submodule update --init multibuild
150-
source multibuild/common_utils.sh
151-
# https://github.com/matthew-brett/multibuild/issues/116
152-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
153-
source multibuild/travis_steps.sh
154-
# This sets -x
155-
# source travis_multibuild_customize.sh
156-
echo $ENABLE_CONTRIB > contrib.enabled
157-
echo $ENABLE_HEADLESS > headless.enabled
158-
set -x
159-
build_wheel $REPO_DIR $PLAT
160-
install_run $PLAT
161-
set +x
162-
- name: saving artifacts
163-
uses: actions/upload-artifact@v2
164-
with:
165-
name: wheels
166-
path: wheelhouse/opencv*.whl
14+
# build-windows-x86_64:
15+
# runs-on: ${{ matrix.os }}
16+
# defaults:
17+
# run:
18+
# shell: powershell
19+
20+
# strategy:
21+
# fail-fast: false
22+
# matrix:
23+
# os: [windows-latest]
24+
# python-version: [3.6, 3.7, 3.8, 3.9]
25+
# platform: [x86, x64]
26+
# with_contrib: [0, 1]
27+
# without_gui: [0, 1]
28+
# build_sdist: [0]
29+
30+
# env:
31+
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
32+
# SDIST: ${{ matrix.build_sdist || 0}}
33+
# ENABLE_HEADLESS: ${{ matrix.without_gui }}
34+
# ENABLE_CONTRIB: ${{ matrix.with_contrib }}
35+
36+
# steps:
37+
# - name: Checkout
38+
# uses: actions/checkout@v2
39+
# with:
40+
# submodules: true
41+
# fetch-depth: 0
42+
43+
# - name: Update submodules
44+
# run: |
45+
# git submodule update --remote
46+
47+
# - name: Set up Python ${{ matrix.python-version }}
48+
# uses: actions/setup-python@v2
49+
# with:
50+
# python-version: ${{ matrix.python-version }}
51+
# architecture: ${{ matrix.platform }}
52+
53+
# - name: Setup MSBuild.exe
54+
# uses: warrenbuckley/Setup-MSBuild@v1
55+
56+
# - name: build script
57+
# run: |
58+
# python --version
59+
# python -m pip install --upgrade pip
60+
# python -m pip install --upgrade setuptools
61+
# set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\wheelhouse . --verbose
62+
# shell: cmd
63+
64+
# - name: before test
65+
# run: |
66+
# cd ${{ github.workspace }}/tests
67+
# &python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
68+
# if ($LastExitCode -ne 0) {throw $LastExitCode}
69+
# shell: powershell
70+
71+
# - name: run test
72+
# run: |
73+
# cd ${{ github.workspace }}/tests
74+
# python -m unittest test
75+
# shell: cmd
76+
77+
# - name: saving artifacts
78+
# uses: actions/upload-artifact@v2
79+
# with:
80+
# name: wheels
81+
# path: wheelhouse/opencv*.whl
82+
83+
# build:
84+
# runs-on: ${{ matrix.os }}
85+
# defaults:
86+
# run:
87+
# shell: bash
88+
89+
# strategy:
90+
# fail-fast: false
91+
# matrix:
92+
# os: [ubuntu-latest, macos-latest]
93+
# python-version: [3.6, 3.7, 3.8, 3.9]
94+
# platform: [x64]
95+
# with_contrib: [0, 1]
96+
# without_gui: [0, 1]
97+
# build_sdist: [0]
98+
99+
# env:
100+
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
101+
# REPO_DIR: .
102+
# BUILD_COMMIT: master
103+
# PROJECT_SPEC: opencv-python
104+
# MB_PYTHON_VERSION: ${{ matrix.python-version }}
105+
# TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
106+
# MB_ML_VER: 2014
107+
# NP_TEST_DEP: numpy
108+
# TRAVIS_BUILD_DIR: ${{ github.workspace }}
109+
# CONFIG_PATH: travis_config.sh
110+
# DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT}
111+
# USE_CCACHE: 1
112+
# UNICODE_WIDTH: 32
113+
# SDIST: ${{ matrix.build_sdist || 0}}
114+
# ENABLE_HEADLESS: ${{ matrix.without_gui }}
115+
# ENABLE_CONTRIB: ${{ matrix.with_contrib }}
116+
117+
# steps:
118+
# - name: Checkout
119+
# uses: actions/checkout@v2
120+
# with:
121+
# submodules: true
122+
# fetch-depth: 0
123+
124+
# - name: Update submodules
125+
# run: |
126+
# git submodule update --remote
127+
128+
# - name: Set up Python ${{ matrix.python-version }}
129+
# uses: actions/setup-python@v2
130+
# if: ${{ 'macos-latest' == matrix.os }}
131+
# with:
132+
# python-version: ${{ matrix.python-version }}
133+
# architecture: ${{ matrix.platform }}
134+
135+
# - name: Setup Environment variables
136+
# run: |
137+
# if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
138+
# if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
139+
# if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
140+
# if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
141+
# if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
142+
# echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
143+
# echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
144+
145+
# - name: before install
146+
# run: |
147+
# set -e
148+
# # Check out and prepare the source
149+
# # Multibuild doesn't have releases, so --depth would break eventually (see
150+
# # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
151+
# git submodule update --init multibuild
152+
# source multibuild/common_utils.sh
153+
# # https://github.com/matthew-brett/multibuild/issues/116
154+
# if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
155+
# source multibuild/travis_steps.sh
156+
# # This sets -x
157+
# # source travis_multibuild_customize.sh
158+
# echo $ENABLE_CONTRIB > contrib.enabled
159+
# echo $ENABLE_HEADLESS > headless.enabled
160+
# set -x
161+
# build_wheel $REPO_DIR $PLAT
162+
# install_run $PLAT
163+
# set +x
164+
# - name: saving artifacts
165+
# uses: actions/upload-artifact@v2
166+
# with:
167+
# name: wheels
168+
# path: wheelhouse/opencv*.whl
167169

168170

169171
build_sdist:
@@ -247,7 +249,8 @@ jobs:
247249
test_release_opencv_python_all:
248250
needs: [build, build-windows-x86_64, build_sdist]
249251
runs-on: ubuntu-latest
250-
environment: test-opencv-python-release
252+
environment:
253+
name: test-opencv-python-release
251254
steps:
252255
- uses: actions/download-artifact@v2
253256
with:

0 commit comments

Comments
 (0)