summaryrefslogtreecommitdiff
path: root/.appveyor.yml
blob: 4dbb3bd71f4fd5a0f3d7bc66259f767abdb3017d (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: '{branch}-{build}'
# build Configuration
configuration: Release
# clone directory
clone_folder: c:\stellarium
# set clone depth
clone_depth: 10
# Do not build feature branch with open Pull Requests
skip_branch_with_pr: true
# Do not build on tags
skip_tags: true
# Skipping commits
skip_commits:
  message: /(GHA|skip)/
  author: /transifex/
  files:
    - guide/*
# Maximum number of concurrent jobs for the project
max_jobs: 5
# environment variables
environment:
  matrix:
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
    qtver: 6.5
    qtbin: msvc2019_64
    msvcname: Visual Studio 16 2019
    cmake_args: -A x64
    exiv2url: https://github.com/Exiv2/exiv2/releases/download/v0.28.0/exiv2-0.28.0-2019msvc64.zip
    exiv2baseName: exiv2-0.28.0-2019msvc64
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    qtver: 5.12
    qtbin: msvc2017_64
    msvcname: Visual Studio 15 2017 Win64
    cmake_args:
    exiv2url: https://github.com/10110111/exiv2/releases/download/ver0.28.0-final/exiv2-0.28.0-2017msvc64.zip
    exiv2baseName: exiv2-0.28.0-2017msvc64
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
    qtver: 5.12
    qtbin: msvc2017
    msvcname: Visual Studio 15 2017
    cmake_args:
    exiv2url: https://github.com/10110111/exiv2/releases/download/ver0.28.0-final/exiv2-0.28.0-2017msvc32.zip
    exiv2baseName: exiv2-0.28.0-2017msvc32
  - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
    qtver: 6.5
    qtbin: msvc2019_arm64
    msvcname: Visual Studio 17 2022
    cmake_args: -A ARM64 -DSTELLARIUM_BUILD_ARM64=ON -DQT_HOST_PATH=C:/Qt/6.5/msvc2019_64 -DQt6LinguistTools_DIR=C:/Qt/6.5/msvc2019_64/lib/cmake/Qt6LinguistTools -DENABLE_QTWEBENGINE=OFF
before_build:
  - ps: if($env:qtbin.contains('_64')) { $env:BITS=64 } else { $env:BITS=32 }
  - ps: if($env:qtbin.contains('_64')) { $env:PKGARCH="x64" } else { $env:PKGARCH="x86" }
  - ps: if($env:qtver.startsWith('6.')) { $env:SSL="OpenSSL-" } else { $env:SSL="OpenSSL-1-" }
  - set PUBLISH_BINARY=false
  - set USE_EXT_LIBGLES=false
  - set SIGNING=false
  - set INNSPATH=C:\Program Files (x86)\Inno Setup 5;C:\Program Files (x86)\Inno Setup 6
  - set PATH=C:\Qt\%qtver%\%qtbin%\bin;c:\%exiv2baseName%\bin;%INNSPATH%;%PATH%
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-next") { $env:PUBLISH_BINARY = 'true' }
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-stable") { $env:PUBLISH_BINARY = 'true' }
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-oldstable") { $env:PUBLISH_BINARY = 'true' }
  - ps: if($env:APPVEYOR_REPO_COMMIT_MESSAGE.contains('[publish]')) { $env:PUBLISH_BINARY = 'true' }
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-next" -or $env:APPVEYOR_REPO_COMMIT_MESSAGE.contains('[publish]')) { $env:USE_EXTRA_EXE = 'true' } else { $env:USE_EXTRA_EXE = 'false' }
  - ps: if($env:PUBLISH_BINARY -eq "true" -and $env:qtver.startsWith('5.')) { $env:USE_EXT_LIBGLES = 'true' }
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-stable" -and $env:qtver.startsWith('6.')) { $env:SIGNING = 'true' }
  - ps: if($env:APPVEYOR_REPO_BRANCH -eq "stellarium-oldstable" -and $env:qtver.startsWith('5.')) { $env:SIGNING = 'true' }
  - ps: if($env:exiv2url -ne $null) { appveyor DownloadFile $env:exiv2url -FileName c:\$env:exiv2baseName.zip }
  - ps: if($env:exiv2url -ne $null) { 7z e c:\$env:exiv2baseName.zip -spf -oc:\ }
  - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/guide/guide.pdf -FileName c:\stellarium\guide\guide.pdf
  - if [%PUBLISH_BINARY%]==[true] mkdir c:\stellarium-OpenSSL
  - if [%PUBLISH_BINARY%]==[true] set PATH=C:\stellarium-OpenSSL;%PATH%
  - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/qt-5.6/%SSL%Win%BITS%.zip -FileName c:\stellarium-OpenSSL.zip
  - if [%PUBLISH_BINARY%]==[true] 7z e c:\stellarium-OpenSSL.zip -aoa -oc:\stellarium-OpenSSL
  - mkdir stellarium-%qtver%-%qtbin%
  - cd c:\stellarium
  - mkdir build-%qtver%-%qtbin% && cd build-%qtver%-%qtbin%
  - if [%PUBLISH_BINARY%]==[true] cmake -DCMAKE_PREFIX_PATH=c:\%exiv2baseName% -DCMAKE_INSTALL_PREFIX=c:\stellarium-%qtver%-%qtbin% -G "%msvcname%" %cmake_args% ..
  - if [%PUBLISH_BINARY%]==[false] cmake -DCMAKE_PREFIX_PATH=c:\%exiv2baseName% -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:
  - ps: if($env:PUBLISH_BINARY -eq "false" -and $env:qtbin -ne "msvc2019_arm64") { ctest --output-on-failure }

after_test:
  - if [%PUBLISH_BINARY%]==[true] cmake --build c:\stellarium\build-%qtver%-%qtbin%\ --config %configuration% --target install
  - if [%USE_EXT_LIBGLES%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/qt-5.6/libGLES-Win%BITS%.zip -FileName c:\stellarium\build-%qtver%-%qtbin%\libGLES.zip
  - if [%USE_EXT_LIBGLES%]==[true] 7z e c:\stellarium\build-%qtver%-%qtbin%\libGLES.zip -aoa -oc:\stellarium-%qtver%-%qtbin%\qtstuff
  - if [%PUBLISH_BINARY%]==[true] appveyor DownloadFile https://github.com/Stellarium/stellarium-data/releases/download/mesa-win-20.1.8/opengl32sw-%PKGARCH%.dll -FileName c:\stellarium-%qtver%-%qtbin%\qtstuff\opengl32sw.dll
  - if [%PUBLISH_BINARY%]==[true] if NOT [%exiv2url%] == [] copy c:\%exiv2baseName%\bin\exiv2.dll c:\stellarium-%qtver%-%qtbin%\bin\
  - if [%PUBLISH_BINARY%]==[true] cmake --build c:\stellarium\build-%qtver%-%qtbin%\ --config %configuration% --target stellarium-installer
  - if [%USE_EXTRA_EXE%]==[true] cmake --build c:\stellarium\build-%qtver%-%qtbin%\ --config %configuration% --target stellarium-patch-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:
    SIGNING: true

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