summaryrefslogtreecommitdiff
path: root/.appveyor.yml
blob: f768b96a01ffe8b5f1c19b89cc74faac932b96e7 (plain)
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
version: '{branch}-{build}'
# build Configuration
configuration: Release
# clone directory
clone_folder: c:\stellarium
# set clone depth
clone_depth: 5
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# environment variables
environment:
  matrix:
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    platform: x64
    qtver: 5.12
    qtbin: msvc2017_64
    msvcname: Visual Studio 15 2017 Win64
    packaging: true
    suffix: Win64
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    platform: Win32
    qtver: 5.12
    qtbin: msvc2017
    msvcname: Visual Studio 15 2017
    packaging: true
    suffix: Win32
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
    platform: x64
    qtver: 5.15
    qtbin: msvc2019_64
    msvcname: Visual Studio 17 2022
    packaging: false
    suffix: Win64
    cmake_args: -A x64
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
    platform: Win32
    qtver: 5.15
    qtbin: msvc2019
    msvcname: Visual Studio 17 2022
    packaging: false
    suffix: Win32 
    cmake_args: -A Win32

before_build:
  - set PUBLISH_BINARY=false
  - set INNSPATH=C:\Program Files (x86)\Inno Setup 5;C:\Program Files (x86)\Inno Setup 6
  - set OPENSSLPATH=C:\OpenSSL-%suffix%\bin;C:\OpenSSL-v111-%suffix%\bin
  - set PATH=C:\Qt\%qtver%\%qtbin%\bin;%INNSPATH%;%OPENSSLPATH%;%PATH%
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "release" -and $env:packaging -eq "true") { $env:PUBLISH_BINARY = 'true' }
  - ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.contains('[publish]') -and $env:packaging -eq "true") { $env:PUBLISH_BINARY = 'true' }
  - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/guide/guide.pdf -FileName c:\stellarium\guide\guide.pdf
  - mkdir stellarium-%qtver%-%qtbin%
  - cd c:\stellarium
  - mkdir build-%qtver%-%qtbin% && cd build-%qtver%-%qtbin%
  - if [%PUBLISH_BINARY%]==[true] cmake -DCMAKE_INSTALL_PREFIX=c:\stellarium-%qtver%-%qtbin% -G "%msvcname%" %cmake_args% ..
  - if [%PUBLISH_BINARY%]==[false] cmake -DENABLE_TESTING=On -DENABLE_NLS=Off -DCMAKE_INSTALL_PREFIX=c:\stellarium-%qtver%-%qtbin% -G "%msvcname%" %cmake_args% ..

build:
  project: c:\stellarium\build-%qtver%-%qtbin%\Stellarium.sln
  parallel: true
  verbosity: minimal
  
test_script:
  - if [%PUBLISH_BINARY%]==[false] ctest --output-on-failure

after_test:
  - if [%PUBLISH_BINARY%]==[true] cmake --build c:\stellarium\build-%qtver%-%qtbin%\ --config %configuration% --target install
  - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/qt-5.6/libGLES-%suffix%.zip -FileName c:\stellarium\build-%qtver%-%qtbin%\libGLES.zip
  - if [%PUBLISH_BINARY%]==[true] 7z e c:\stellarium\build-%qtver%-%qtbin%\libGLES.zip -aoa -oc:\stellarium-%qtver%-%qtbin%\qt5stuff
  - if [%PUBLISH_BINARY%]==[true] cmake --build c:\stellarium\build-%qtver%-%qtbin%\ --config %configuration% --target stellarium-installer
  - if [%PUBLISH_BINARY%]==[true] cd c:\stellarium\installers
  - if [%PUBLISH_BINARY%]==[true] for %%i in (*.exe) do appveyor PushArtifact %%i

# deployment
deploy:
- provider: Webhook
  url: https://app.signpath.io/API/v1/a6a9173a-feb5-41ae-8973-8ca75af5e233/Integrations/AppVeyor?ProjectKey=stellarium&SigningPolicyKey=release-signing
  authorization:
    secure: k9Hka8MA6UONiSbKZeAv5koMEljPXgEZ7o1FbvEHRlPFFHMGzQcS6MQsvy53VxeTpG4Kw98FU0VXusbXoKLzug==
  on:
    branch: release
    packaging: true

notifications:
- provider: Email
  to:
  - alex.v.wolf@gmail.com
  on_build_success: false
  on_build_failure: true
  on_build_status_changed: true