forked from canonical/microk8s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
105 lines (85 loc) · 2.98 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
image:
- Visual Studio 2019
- macOS
for:
- # Windows build.
matrix:
only:
- image: Visual Studio 2019
clone_depth: 1
cache:
- '%LOCALAPPDATA%\pip\Cache\http'
- '%LOCALAPPDATA%\pip\Cache\wheels'
build: off
environment:
PYTHON: C:\Python37-x64
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
MICROK8S_INSTALLED_EXE: C:\Program Files (x86)\MicroK8s for Windows\microk8s.exe
install:
- cmd: |
%PYTHON%\python.exe -m venv venv
venv\Scripts\activate.bat
%PYTHON%\python.exe -c "import sys; print(sys.executable)"
%PYTHON%\python.exe -m pip install -r installer\requirements.txt
%PYTHON%\python.exe -m pip install pyinstaller
venv\Scripts\deactivate.bat
build_script:
- cmd: |
venv\Scripts\activate.bat
set PATH=%PATH%;C:\Python37-x64\Scripts\
cd installer
echo "Building microk8s.exe..."
pyinstaller.exe --onefile microk8s.spec
..\venv\Scripts\deactivate.bat
echo "Test signing microk8s.exe..."
powershell.exe windows\generate-self-signed-cert.ps1
"%SIGNTOOL%" sign /fd SHA256 /T "http://timestamp.verisign.com/scripts/timstamp.dll" /F test-signing.pfx /P Password1234 dist\microk8s.exe
echo "Building microk8s inno installer..."
"%INNOCC%" windows\microk8s.iss
echo "Test signing microk8s inno installer..."
"%SIGNTOOL%" sign /fd SHA256 /T "http://timestamp.verisign.com/scripts/timstamp.dll" /F test-signing.pfx /P Password1234 dist\microk8s-installer.exe
echo "Building microk8s msix installer..."
mkdir dist\msix
copy dist\microk8s.exe dist\msix\
copy windows\microk8s.png dist\msix\
copy windows\AppxManifest.xml dist\msix\
"%MAKEAPPX%" pack /h SHA256 /d dist\msix /p dist\microk8s-installer.msix
echo "Test signing microk8s msix installer..."
"%SIGNTOOL%" sign /fd SHA256 /T "http://timestamp.verisign.com/scripts/timstamp.dll" /F test-signing.pfx /P Password1234 dist\microk8s-installer.msix
cd ..
test_script:
- cmd: |
echo "Running select unit tests..."
artifacts:
- path: installer\dist\microk8s.exe
name: Windows-Release
- path: installer\dist\microk8s-installer.exe
- path: installer\dist\microk8s-installer.msix
- # MacOS build.
matrix:
only:
- image: macOS
clone_depth: 1
build: off
install:
- brew upgrade python
- brew link --overwrite python
- python3 -m venv venv
- source venv/bin/activate
- python3 -m pip install -r installer/requirements.txt
- deactivate
build_script:
- source venv/bin/activate
- cd installer
- pyinstaller --onefile microk8s.spec
- deactivate
- cd ..
after_build:
- tar -czf microk8s.tgz -C installer/dist microk8s
test_script:
- echo "Running select unit tests..."
artifacts:
- path: microk8s.tgz
name: MacOS-Release