forked from canonical/snapcraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
74 lines (62 loc) · 2.58 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
image: Visual Studio 2019
environment:
INNOCC: C:\Program Files (x86)\Inno Setup 6\iscc.exe
MAKEAPPX: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\makeappx.exe
SIGNTOOL: C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\signtool.exe
SNAPCRAFT_INSTALLED_EXE: C:\Program Files (x86)\Snapcraft for Windows\snapcraft.exe
TIMESTAMP_SERVICE: http://timestamp.digicert.com
matrix:
- PYTHON: C:\Python310-x64
cache:
- '%LOCALAPPDATA%\pip\Cache\http'
- '%LOCALAPPDATA%\pip\Cache\wheels'
build: off
install:
- cmd: |
%PYTHON%\python.exe -m venv venv
venv\Scripts\activate.bat
python -c "import sys; print(sys.executable)"
python -m pip install -r requirements-devel.txt
python -m pip install --prefix %VIRTUAL_ENV% -e .
venv\Scripts\deactivate.bat
build_script:
- cmd: |
echo "Building snapcraft.exe..."
venv\Scripts\activate.bat
pyinstaller.exe snapcraft.spec
venv\Scripts\deactivate.bat
echo "Test signing snapcraft.exe..."
powershell.exe windows\generate-self-signed-cert.ps1
"%SIGNTOOL%" sign /fd SHA256 /td SHA256 /tr "%TIMESTAMP_SERVICE%" /f test-signing.pfx /p Password1234 dist\snapcraft.exe
echo "Setting Snapcraft version..."
venv\Scripts\activate.bat
python -m tools.version set-snapcraft-iss
venv\Scripts\deactivate.bat
echo "Building snapcraft inno installer..."
"%INNOCC%" windows\snapcraft.iss
copy dist\snapcraft-installer.exe dist\snapcraft-installer-self-signed.exe
echo "Test signing snapcraft inno installer..."
"%SIGNTOOL%" sign /fd SHA256 /td SHA256 /tr "%TIMESTAMP_SERVICE%" /f test-signing.pfx /p Password1234 dist\snapcraft-installer-self-signed.exe
echo "Building snapcraft msix installer..."
mkdir dist\msix
copy dist\snapcraft.exe dist\msix\
copy windows\snapcraft.png dist\msix\
copy windows\AppxManifest.xml dist\msix\
"%MAKEAPPX%" pack /h SHA256 /d dist\msix /p dist\snapcraft-installer.msix
echo "Test signing snapcraft msix installer..."
"%SIGNTOOL%" sign /fd SHA256 /td SHA256 /tr "%TIMESTAMP_SERVICE%" /f test-signing.pfx /p Password1234 dist\snapcraft-installer.msix
test_script:
- cmd: |
echo "Smoke testing snapcraft.exe..."
dist\snapcraft.exe version
mkdir test
cd test
..\dist\snapcraft.exe init
cd ..
echo "Smoke testing snapcraft-installer-self-signed.exe..."
start /wait "SNAPCRAFT INSTALLER" dist\snapcraft-installer-self-signed.exe /VERYSILENT /ALLUSERS
"%SNAPCRAFT_INSTALLED_EXE%" version
artifacts:
#- path: dist\snapcraft.exe
- path: dist\snapcraft-installer.exe
#- path: dist\snapcraft-installer.msix