Skip to content

Commit

Permalink
first attempt at cibuildwheel with appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
a-hurst committed Oct 18, 2018
1 parent 440cd49 commit 46298ca
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
18 changes: 10 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,39 @@ environment:
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "32"
NUMPY_VERSION: "stable"
BUILDMODE: "CI-HELPERS"

- PYTHON: "C:\\Python27_64"
PYTHON_VERSION: "2.7"
PYTHON_ARCH: "64"
NUMPY_VERSION: "stable"
BUILDMODE: "CI-HELPERS"

- PYTHON: "C:\\Python36_32"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "32"
NUMPY_VERSION: "stable"
BUILDMODE: "CI-HELPERS"

- PYTHON: "C:\\Python36_64"
PYTHON_VERSION: "3.6"
PYTHON_ARCH: "64"
NUMPY_VERSION: "stable"
BUILDMODE: "CI-HELPERS"

- BUILDMODE: "CIBUILDWHEEL"
CIBW_TEST_REQUIRES: "numpy pillow"
CIBW_TEST_COMMAND: "python {project}\\selftest.py"

install:
- "git clone --depth 1 git://github.com/astropy/ci-helpers.git"
- "powershell ci-helpers/appveyor/install-miniconda.ps1"
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- "activate test"
- CALL ci\appveyor-install.bat

build: false # Not a C# project, build stuff at the test step instead.

test_script:
- "%CMD_IN_ENV% pip install -e ."
- "%CMD_IN_ENV% python selftest.py"
- CALL ci\appveyor-build.bat

after_test:
# If tests are successful, create a whl package for the project.
- "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst"
- ps: "ls dist"

artifacts:
Expand Down
12 changes: 12 additions & 0 deletions ci/appveyor-build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@ECHO OFF
SETLOCAL

IF /I "%BUILDMODE"=="CI-HELPERS" (
%CMD_IN_ENV% pip install -e .
%CMD_IN_ENV% python selftest.py
IF %ERRORLEVEL% EQU 0 (
%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst
)
) ELSE (
cibuildwheel --output-dir dist
)
11 changes: 11 additions & 0 deletions ci/appveyor-install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@ECHO OFF
SETLOCAL

IF /I "%BUILDMODE"=="CI-HELPERS" (
git clone --depth 1 git://github.com/astropy/ci-helpers.git
powershell ci-helpers/appveyor/install-miniconda.ps1
SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
activate test
) ELSE (
pip install cibuildwheel==0.10.0
)

0 comments on commit 46298ca

Please sign in to comment.