forked from musescore/MuseScore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
94 lines (79 loc) · 4.3 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
# clone directory
clone_folder: C:\MuseScore
# set clone depth
clone_depth: 3 # clone entire repository history if not defined
# build cache to preserve files/folders between builds
cache:
- dependencies.7z
- C:\Qt\Tools\mingw530_32\lib
- C:\Qt\Tools\mingw530_32\i686-w64-mingw32
- C:\Program Files (x86)\Jack
- C:\MuseScore\build.release\thirdparty
- C:\ccache
# build platform, i.e. x86, x64, Any CPU. This setting is optional.
platform:
- x86
#environment:
# build Configuration, i.e. Debug, Release, etc.
configuration: Release
# Stop Appveyor from "Discovering Tests"
test: off
install:
- IF DEFINED ENCRYPT_SECRET_SSH (
nuget install secure-file -ExcludeVersion &&
secure-file\tools\secure-file -decrypt C:\MuseScore\build\appveyor\resources\osuosl_nighlies_rsa_nopp.enc -secret %ENCRYPT_SECRET_SSH%
)
# scripts to run before build
before_build:
- IF NOT EXIST dependencies.7z (
START " " /wait "C:\MinGW\msys\1.0\bin\wget" --no-check-certificate "http://utils.musescore.org.s3.amazonaws.com/musescore_dependencies_win32.7z" -O dependencies.7z
)
- START " " /wait "7z" x -y dependencies.7z > nul &&
CD dependencies &&
XCOPY i686-w64-mingw32 "C:\Qt\Tools\mingw530_32\i686-w64-mingw32" /E /Y &&
XCOPY lib "C:\Qt\Tools\mingw530_32\lib" /E /Y &&
XCOPY Jack "C:\Program Files (x86)\Jack" /E /I /Y &&
XCOPY ccache "C:\ccache" /E /I /Y
- SET OLD_PATH=%PATH%
- SET PATH=C:\Qt\5.9\mingw53_32\bin;C:\Qt\Tools\mingw530_32\bin;%PATH%
- CD C:\MuseScore
# get revision number
- mingw32-make -f Makefile.mingw revision
- SET /p MSversion=<mscore\revision.h
# CMake refuses to generate MinGW Makefiles if sh.exe is in the PATH (C:\Program Files\Git\usr\bin)
- SET PATH=C:\Qt\5.9\mingw53_32\bin;C:\Qt\Tools\mingw530_32\bin;C:\Program Files (x86)\CMake\bin;C:\Program Files\7-Zip;C:\ccache\bin;C:\Tools\curl\bin;C:\Windows\system32;C:\Windows
- SET CCACHE_DIR=C:\ccache\cache
after_build:
- ccache.exe -s
- CD C:\MuseScore
- RENAME C:\MuseScore\win32install\bin\musescore.exe nightly.exe
- RENAME C:\MuseScore\win32install MuseScoreNightly
- XCOPY C:\MuseScore\build\appveyor\special C:\MuseScore\MuseScoreNightly\special /I /E /Y /Q
- COPY C:\MuseScore\build\appveyor\support\README.txt C:\MuseScore\MuseScoreNightly\README.txt /Y
- COPY C:\MuseScore\build\appveyor\support\nightly.bat C:\MuseScore\MuseScoreNightly\nightly.bat /Y
- COPY C:\MuseScore\mscore\revision.h C:\MuseScore\MuseScoreNightly\revision.h
# get hour with a trailing 0 if necessary (add 100)
- set hh0=%time:~0,2%
- set /a hh1=%hh0%+100
- set hh=%hh1:~1,2%
- SET BUILD_DATE=%Date:~10,4%-%Date:~4,2%-%Date:~7,2%-%hh%%time:~3,2%
- SET ARTIFACT_NAME=MuseScoreNightly-%BUILD_DATE%-%APPVEYOR_REPO_BRANCH%-%MSversion%.7z
- 7z a C:\MuseScore\%ARTIFACT_NAME% C:\MuseScore\MuseScoreNightly
- SET SSH_IDENTITY=C:\MuseScore\build\appveyor\resources\osuosl_nighlies_rsa_nopp
- SET PATH=%OLD_PATH%
- IF DEFINED ENCRYPT_SECRET_SSH scp -oStrictHostKeyChecking=no -C -i %SSH_IDENTITY% %ARTIFACT_NAME% [email protected]:~/ftp/windows/
- IF DEFINED ENCRYPT_SECRET_SSH ssh -oStrictHostKeyChecking=no -i %SSH_IDENTITY% [email protected] "cd ~/ftp/windows; ls MuseScoreNightly* -t | tail -n +41 | xargs rm -f"
# create and upload index.html and RSS
- IF DEFINED ENCRYPT_SECRET_SSH python build/appveyor/updateHTML.py %SSH_IDENTITY%
- IF DEFINED ENCRYPT_SECRET_SSH scp -oStrictHostKeyChecking=no -C -i %SSH_IDENTITY% build/appveyor/web/index.html [email protected]:ftp/windows
- IF DEFINED ENCRYPT_SECRET_SSH scp -oStrictHostKeyChecking=no -C -i %SSH_IDENTITY% build/appveyor/web/nightly.xml [email protected]:ftp/windows
# trigger distribution
- IF DEFINED ENCRYPT_SECRET_SSH ssh -oStrictHostKeyChecking=no -i %SSH_IDENTITY% [email protected] "~/trigger-musescore-nightlies"
# notify IRC channel
- IF DEFINED ENCRYPT_SECRET_SSH pip install irc
- IF DEFINED ENCRYPT_SECRET_SSH python build/appveyor/irccat.py "%APPVEYOR_REPO_BRANCH%-%MSversion% (Win) compiled successfully https://ftp.osuosl.org/pub/musescore-nightlies/windows/%ARTIFACT_NAME%"
- CD C:\MuseScore
artifacts:
- path: $(ARTIFACT_NAME)
build_script:
- mingw32-make -f Makefile.mingw release && mingw32-make -f Makefile.mingw install