.appveyor.yml: use powershell to upload and install wheel
[aubio.git] / .appveyor.yml
index cb3ef4c..efd3790 100644 (file)
@@ -44,29 +44,36 @@ install:
   - ECHO "Installed SDKs:"
   - ps: "ls \"C:/Program Files/Microsoft SDKs/Windows\""
 
+  - "SET PATH=%PYTHONDIR%;%PYTHONDIR%\\Scripts;%PATH%"
+
   # Check that we have the expected version and architecture for Python
-  - "%PYTHONDIR%\\python.exe --version"
-  - "%PYTHONDIR%\\python.exe -c \"import struct; print(struct.calcsize('P') * 8)\""
+  - "python --version"
+  - "python -c \"import struct; print(struct.calcsize('P') * 8)\""
 
-  - "%PYTHONDIR%\\python.exe -m pip install --disable-pip-version-check --user --upgrade pip"
-  - "%PYTHONDIR%\\python.exe -m pip install --upgrade setuptools"
+  - "python -m pip install --disable-pip-version-check --user --upgrade pip"
+  - "python -m pip install --upgrade setuptools"
 
   # We need wheel installed to build wheels
-  - "%PYTHONDIR%\\python.exe -m pip install wheel"
+  - "python -m pip install wheel"
 
-  - "SET PATH=%PYTHONDIR%;%PYTHONDIR%\\Scripts;%PATH%"
+  - "pip install -r requirements.txt"
 
 before_build:
   - "bash scripts/get_waf.sh"
 
 build_script:
+  # also build libaubio with waf
+  - python waf distclean configure build install --verbose --msvc_version="msvc 14.0"
   # build python module without using libaubio
-  - "%PYTHONDIR%\\python.exe -m pip install -r requirements.txt"
-  - "python setup.py build"
-  - "%PYTHONDIR%\\python.exe -m pip install ."
+  - pip wheel -v -v -v --wheel-dir=dist .
+ - ps: |
+      # build, upload and install wheel (inspired by numpy's appveyor)
+      pip wheel -v -v -v --wheel-dir=dist .
+      ls dist -r | Foreach-Object {
+          Push-AppveyorArtifact $_.FullName
+          pip install $_.FullName
+      }
+
+test_script:
   - "python python\\demos\\demo_create_test_sounds.py"
   - "nose2 --verbose"
-  # clean up
-  - "python waf distclean"
-  # build libaubio
-  - python waf configure build --verbose --msvc_version="msvc 14.0"