Skip to content

Commit 1065b2f

Browse files
committed
Merge branch 'fix(appveyor)'
2 parents 2c95cca + cdf65f1 commit 1065b2f

File tree

5 files changed

+46
-18
lines changed

5 files changed

+46
-18
lines changed

.appveyor/build.ps1

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $env:project_directory = (Get-Item -Path ".\" -Verbose).FullName
1818
Write-Host "Project directory: $($env:project_directory)"
1919

2020
# Build Package
21-
conda build .conda-recipe --dirty --croot bld -m .conda-recipe\variants.yaml
21+
conda build .conda-recipe --dirty --croot bld
2222
$exit_code = $?
2323
echo $exit_code
2424
if (!$exit_code) { $build_status = "Failed Conda Build Stage" }
@@ -46,6 +46,16 @@ echo $build_status > BUILD_STATUS
4646
# Set exit code to 1 if package(s) weren't built.
4747
if (!$packages_built) { exit 1 }
4848

49+
# Check for broken packages.
50+
Get-ChildItem bld\*\*.tar.bz2 | `
51+
Select-Object Name, @{ n = 'Folder'; e = { Convert-Path $_.PSParentPath } },
52+
@{ n = 'Foldername'; e = { ($_.PSPath -split '[\\]')[-2] } },
53+
FullName | ForEach {
54+
if ($_.Foldername -eq "broken") {
55+
exit 1
56+
}
57+
}
58+
4959
# Prepend platform (i.e., `win-32`, `win-64`, `noarch`) to each package filename
5060
# and collect package files in `artifacts` directory.
5161
md artifacts
@@ -54,5 +64,7 @@ Get-ChildItem bld\*\*.tar.bz2 | `
5464
@{ n = 'Foldername'; e = { ($_.PSPath -split '[\\]')[-2] } },
5565
FullName | ForEach {
5666
echo "$($_.FullName.Trim()) -> artifacts\$($_.Foldername)-$($_.Name)"
67+
# Upload to `nadamq` Anaconda Cloud channel (only non-broken packages).
68+
anaconda -t $env:anaconda_token upload -u nadamq $_.FullName.Trim()
5769
mv $($_.FullName.Trim()) artifacts\$($_.Foldername)-$($_.Name)
5870
}

.appveyor/install.ps1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,18 @@ conda install -n root -c pscondaenvs pscondaenvs
2424
conda update -q conda
2525
conda install --yes conda-build anaconda-client nose
2626

27-
# Create and activate new project environment
28-
conda create --name $env:APPVEYOR_PROJECT_NAME python
27+
# Create new project environment
28+
conda create --name $env:APPVEYOR_PROJECT_NAME python anaconda-client
29+
30+
# Use patch (from `conda-build`) to support Appveyor Python 2.7 win-64 build.
31+
if ($env:ARCH -eq "x64") {
32+
conda install --yes curl 7za
33+
activate
34+
# Download patch to support Appveyor Python 2.7 win-64 build.
35+
cmd /C curl -L -o conda-build-3.7.1.zip https://github.com/conda/conda-build/archive/3.7.1.zip
36+
# Extract patch.
37+
7za x .\conda-build-3.7.1.zip conda-build-3.7.1\ci\appveyor
38+
# Apply patch.
39+
& conda-build-3.7.1\ci\appveyor\setup_x64.bat
40+
copy "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\amd64\vcvarsamd64.bat"
41+
}

.conda-recipe/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ build:
5656

5757
requirements:
5858
build:
59-
#: .. versionadded:: 0.15
60-
- {{ compiler('c') }}
6159
- ragel >=6.10
6260
- msinttypes # [win and py2k]
6361

@@ -92,6 +90,9 @@ outputs:
9290
noarch: generic
9391
files:
9492
- share
93+
requirements:
94+
run:
95+
- c-array-defs >=1.3
9596
- name: nadamq
9697
files:
9798
- Lib/site-packages/{{ MODULE_NAME }}
@@ -102,7 +103,6 @@ outputs:
102103
- future
103104
#: .. versionchanged:: 0.15
104105
- python
105-
- c-array-defs >=1.3
106106
- numpy
107107
#: .. versionadded:: 0.14
108108
- or-event >=0.2.1

.conda-recipe/variants.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

appveyor.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,26 @@ init:
1818
1919
Write-Host $env:PATH
2020
environment:
21+
anaconda_token:
22+
secure: ZpLQ+IMirVuHrEkZPevDFTZ4AeUuDtLm5d4KTCwgI5oIB5eJxP5OLDYFKwud7K89
2123
CONDA_EXTRA_CHANNELS: cfobel
2224
matrix:
23-
- PYTHON_VERSION: 3.6
24-
MINICONDA: C:\Miniconda3
25+
- PYTHON_VERSION: 2.7
26+
MINICONDA: C:\Miniconda-x64
27+
ARCH: x64
28+
PYTHON_ARCH: 64
29+
- PYTHON_VERSION: 2.7
30+
MINICONDA: C:\Miniconda
2531
PYTHON_ARCH: 32
32+
ARCH: Win32
2633
- PYTHON_VERSION: 3.6
27-
MINICONDA: C:\Miniconda3-x64
34+
MINICONDA: C:\Miniconda36-x64
35+
ARCH: x64
2836
PYTHON_ARCH: 64
37+
- PYTHON_VERSION: 3.6
38+
MINICONDA: C:\Miniconda36
39+
ARCH: Win32
40+
PYTHON_ARCH: 32
2941
install:
3042
- ps: .appveyor/install.ps1
3143
build_script:

0 commit comments

Comments
 (0)