forked from carlosperate/ardublockly
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.appveyor.yml
105 lines (91 loc) · 3.67 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
environment:
nodejs_version: "Stable"
matrix:
# First group is 32 bit Python 2.7
# There is a bug in 2.7.13, so downgrate to 2.7.12
# http://bugs.python.org/issue29082
- PYTHON: "C:\\Python27.12"
PYTHON_VERSION: "2.7.12"
PYTHON_ARCH: "32"
# Then 32 bit Python 3.4
PYTHON3: "C:\\Python34"
PYTHON3_VERSION: "3.4.4"
PYTHON3_ARCH: "32"
# Add custom environmental variables for pip
PIP: C:\\Python27.12\Scripts\pip
PIP3: C:\\Python34\Scripts\pip
# Add custom environmental variables to ensure 32 bit electron
npm_config_arch: ia32
platform: x86
configuration: Release
init:
- cmd: ECHO Processor architecture - %PROCESSOR_ARCHITECTURE%
- cmd: wmic OS get OSArchitecture
# Install 2.7.12 until 2.7.14 is released and integrated in AppVeyor
- cmd: msiexec.exe /qn /i https://www.python.org/ftp/python/2.7.12/python-2.7.12.msi TARGETDIR=C:\Python27.12
# As AppVeyor has multiple python install, verify which ones will be used
- cmd: ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%
- cmd: "%PYTHON%\\python --version"
- cmd: "%PYTHON%\\python -c \"import struct; print(struct.calcsize('P') * 8)\""
- cmd: ECHO %PYTHON3% %PYTHON3_VERSION% %PYTHON3_ARCH%
- cmd: "%PYTHON3%\\python --version"
- cmd: "%PYTHON3%\\python -c \"import struct; print(struct.calcsize('P') * 8)\""
# Prepare pip and pip3, PATH iterated left to right first hit wins
- cmd: set PATH=%PYTHON%\scripts;%PYTHON3%\scripts;%PATH%
- cmd: ECHO Path - %PATH%
- cmd: "%PIP% --version"
- cmd: "%PIP3% --version"
# Ensure node x86 (appveyor powershell script to switch installed versions)
- ps: Install-Product node 'Stable' x86
- cmd: node --version
- cmd: node -p "process.arch"
- cmd: npm --version
install:
# Git clone happens between init and install
- cmd: git submodule update --init --recursive
# Install Python packages
- cmd: "%PIP3% install pyinstaller"
- cmd: "%PIP3% install mkdocs"
#- cmd: "%PIP3% install pydocstyle"
- cmd: "%PIP3% install coverage"
- cmd: "%PIP3% install requests"
- cmd: "%PIP% install coverage"
- cmd: "%PIP% install requests"
- cmd: "%PIP% install mock"
- cmd: "%PIP% freeze"
- cmd: "%PIP3% freeze"
- cmd: pyinstaller --version
# Build and pack Ardublockly
- cmd: cd blockly && %PYTHON%\python build.py && cd ..\
- cmd: "%PYTHON3%\\python package\\build_docs.py"
- cmd: "%PYTHON3%\\python package\\build_pyinstaller.py windows"
- cmd: cd package\electron && npm install && cd ..\..\
- cmd: cd package\electron && npm run release && cd ..\..\
- cmd: "%PYTHON3%\\python package\\pack_ardublockly.py"
- cmd: dir
# Not a project with an msbuild file, build done at install.
build: off
# CI testing on both Python 2 and 3
test_script:
- cmd: chcp 65001
- cmd: set PYTHONIOENCODING=utf-8
- cmd: "%PYTHON%\\python -m coverage run ardublocklyserver\\tests\\run_all.py"
- cmd: "%PYTHON%\\python -m coverage report"
- cmd: "%PYTHON3%\\python -m coverage run ardublocklyserver\\tests\\run_all.py"
- cmd: "%PYTHON3%\\python -m coverage report"
#- cmd: pydocstyle ardublocklyserver --match-dir='ardublocklyserver'
# Push artefact to S3 bucket and list all
before_deploy:
- ps: Get-ChildItem .\releases\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName ardublockly-s3-deployment }
- ps: foreach($artifactName in $artifacts.keys) { $artifacts[$artifactName] }
# Deploy build to Amazon S3 bucket
deploy:
name: ardublockly-s3-deployment
provider: S3
access_key_id: AKIAJYJV7NN6HVHCX5NQ
secret_access_key:
secure: PlLCQKTcf9IzBXpEnXUxbJifb0usS7qcghnM0VxBTX0IL3C975JPidrYjP39ge7P
bucket: ardublockly-builds
region: us-west-2
set_public: true
folder: windows