forked from ZELLMECHANIK-DRESDEN/ShapeOut2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
83 lines (74 loc) · 2.81 KB
/
.appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Use large clone depth so that a tag is included for versioning
clone_depth: 256
notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false
environment:
matrix:
- PYTHON: "C:\\Python39-x64"
init:
- ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%
install:
# Install InnoSetup and add to path
- appveyor-retry choco install -y innosetup --version=6.2.0
- appveyor-retry choco install -y wget --version 1.20
# install R with lme4
- wget -q https://cran.r-project.org/bin/windows/base/old/3.6.3/R-3.6.3-win.exe
- R-3.6.3-win.exe /silent
# Installing an older version of R did neither work so:
#- choco install -dfvy -version 3.6.3 -source 'http://cran.at.r-project.org/bin/windows/base/old/3.6.3/;http://cran.at.r-project.org/bin/windows/base/old/;c:\projects\shapeout' r.project
# nor so:
#- choco install -y -version 3.6.3 r.project
- set PATH=%PATH%;"C:\\Program Files\\R\\R-3.6.3\\bin\\i386"
- R -e "install.packages('lme4', repos='http://cran.r-project.org')"
# Prepend newly installed Python to the PATH of this build (this cannot be
# done from inside the powershell script as it would require to restart
# the parent CMD process).
- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
# Check that we have the expected version and architecture for Python
- python --version
# Upgrade pip
- appveyor-retry python -m pip install --upgrade pip wheel
# install build requirements (pinned versions of some packages)
- python -m pip install -r build-recipes\\win_build_requirements.txt
# Install shapeout2 and its dependencies
- appveyor-retry pip install -e .
# Show the installed packages
- pip freeze
build: off
test_script:
- python -c "import shapeout2; print(shapeout2.__version__)"
- pip install coverage codecov
- pip install -r tests/requirements.txt
- python -m coverage run --source=shapeout2 -m pytest tests
- python -m coverage report -m
# Allow codecov to fail
- codecov || exit 0
after_test:
- appveyor-retry pip install twine wheel
# If tests are successful, create a whl package for the project.
- python setup.py bdist_wheel
- python setup.py sdist
- ps: "ls dist"
# Run pyinstaller
- cd build-recipes
- pyinstaller -y --additional-hooks-dir . --log-level=WARN win_ShapeOut2.spec
# Run the binary (the most simple test)
- dist\\ShapeOut2\\ShapeOut2.exe --version
# Create InnoSetup installers
# Generate iss file
- python win_make_iss.py
- C:\\"Program Files (x86)"\\"Inno Setup 6"\\ISCC.exe /Q win_shapeout2.iss
artifacts:
# InnoSetup files
- path: build-recipes\Output\*
deploy:
provider: GitHub
auth_token:
secure: u94ePbzUmuyh5jZU+1xvST73Ueuxepu86/XQsGx/15AnSd4NhQHKE1UXIe1vBIwf
artifact: /.*\.exe/
draft: true
on:
appveyor_repo_tag: true # deploy on tag push only