-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathazure-pipelines.yml
104 lines (101 loc) · 4.3 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
# 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-24.04'
steps:
- script: |
sudo apt-get update
sudo apt-get -y install \
libglib2.0-dev \
libsndfile-dev
displayName: 'Prerequisites'
- script: |
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/libinstpatch_install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=0 ..
make
displayName: 'Compile libinstpatch'
- job: macOS
pool:
vmImage: 'macos-15'
steps:
- script: |
brew update || brew update
brew upgrade
brew install glib gobject-introspection libsndfile pkg-config
displayName: 'Prerequisites'
- script: |
mkdir build && cd build
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
cmake -DINTROSPECTION_ENABLED=0 -DCMAKE_INSTALL_PREFIX=$HOME/libinstpatch_install -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=0 ..
make
displayName: 'Compile libinstpatch'
- job: Windows
pool:
vmImage: 'windows-2019'
strategy:
matrix:
x86:
gtk-bundle: 'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip'
libsndfile-url: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win32.zip'
platform: 'Win32'
toolset: 'v142'
artifactName: 'libinstpatch-$(platform)'
x64:
gtk-bundle: 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip'
libsndfile-url: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win64.zip'
platform: 'x64'
toolset: 'v142'
artifactName: 'libinstpatch-$(platform)'
XP_x86:
gtk-bundle: 'http://ftp.gnome.org/pub/gnome/binaries/win32/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip'
libsndfile-url: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win32.zip'
platform: 'Win32'
toolset: 'v141_xp'
artifactName: 'libinstpatch-XP-$(platform)'
CFLAGS: '/arch:IA32'
CXXFLAGS: '/arch:IA32'
XP_x64:
gtk-bundle: 'http://ftp.gnome.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip'
libsndfile-url: 'https://github.com/libsndfile/libsndfile/releases/download/1.2.2/libsndfile-1.2.2-win64.zip'
platform: 'x64'
toolset: 'v141_xp'
artifactName: 'libinstpatch-XP-$(platform)'
steps:
- 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 libsndfile-dev.zip $(libsndfile-url) || exit -1
7z x -aos -- gtk-bundle-dev.zip > NUL || exit -1
7z x -aos -- libsndfile-dev.zip > NUL || exit -1
rm *.zip
cd libsndfile-*
cp -rf * ..
cd ..
rm -rf libsndfile-*
displayName: 'Prerequisites'
- script: |
@ECHO ON
SET "PATH=d:\deps\bin;%PATH%"
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
mkdir build && cd build || exit -1
cmake -G "Visual Studio 16 2019" -T $(toolset) -A $(platform) -DLIB_SUFFIX="" -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 .. || exit -1
cmake --build . --config RelWithDebInfo --target install || exit -1
del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
displayName: 'Compile libinstpatch'
- bash: |
set -ex
art_dir=$(echo "$(Build.ArtifactStagingDirectory)" | sed 's/\\/\//g' | sed 's|\([a-zA-Z]\):|/\1|')
cp d:/deps/bin/libglib*.dll d:/deps/bin/libgobject*.dll d:/deps/bin/libgthread*.dll d:/deps/bin/*intl*.dll d:/deps/bin/sndfile*.dll $art_dir/bin
displayName: 'Copy Artifacts'
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)
artifactName: $(artifactName)