Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit bdc98f8

Browse files
authored
Merge pull request #78 from MacPython/azure-pipelines2
Use Azure Pipelines and upload to anaconda
2 parents 0e39420 + bdbadcb commit bdc98f8

10 files changed

+571
-168
lines changed

.appveyor.yml

+4-163
Original file line numberDiff line numberDiff line change
@@ -1,169 +1,10 @@
1-
# As config was originally based on an example by Olivier Grisel. Thanks!
2-
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
3-
clone_depth: 50
1+
image: Ubuntu
42

5-
# No reason for us to restrict the number concurrent jobs
6-
max_jobs: 100
7-
8-
cache:
9-
- '%LOCALAPPDATA%\pip\Cache'
10-
11-
environment:
12-
global:
13-
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
14-
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
15-
16-
CYTHON_BUILD_DEP: Cython
17-
TEST_MODE: fast
18-
APPVEYOR_SAVE_CACHE_ON_ERROR: true
19-
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
20-
WHEELHOUSE_UPLOADER_USERNAME: travis-worker
21-
WHEELHOUSE_UPLOADER_SECRET:
22-
secure:
23-
9s0gdDGnNnTt7hvyNpn0/ZzOMGPdwPp2SewFTfGzYk7uI+rdAN9rFq2D1gAP4NQh
24-
BUILD_COMMIT: e94cec800304a6a467cf90ce4e7d3e207770b4b4
25-
DAILY_COMMIT: master
26-
27-
matrix:
28-
- PYTHON: C:\Python36
29-
PYTHON_VERSION: 3.6
30-
PYTHON_ARCH: 32
31-
32-
- PYTHON: C:\Python36-x64
33-
PYTHON_VERSION: 3.6
34-
PYTHON_ARCH: 64
35-
36-
- PYTHON: C:\Python37
37-
PYTHON_VERSION: 3.7
38-
PYTHON_ARCH: 32
39-
40-
- PYTHON: C:\Python37-x64
41-
PYTHON_VERSION: 3.7
42-
PYTHON_ARCH: 64
43-
44-
- PYTHON: C:\Python38
45-
PYTHON_VERSION: 3.8
46-
PYTHON_ARCH: 32
47-
48-
- PYTHON: C:\Python38-x64
49-
PYTHON_VERSION: 3.8
50-
PYTHON_ARCH: 64
51-
52-
53-
init:
54-
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
55-
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
56-
- ps: >-
57-
if ($env:APPVEYOR_REPO_BRANCH -eq "master") {
58-
$env:CONTAINER = "pre-release"
59-
if ($env:DAILY_COMMIT) { $env:BUILD_COMMIT = $env:DAILY_COMMIT }
60-
$env:NPY_RELAXED_STRIDES_DEBUG = 1
61-
} else {
62-
$env:CONTAINER = "wheels"
63-
$env:UPLOAD_ARGS = "--no-update-index"
64-
}
653
install:
66-
- cmd: echo "Filesystem root:"
67-
- dir C:\
68-
69-
- echo "Installed SDKs:"
70-
- dir "C:/Program Files/Microsoft SDKs/Windows"
71-
72-
# Get needed submodules
73-
- git submodule update --init
74-
75-
# Install new Python if necessary
76-
- ps: .\multibuild\install_python.ps1
77-
78-
# Prepend required Python to the PATH of this build (this cannot be
79-
# done from inside the powershell script as it would require to restart
80-
# the parent CMD process).
81-
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
82-
83-
# Check that we have the expected version and architecture for Python
84-
- python --version
85-
- >-
86-
python -c "import sys,platform,struct;
87-
print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )"
88-
89-
# Upgrade to the latest pip, setuptools, and wheel.
90-
- python -m pip install -U pip setuptools wheel urllib3
91-
92-
# Download and install static "openblas.a" to PYTHON\lib
93-
- ps: |
94-
$PYTHON = $env:PYTHON
95-
$lib = python numpy/tools/openblas_support.py
96-
$destination = "$PYTHON\lib\openblas.a"
97-
echo $lib
98-
cp $lib $destination
99-
ls $destination
100-
101-
# Install build requirements.
102-
- pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile"
103-
104-
build_script:
105-
- cd numpy
106-
- git checkout %BUILD_COMMIT%
107-
# Create _distributor_init.py
108-
- cd ..
109-
- python -c "import openblas_support; openblas_support.make_init('numpy/numpy')"
110-
- cd numpy
111-
# Append license text relevant for the built wheel
112-
- type ..\LICENSE_win32.txt >> LICENSE.txt
113-
- ps: |
114-
$PYTHON_ARCH = $env:PYTHON_ARCH
115-
If ($PYTHON_ARCH -eq 32) {
116-
$MINGW = $env:MINGW_32
117-
} Else {
118-
$MINGW = $env:MINGW_64
119-
}
120-
$env:Path += ";$MINGW"
121-
$env:NPY_NUM_BUILD_JOBS = "4"
122-
- python setup.py bdist_wheel
123-
- ps: |
124-
# Upload artifact to Appveyor immediately after build
125-
ls dist -r | Foreach-Object {
126-
appveyor PushArtifact $_.FullName
127-
pip install $_.FullName
128-
}
4+
- echo done
1295

1306
test_script:
131-
- pip install pytest hypothesis
132-
- cd ..
133-
- python check_license.py
134-
- mkdir tmp_for_test
135-
- cd tmp_for_test
136-
- pytest --pyargs numpy
137-
- cd ..
7+
- echo done
1388

139-
after_test:
140-
# Upload test results to Appveyor
141-
- ps: |
142-
If (Test-Path .\junit-results.xml) {
143-
(new-object net.webclient).UploadFile(
144-
"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)",
145-
(Resolve-Path .\junit-results.xml)
146-
)
147-
}
148-
$LastExitCode = 0
149-
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
150-
#
151-
# If the cache limit is reached, the cache will not be updated (of not even
152-
# created in the first run). So this is a trade of between keeping the cache
153-
# current and having a cache at all.
154-
# NB: This is done only `on_success` since the cache in uploaded only on
155-
# success anyway.
156-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
157-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
158-
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
159-
# Show size of cache
160-
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
9+
build: off
16110

162-
on_success:
163-
# Upload the generated wheel package to Rackspace
164-
- cd numpy
165-
- pip install wheelhouse-uploader certifi
166-
- python -m wheelhouse_uploader upload
167-
--local-folder=dist
168-
%UPLOAD_ARGS%
169-
%CONTAINER%

.appveyor.yml.back

+169
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
1+
# As config was originally based on an example by Olivier Grisel. Thanks!
2+
# https://github.com/ogrisel/python-appveyor-demo/blob/master/appveyor.yml
3+
clone_depth: 50
4+
5+
# No reason for us to restrict the number concurrent jobs
6+
max_jobs: 100
7+
8+
cache:
9+
- '%LOCALAPPDATA%\pip\Cache'
10+
11+
environment:
12+
global:
13+
MINGW_32: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin
14+
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
15+
16+
CYTHON_BUILD_DEP: Cython
17+
TEST_MODE: fast
18+
APPVEYOR_SAVE_CACHE_ON_ERROR: true
19+
APPVEYOR_SKIP_FINALIZE_ON_EXIT: true
20+
WHEELHOUSE_UPLOADER_USERNAME: travis-worker
21+
WHEELHOUSE_UPLOADER_SECRET:
22+
secure:
23+
9s0gdDGnNnTt7hvyNpn0/ZzOMGPdwPp2SewFTfGzYk7uI+rdAN9rFq2D1gAP4NQh
24+
BUILD_COMMIT: e94cec800304a6a467cf90ce4e7d3e207770b4b4
25+
DAILY_COMMIT: master
26+
27+
matrix:
28+
- PYTHON: C:\Python36
29+
PYTHON_VERSION: 3.6
30+
PYTHON_ARCH: 32
31+
32+
- PYTHON: C:\Python36-x64
33+
PYTHON_VERSION: 3.6
34+
PYTHON_ARCH: 64
35+
36+
- PYTHON: C:\Python37
37+
PYTHON_VERSION: 3.7
38+
PYTHON_ARCH: 32
39+
40+
- PYTHON: C:\Python37-x64
41+
PYTHON_VERSION: 3.7
42+
PYTHON_ARCH: 64
43+
44+
- PYTHON: C:\Python38
45+
PYTHON_VERSION: 3.8
46+
PYTHON_ARCH: 32
47+
48+
- PYTHON: C:\Python38-x64
49+
PYTHON_VERSION: 3.8
50+
PYTHON_ARCH: 64
51+
52+
53+
init:
54+
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
55+
- "ECHO \"%APPVEYOR_SCHEDULED_BUILD%\""
56+
- ps: >-
57+
if ($env:APPVEYOR_REPO_BRANCH -eq "master") {
58+
$env:CONTAINER = "pre-release"
59+
if ($env:DAILY_COMMIT) { $env:BUILD_COMMIT = $env:DAILY_COMMIT }
60+
$env:NPY_RELAXED_STRIDES_DEBUG = 1
61+
} else {
62+
$env:CONTAINER = "wheels"
63+
$env:UPLOAD_ARGS = "--no-update-index"
64+
}
65+
install:
66+
- cmd: echo "Filesystem root:"
67+
- dir C:\
68+
69+
- echo "Installed SDKs:"
70+
- dir "C:/Program Files/Microsoft SDKs/Windows"
71+
72+
# Get needed submodules
73+
- git submodule update --init
74+
75+
# Install new Python if necessary
76+
- ps: .\multibuild\install_python.ps1
77+
78+
# Prepend required Python to the PATH of this build (this cannot be
79+
# done from inside the powershell script as it would require to restart
80+
# the parent CMD process).
81+
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
82+
83+
# Check that we have the expected version and architecture for Python
84+
- python --version
85+
- >-
86+
python -c "import sys,platform,struct;
87+
print(sys.platform, platform.machine(), struct.calcsize('P') * 8, )"
88+
89+
# Upgrade to the latest pip, setuptools, and wheel.
90+
- python -m pip install -U pip setuptools wheel urllib3
91+
92+
# Download and install static "openblas.a" to PYTHON\lib
93+
- ps: |
94+
$PYTHON = $env:PYTHON
95+
$lib = python numpy/tools/openblas_support.py
96+
$destination = "$PYTHON\lib\openblas.a"
97+
echo $lib
98+
cp $lib $destination
99+
ls $destination
100+
101+
# Install build requirements.
102+
- pip install "%CYTHON_BUILD_DEP%" --install-option="--no-cython-compile"
103+
104+
build_script:
105+
- cd numpy
106+
- git checkout %BUILD_COMMIT%
107+
# Create _distributor_init.py
108+
- cd ..
109+
- python -c "import openblas_support; openblas_support.make_init('numpy/numpy')"
110+
- cd numpy
111+
# Append license text relevant for the built wheel
112+
- type ..\LICENSE_win32.txt >> LICENSE.txt
113+
- ps: |
114+
$PYTHON_ARCH = $env:PYTHON_ARCH
115+
If ($PYTHON_ARCH -eq 32) {
116+
$MINGW = $env:MINGW_32
117+
} Else {
118+
$MINGW = $env:MINGW_64
119+
}
120+
$env:Path += ";$MINGW"
121+
$env:NPY_NUM_BUILD_JOBS = "4"
122+
- python setup.py bdist_wheel
123+
- ps: |
124+
# Upload artifact to Appveyor immediately after build
125+
ls dist -r | Foreach-Object {
126+
appveyor PushArtifact $_.FullName
127+
pip install $_.FullName
128+
}
129+
130+
test_script:
131+
- pip install pytest hypothesis
132+
- cd ..
133+
- python check_license.py
134+
- mkdir tmp_for_test
135+
- cd tmp_for_test
136+
- pytest --pyargs numpy
137+
- cd ..
138+
139+
after_test:
140+
# Upload test results to Appveyor
141+
- ps: |
142+
If (Test-Path .\junit-results.xml) {
143+
(new-object net.webclient).UploadFile(
144+
"https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)",
145+
(Resolve-Path .\junit-results.xml)
146+
)
147+
}
148+
$LastExitCode = 0
149+
# Remove old or huge cache files to hopefully not exceed the 1GB cache limit.
150+
#
151+
# If the cache limit is reached, the cache will not be updated (of not even
152+
# created in the first run). So this is a trade of between keeping the cache
153+
# current and having a cache at all.
154+
# NB: This is done only `on_success` since the cache in uploaded only on
155+
# success anyway.
156+
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -mtime +360 -delete
157+
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -type f -size +10M -delete
158+
- C:\cygwin\bin\find "%LOCALAPPDATA%\pip" -empty -delete
159+
# Show size of cache
160+
- C:\cygwin\bin\du -hs "%LOCALAPPDATA%\pip\Cache"
161+
162+
on_success:
163+
# Upload the generated wheel package to Rackspace
164+
- cd numpy
165+
- pip install wheelhouse-uploader certifi
166+
- python -m wheelhouse_uploader upload
167+
--local-folder=dist
168+
%UPLOAD_ARGS%
169+
%CONTAINER%
File renamed without changes.

0 commit comments

Comments
 (0)