forked from swami/swami
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
166 lines (163 loc) · 6.86 KB
/
azure-pipelines.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
# C/C++ with GCC
# Build your C/C++ project with GCC using make.
# Add steps that publish test results, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/c-cpp/gcc
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-latest'
steps:
- script: |
sudo apt-get update
sudo apt-get -y install \
libglib2.0-0 \
libsndfile-dev \
libfluidsynth-dev \
libgnomecanvas2-dev \
libgtk2.0-dev
displayName: 'Prerequisites'
- script: |
git clone https://github.com/swami/libinstpatch.git
cd libinstpatch
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX="" ..
make -j4
sudo make install
displayName: 'Compile & Install libinstpatch'
- script: |
git clone https://github.com/FluidSynth/fluidsynth.git
cd fluidsynth
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DLIB_SUFFIX="" ..
make -j4
sudo make install
displayName: 'Compile & Install fluidsynth'
- script: |
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/swami_install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=0 ..
make
sudo make install
displayName: 'Compile & Install swami'
- job: macOS
pool:
vmImage: 'macOS-10.14'
steps:
- script: |
brew update || brew update
brew upgrade
brew install glib gobject-introspection libsndfile pkg-config fluidsynth gtk+ libgnomecanvas
displayName: 'Prerequisites'
- script: |
git clone https://github.com/swami/libinstpatch.git
cd libinstpatch
mkdir build && cd build
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
cmake -DINTROSPECTION_ENABLED=0 -DLIB_SUFFIX="" ..
make -j4
sudo make install
displayName: 'Compile & Install libinstpatch'
- script: |
mkdir build && cd build
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
cmake -DINTROSPECTION_ENABLED=0 -DCMAKE_INSTALL_PREFIX=$HOME/swami_install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=0 ..
make
displayName: 'Compile swami'
- job: Windows
strategy:
matrix:
MinGW_x86:
platform: Win32
toolset: v141_xp
gtk-bundle: $(gtk-bundle-x86)
libsndfile-url: $(libsndfile-url-x86)
libgnomecanvas-url: $(libgnomecanvas-url-x86)
libgnomecanvas-dev-url: $(libgnomecanvas-dev-url-x86)
libart-url: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart-lgpl_2.3.21-1_win32.zip
libart-dev-url: http://ftp.gnome.org/pub/gnome/binaries/win32/libart_lgpl/2.3/libart-lgpl-dev_2.3.21-1_win32.zip
mingw-url: $(mingw-url-x86)
artifact-name: "swami"
imageName: 'vs2017-win2016'
pool:
vmImage: $(imageName)
steps:
- task: DownloadBuildArtifacts@0
inputs:
buildType: specific
# https://dev.azure.com/tommbrt/_apis/projects?api-version=5.0
project: 'd3638885-de4a-4ce7-afe7-f237ae461c07'
pipeline: 3
artifactName: fluidsynth-$(platform)
downloadPath: '$(Build.ArtifactStagingDirectory)'
displayName: 'Get fluidsynth'
- task: DownloadBuildArtifacts@0
inputs:
buildType: specific
# https://dev.azure.com/tommbrt/_apis/projects?api-version=5.0
project: 'd3638885-de4a-4ce7-afe7-f237ae461c07'
pipeline: 1
artifactName: libinstpatch-$(platform)
downloadPath: '$(Build.ArtifactStagingDirectory)'
displayName: 'Get libinstpatch'
- script: |
@ECHO ON
mkdir d:\deps || exit -1
cd d:\deps || exit -1
curl -LfsS -o gtk-bundle-dev.zip $(gtk-bundle) || exit -1
curl -LfsS -o libart.zip $(libart-url) || exit -1
curl -LfsS -o libgnomecanvas.zip $(libgnomecanvas-url) || exit -1
7z x -aos -- libgnomecanvas.zip > NUL || exit -1
7z x -aos -- libart.zip > NUL || exit -1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
rm *.zip
cp -rf * $(Build.ArtifactStagingDirectory)
curl -LfsS -o libgnomecanvas-dev.zip $(libgnomecanvas-dev-url) || exit -1
curl -LfsS -o libsndfile-dev.zip $(libsndfile-url) || exit -1
curl -LfsS -o libart-dev.zip $(libart-dev-url) || exit -1
curl -LfsS -o mingw.zip $(mingw-url) || exit -1
7z x -aos -- libgnomecanvas-dev.zip > NUL || exit -1
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
7z x -aos -- libart-dev.zip > NUL || exit -1
7z x -aos -- mingw.zip > NUL || exit -1
rm *.zip
REM need to fix the naming of libsndfile otherwise the linker won't find it
mv lib\libsndfile-1.lib lib\sndfile.lib || exit -1
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
cd $(Build.ArtifactStagingDirectory)\fluidsynth-$(platform) && cp -rf * d:\deps\ && cp -rf * $(Build.ArtifactStagingDirectory) && cd .. && rm -rf $(Build.ArtifactStagingDirectory)\fluidsynth-$(platform)\ || exit -1
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && cp -rf * $(Build.ArtifactStagingDirectory) && cd .. && rm -rf $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
displayName: 'Prerequisites'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
REM remove that path from PATH to make sure sh.exe is not found (cmake will complain otherwise)
set PATH=%PATH:C:\Program Files\Git\bin;=%
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
mkdir build && cd build || exit -1
cmake -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=0 .. || exit -1
mingw32-make.exe all || exit -1
displayName: 'Compile swami'
- script: |
@ECHO ON
cd build
mingw32-make.exe install || exit -1
del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
cd $(Build.ArtifactStagingDirectory)
mkdir docs
cp $(Build.SourcesDirectory)\COPYING docs\distribution.txt
dir
makensis /?
makensis $(Build.SourcesDirectory)\package\win32\swami.nsi || cd .
rm -rf include etc docs man manifest src
rm -f lib/*
mv bin/swami.exe bin/swami
rm -f bin/*.exe
mv bin/swami bin/swami.exe
rm -f bin/*.sh
displayName: 'Copy Artifacts'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: $(artifact-name)-$(platform)