appveyor.yml 3.29 KB
Newer Older
thiolliere's avatar
thiolliere committed
1
2
3
4
5
6
7
8
version: 1.0.{build}

clone_folder: c:\projects\pibox-installer

image: Visual Studio 2015

build: off

thiolliere's avatar
thiolliere committed
9
10
11
12
platform:
  - x86
  - x64

thiolliere's avatar
thiolliere committed
13
14
15
16
environment:
  certificate_secret:
    secure: /Ephvg5HQQLR0IJmmeBGGpEww+93XqAMjdGAJKZyWsNeNCarAjvBDgcNBO/K1CWzwxpvty5sM0dZiWCFXt9kZcmU8vCPIYjwJE1B5Q5/mAQ=

thiolliere's avatar
thiolliere committed
17
install:
thiolliere's avatar
thiolliere committed
18
19
  # decrypt certificate
  - nuget install secure-file -ExcludeVersion
thiolliere's avatar
thiolliere committed
20
  - secure-file\tools\secure-file -decrypt pibox_installer_ci_rsa.appveyor_enc -secret %certificate_secret% -out pibox_installer_ci_rsa
thiolliere's avatar
thiolliere committed
21

thiolliere's avatar
thiolliere committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
  # Install pygobject
  - appveyor DownloadFile "https://sourceforge.net/projects/pygobjectwin32/files/pygi-aio-3.18.2_rev12-setup_549872deadabb77a91efbc56c50fe15f969e5681.exe/download" -FileName "pygi-aio-setup.exe"
  - mkdir pygi-aio-setup
  - cd pygi-aio-setup
  - set SOURCEPATH=%cd%
  - 7z.exe x ..\pygi-aio-setup.exe
  - cd setup
  - del 7zr.exe
  - 7z.exe x ..\setup.exe
  - set GIR=True
  - rcmd.exe /c setup.bat C:\Python34 GTK
  - mklink /D C:\Python34\share C:\Python34\Lib\site-packages\gnome\share
  - cd ..\..
  - dir C:\Python34\Lib\site-packages\gi

  # Install gdk-pixbuf and add it to PATH because it is needed by pyinstaller
thiolliere's avatar
thiolliere committed
38
39
40
41
  - if %platform%==x86 C:\msys64\usr\bin\bash --login -c "pacman -S mingw-w64-i686-gdk-pixbuf2 --noconfirm"
  - if %platform%==x86 set PATH=%PATH%;C:\msys64\mingw32\bin
  - if %platform%==x64 C:\msys64\usr\bin\bash --login -c "pacman -S mingw-w64-x86_64-gdk-pixbuf2 --noconfirm"
  - if %platform%==x64 set PATH=%PATH%;C:\msys64\mingw64\bin
thiolliere's avatar
thiolliere committed
42
43
44
45
46
47
48
49
50

  # Install pyinstaller and requirements
  - cd C:\projects\pibox-installer
  - C:\Python34\python.exe -m pip install pyinstaller
  - C:\Python34\python.exe -m pip install -r requirements-windows.txt

  # Install qemu
  - mkdir "C:\Program Files\qemu"
  - cd "C:\Program Files\qemu"
thiolliere's avatar
thiolliere committed
51
52
53
  - if %platform%==x86 appveyor DownloadFile "https://qemu.weilnetz.de/w32/2017/qemu-w32-setup-20170418.exe" -FileName "qemu-setup.exe"
  - if %platform%==x64 appveyor DownloadFile "https://qemu.weilnetz.de/w64/2017/qemu-w64-setup-20170418.exe" -FileName "qemu-setup.exe"
  - 7z x qemu-setup.exe
thiolliere's avatar
thiolliere committed
54
55
56
57
  - dir "C:\Program Files\qemu"

  # Run pyinstaller and show warning
  - cd C:\projects\pibox-installer
58
59
60
61
  - if %platform%==x86 C:\Python34\python.exe C:\Python34\Scripts\pyinstaller-script.py pibox-installer-win32.spec
  - if %platform%==x64 C:\Python34\python.exe C:\Python34\Scripts\pyinstaller-script.py pibox-installer-win64.spec
  - if %platform%==x86 type build\pibox-installer-win32\warnpibox-installer-win32.txt
  - if %platform%==x64 type build\pibox-installer-win64\warnpibox-installer-win64.txt
thiolliere's avatar
thiolliere committed
62

thiolliere's avatar
thiolliere committed
63

thiolliere's avatar
thiolliere committed
64
  # Deploy
thiolliere's avatar
thiolliere committed
65
66
67
  - 7z.exe a -r C:\projects\pibox-installer\dist\pibox-installer.zip C:\projects\pibox-installer\dist\pibox-installer

  - move C:\projects\pibox-installer\dist\pibox-installer.zip C:\msys64\home\appveyor\
thiolliere's avatar
thiolliere committed
68
  - move C:\projects\pibox-installer\pibox_installer_ci_rsa C:\msys64\home\appveyor\
thiolliere's avatar
thiolliere committed
69
70
71

  - if %platform%==x86 C:\msys64\usr\bin\bash --login -c "scp -o StrictHostKeyChecking=no -i pibox_installer_ci_rsa pibox-installer.zip pibox_ci@buildbot.wan.bsf-intranet.org:/srv/repos/pibox/$(date +'%%Y-%%m-%%d')/pibox-installer-win32.zip"
  - if %platform%==x64 C:\msys64\usr\bin\bash --login -c "scp -o StrictHostKeyChecking=no -i pibox_installer_ci_rsa pibox-installer.zip pibox_ci@buildbot.wan.bsf-intranet.org:/srv/repos/pibox/$(date +'%%Y-%%m-%%d')/pibox-installer-win64.zip"