forked from hydrogen-music/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
197 lines (157 loc) · 7.79 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
environment:
GENERATOR: "MinGW Makefiles"
ARTIFACT_BRANCH: master-artifacts
matrix:
- job_name: 'Ubuntu 20.04'
job_group: 'Linux'
appveyor_build_worker_image: Ubuntu2004
- job_name: 'OS X'
job_group: 'Mac OS X'
appveyor_build_worker_image: macos
- job_name: 'Windows64'
job_group: 'Windows'
MSYS: 'C:\msys64\mingw64'
MSYS_REPO: 'mingw64/mingw-w64-x86_64'
BUILD_TYPE: "Release"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=OFF -DWIN64:BOOL=ON"
appveyor_build_worker_image: Visual Studio 2019
LIBJACK: libjack64.dll
CHOCO_ARCH:
PROGRAM_FILES: "Program Files"
- job_name: 'Windows32'
job_group: 'Windows'
MSYS: 'C:\msys64\mingw32'
MSYS_REPO: 'mingw-w64-i686'
BUILD_TYPE: "Release"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=OFF -DWIN64:BOOL=OFF"
appveyor_build_worker_image: Visual Studio 2019
LIBJACK: libjack.dll
CHOCO_ARCH: --x86
PROGRAM_FILES: "Program Files (x86)"
build:
verbosity: detailed
matrix:
exclude:
- job_name: Windows32
branches: "master"
for:
-
matrix:
only:
- job_group: 'Linux'
before_build: |-
echo 'Linux build script'
sudo apt-get update
sudo apt-get install -y clang qt5-default qttools5-dev qttools5-dev-tools libqt5xmlpatterns5-dev libarchive-dev libsndfile1-dev libasound2-dev libjack-jackd2-dev libqt5svg5-dev
sudo apt-get install -y liblo-dev libpulse-dev libportmidi-dev portaudio19-dev libcppunit-dev liblrdf-dev librubberband-dev ladspa-sdk
sudo rm /usr/local/bin/doxygen
build_script: |-
git submodule init && git submodule update
CPUS=$(nproc)
echo "Building with $CPUS cpus"
mkdir build && cd build && cmake -DWANT_LASH=1 -DWANT_LRDF=1 -DWANT_RUBBERBAND=1 .. && make -j $CPUS
test_script: |-
TMPDIR=/tmp src/tests/tests --appveyor
-
matrix:
only:
- job_group: 'Mac OS X'
before_build: |-
export MACOSX_DEPLOYMENT_TARGET=10.12
sudo ln -s /usr/local /opt/local;
brew update
# Build libsndfile and bdb from source to enable building for 10.12
brew install --build-from-source ./macos/HomebrewFormulae/berkeley-db.rb
brew install --build-from-source ./macos/HomebrewFormulae/libogg.rb
brew install --build-from-source ./macos/HomebrewFormulae/libvorbis.rb
brew install --build-from-source ./macos/HomebrewFormulae/libsndfile.rb
brew install qt5; export CMAKE_PREFIX_PATH="$(brew --prefix qt5)";
brew install libarchive; export PKG_CONFIG_PATH="$(brew --prefix libarchive)/lib/pkgconfig";
brew install libsndfile jack pulseaudio cppunit
build_script: |-
#fix use of register keyword in jack: https://github.com/jackaudio/jack1/issues/84
sed -i '' 's/, int register,/, int,/g' /opt/local/include/jack/types.h
git submodule init && git submodule update
CPUS=$(sysctl -n hw.ncpu)
echo "Building with $CPUS cpus"
mkdir build && cd build && cmake -DWANT_LASH=1 -DWANT_LRDF=1 -DWANT_RUBBERBAND=1 .. && make -j $CPUS
PATH="$(brew --prefix qt5)/bin:$PATH"
../macos/build_dmg.sh -v src/gui/hydrogen.app Hydrogen${PKG_SUFFIX}.dmg
#deploy dmg only on branch $ARTIFACT_BRANCH
if [ "$APPVEYOR_REPO_BRANCH" = "$ARTIFACT_BRANCH" ]; then appveyor PushArtifact Hydrogen*.dmg -DeploymentName Installer; fi
test_script: |-
TMPDIR=/tmp src/tests/tests --appveyor || true
-
matrix:
only:
- job_group: 'Windows'
before_build:
cmd: |-
if not %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% if %job_name%==Windows32 appveyor exit
set QTDIR=%MSYS%
set CMAKE_PREFIX_PATH=%QTDIR%
set PATH=%MSYS%\bin;%PATH%
set PKG_CONFIG_PATH=%MSYS%\lib\pkgconfig
cmake --version
g++ --version
choco install %CHOCO_ARCH% -y jack
dir "c:\%PROGRAM_FILES%\JACK2"
dir "c:\%PROGRAM_FILES%\JACK2\lib"
REM *** Install dependencies ***
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-libarchive
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-libsndfile
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-cppunit
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-portaudio
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-portmidi
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-libwinpthread-git
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-qt5
c:\msys64\usr\bin\pacman --noconfirm -S -q %MSYS_REPO%-ladspa-sdk
REM *** INIT SUBMODULES ***
git submodule init
git submodule update
REM *** Configure build ***
rename "C:\Program Files\Git\usr\bin\sh.exe" "sh2.exe"
mkdir build
cd build
cmake -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=%BUILD_TYPE% %CMAKE_FLAGS% -DJACK_INCLUDE_DIRS="c:/%PROGRAM_FILES%/JACK2/include" -DJACK_LIBRARIES="c:/%PROGRAM_FILES%/JACK2/lib/%LIBJACK%.a" ..
build_script:
- cmd: |-
if not %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% if %job_name%==Windows32 exit
REM *** Build ***
set VERBOSE=1
cmake --build . -j %NUMBER_OF_PROCESSORS%
REM *** Run tests and report results ***
set H2_HOME=%APPVEYOR_BUILD_FOLDER%
echo %H2_HOME%
SET CORE_PATH=%cd%\src\core
echo %CORE_PATH%
set PATH=%CORE_PATH%;%PATH%
src\tests\tests.exe --appveyor || cmd /c "exit /b 0"
7z a %APPVEYOR_BUILD_FOLDER%\testresults.zip %TEMP%\hydrogen || cmd /c "exit /b 0"
if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\testresults.zip
mkdir %APPVEYOR_BUILD_FOLDER%\build\windows\extralibs
REM *** Deploy Qt ***
%QTDIR%\bin\windeployqt.exe -xmlpatterns --no-patchqt --dir %APPVEYOR_BUILD_FOLDER%\build\windows\extralibs src/gui/hydrogen.exe
REM *** Deploy other libraries ***
set PYTHON=C:\Python38\python
%PYTHON% -m pip install -r %APPVEYOR_BUILD_FOLDER%\windows\ci\requirements.txt
%PYTHON% %APPVEYOR_BUILD_FOLDER%\windows\ci\copy_thirdparty_dlls.py --no-overwrite -V info -L %MSYS%\bin -d %APPVEYOR_BUILD_FOLDER%\build\windows\extralibs src/gui/hydrogen.exe src/core/libhydrogen-core-1.1.0.dll
REM Chocolatey installs JACK dlls in c:\Windows, so
REM copy_third_party_libs.py thinks it's a system lib and
REM won't copy it.
copy c:\Windows\%LIBJACK% %APPVEYOR_BUILD_FOLDER%\build\windows\extralibs
REM *** Build installer ***
cpack -G NSIS -v
REM *** Run and verify installer ***
set INSTDIR=C:\hydrogen
mkdir %INSTDIR%
FOR %%F IN (Hydrogen-*.exe) DO %%F /S /D=%INSTDIR%
%PYTHON% -m pytest %APPVEYOR_BUILD_FOLDER%\windows\ci\test_installation.py --junitxml=test_installation.xml
on_finish:
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeCache.txt
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeOutput.log
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeError.log
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\Hydrogen-1.1.0-win64.exe || cmd /c "exit /b 0"
- cmd: if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\Hydrogen-1.1.0-win32.exe || cmd /c "exit /b 0"
- cmd: |
if %APPVEYOR_REPO_BRANCH%==%ARTIFACT_BRANCH% curl -F file=@%APPVEYOR_BUILD_FOLDER%\build\test_installation.xml https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%