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

Commit 6d5e867

Browse files
committed
refactoring
1 parent 9082c52 commit 6d5e867

File tree

3 files changed

+28
-65
lines changed

3 files changed

+28
-65
lines changed

azure-pipelines.yml

+7-48
Original file line numberDiff line numberDiff line change
@@ -16,55 +16,14 @@ variables:
1616
jobs:
1717
- template: azure/windows.yml
1818
parameters:
19-
name: windows2017
20-
vmImage: vs2017-win2016
19+
name: windows
20+
os: windows-latest
2121
matrix:
22-
py_3.6_32:
23-
PYTHON_VERSION: "3.6.x"
24-
PYTHON_ARCH: "x86"
25-
BITS: 32
26-
pypy_3.6_32:
27-
PYTHON_VERSION: "PyPy3.6"
28-
PYTHON_ARCH: "x86"
29-
BITS: 32
30-
EXTRA_ARGV: "'-m', 'not slow'"
31-
py_3.6_64:
32-
PYTHON_VERSION: "3.6.x"
33-
PYTHON_ARCH: 'x64'
34-
BITS: 64
35-
py_3.7_32:
36-
PYTHON_VERSION: "3.7.x"
37-
PYTHON_ARCH: "x86"
38-
BITS: 32
39-
py_3.7_64:
40-
PYTHON_VERSION: "3.7.x"
41-
PYTHON_ARCH: 'x64'
42-
BITS: 64
43-
py_3.8_32:
44-
PYTHON_VERSION: "3.8.x"
45-
PYTHON_ARCH: "x86"
46-
BITS: 32
47-
py_3.8_64:
48-
PYTHON_VERSION: "3.8.x"
49-
PYTHON_ARCH: 'x64'
50-
BITS: 64
51-
52-
- template: azure/windows.yml
53-
parameters:
54-
name: windows2019
55-
vmImage: windows-2019
56-
matrix:
57-
py_3.9_32:
58-
# Will use the latest up to 3.9.0
59-
PYTHON_VERSION: "'3.9.0-alpha - 3.9.0'"
60-
PYTHON_ARCH: "x86"
61-
BITS: 32
62-
py_3.9_64:
63-
# Will use the latest up to 3.9.0
64-
PYTHON_VERSION: "'3.9.0-alpha - 3.9.0'"
65-
PYTHON_ARCH: 'x64'
66-
BITS: 64
67-
22+
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
23+
architecture: [x86, x64]
24+
exclude:
25+
- python-version: pypy3
26+
architecture: x64
6827

6928
- template: azure/posix.yml
7029
parameters:

azure/posix.yml

+8
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ jobs:
2323
- checkout: self
2424
submodules: true
2525

26+
- bash |
27+
set -ex
28+
echo AZURE_PYTHON_VERSION ${{ variables.AZURE_PYTHON_VERSION }}
29+
echo MB_PYTHON_VERSION ${{ variables.MB_PYTHON_VERSION }}
30+
echo coalesce ${{ coalesce(variables.AZURE_PYTHON_VERSION, variables.MB_PYTHON_VERSION) }}
31+
displayName: DEBUG - erase me
32+
33+
2634
- task: UsePythonVersion@0
2735
inputs:
2836
versionSpec: ${{ coalesce(variables.AZURE_PYTHON_VERSION, variables.MB_PYTHON_VERSION) }}

azure/windows.yml

+13-17
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ jobs:
1717
steps:
1818
- checkout: self
1919
submodules: true
20-
21-
- task: UsePythonVersion@0
22-
inputs:
23-
versionSpec: $(PYTHON_VERSION)
24-
addToPath: true
25-
architecture: $(PYTHON_ARCH)
26-
displayName: Set python version
27-
condition: not(contains(variables['PYTHON_VERSION'], 'PyPy'))
20+
- uses: actions/checkout@v2
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
architecture: ${{ matrix.architecture }}
26+
condition: ${{ not( contains( matrix.python-version , 'PyPy')) }}
2827

2928
- powershell: |
3029
$url = "http://buildbot.pypy.org/nightly/py3.6/pypy-c-jit-latest-win32.zip"
@@ -41,12 +40,11 @@ jobs:
4140
setx PATH $env:Path
4241
python -mensurepip
4342
echo "##vso[task.prependpath]$pypypath"
44-
condition: contains(variables['PYTHON_VERSION'], 'PyPy')
43+
condition: ${{ contains( matrix.python-version , 'PyPy') }}
4544
displayName: "Install PyPy pre-release"
4645
4746
- bash: |
4847
set -e
49-
echo PYTHON $PYTHON_VERSION $PYTHON_ARCH
5048
echo Build Reason: $BUILD_REASON
5149
python --version
5250
python -c "import struct; print(struct.calcsize('P') * 8)"
@@ -75,8 +73,12 @@ jobs:
7573
7674
- powershell: |
7775
choco install -y mingw --forcex86 --force --version=7.3.0
76+
echo "##vso[task.setvariable variable=CFLAGS]-m32"
77+
echo "##vso[task.setvariable variable=LDFLAGS]-m32"
78+
$mingwpath = "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw$(BITS)\\bin;" + $env:PATH
79+
echo "##vso[task.prependpath]$mingwpath"
7880
displayName: 'Install 32-bit mingw for 32-bit builds'
79-
condition: eq(variables['BITS'], 32)
81+
condition: ${{ eq( matrix.architecture , 'x86') }}
8082
8183
- bash: |
8284
set -xe
@@ -102,12 +104,6 @@ jobs:
102104
displayName: Prepare the build
103105
104106
- powershell: |
105-
If ($(BITS) -eq 32) {
106-
$env:CFLAGS = "-m32"
107-
$env:LDFLAGS = "-m32"
108-
$env:PATH = "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw$(BITS)\\bin;" + $env:PATH
109-
refreshenv
110-
}
111107
# Build the wheel
112108
pushd numpy
113109
python setup.py build

0 commit comments

Comments
 (0)