forked from hydrogen-music/hydrogen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
155 lines (124 loc) · 6.29 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
environment:
GENERATOR: "MinGW Makefiles"
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: 'WindowsDebug64'
job_group: 'Windows'
MSYS: 'C:\msys64\mingw64'
MSYS_REPO: 'mingw64/mingw-w64-x86_64'
BUILD_TYPE: "Debug"
CMAKE_FLAGS: "-DWANT_DEBUG:BOOL=ON -DWIN64:BOOL=ON"
appveyor_build_worker_image: Visual Studio 2019
build:
verbosity: detailed
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
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
mkdir build && cd build && cmake -DWANT_LASH=1 -DWANT_LRDF=1 -DWANT_RUBBERBAND=1 .. && make
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
mkdir build && cd build && cmake -DWANT_LASH=1 -DWANT_LRDF=1 -DWANT_RUBBERBAND=1 .. && make
PATH="$(brew --prefix qt5)/bin:$PATH"
../macos/build_dmg.sh -v src/gui/hydrogen.app Hydrogen${PKG_SUFFIX}.dmg
#deploy dmg only on branch appveyor-build-with-artifacts
if [ "$APPVEYOR_REPO_BRANCH" = appveyor-build-with-artifacts ]; 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: |-
set QTDIR=%MSYS%
set CMAKE_PREFIX_PATH=%QTDIR%
set PATH=%MSYS%\bin;%PATH%
set PKG_CONFIG_PATH=%MSYS%\lib\pkgconfig
cmake --version
g++ --version
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% ..
build_script:
- cmd: |-
REM *** Build ***
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
if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\testresults.zip
mkdir %APPVEYOR_BUILD_FOLDER%\windows\extralibs
REM *** Deploy Qt ***
%QTDIR%\bin\windeployqt.exe -xmlpatterns --no-patchqt --dir %APPVEYOR_BUILD_FOLDER%\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%\windows\extralibs src/gui/hydrogen.exe src/core/libhydrogen-core-1.1.0.dll
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%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeCache.txt
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeOutput.log
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\CMakeFiles\CMakeError.log
- cmd: if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts appveyor PushArtifact %APPVEYOR_BUILD_FOLDER%\build\Hydrogen-1.1.0-win64.exe
- cmd: |
if %APPVEYOR_REPO_BRANCH%==appveyor-build-with-artifacts curl -F file=@%APPVEYOR_BUILD_FOLDER%\build\test_installation.xml https://ci.appveyor.com/api/testresults/junit/%APPVEYOR_JOB_ID%