2017-12-14 18:59:50 +00:00
|
|
|
|
2021-05-10 21:19:24 +00:00
|
|
|
trigger:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- '.azure/azure-pipelines-android.yml'
|
|
|
|
- '.azure/azure-pipelines-mac.yml'
|
|
|
|
- '.azure/azure-pipelines-win.yml'
|
|
|
|
- '.circleci/config.yml'
|
|
|
|
- '.github/workflows/linux.yml'
|
|
|
|
- '.github/workflows/sonarcloud.yml'
|
|
|
|
- '.cirrus.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
2021-05-23 11:02:04 +00:00
|
|
|
parameters:
|
|
|
|
- name: UseCache
|
|
|
|
displayName: Use Dependency Cache
|
|
|
|
type: boolean
|
|
|
|
default: true
|
|
|
|
|
2021-06-10 07:39:10 +00:00
|
|
|
schedules:
|
|
|
|
- cron: "0 0 * * 1"
|
|
|
|
displayName: 'Weekly Monday Midnight build without caching'
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
always: true
|
|
|
|
|
2020-12-29 18:35:04 +00:00
|
|
|
variables:
|
|
|
|
toolset: 'v142'
|
|
|
|
generator: 'Visual Studio 16 2019'
|
2021-05-23 11:02:04 +00:00
|
|
|
configuration: 'RelWithDebInfo'
|
2022-04-21 12:15:24 +00:00
|
|
|
VCPKG_REVISION: 'e809a42f87565e803b2178a0c11263f462d1800a'
|
2017-12-14 18:59:50 +00:00
|
|
|
|
2020-12-29 18:35:04 +00:00
|
|
|
jobs:
|
|
|
|
- job: vcpkg
|
|
|
|
workspace:
|
|
|
|
clean: all
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
ARM:
|
2021-05-23 11:02:04 +00:00
|
|
|
platform: 'arm'
|
2020-12-29 18:35:04 +00:00
|
|
|
cmake_platform: 'ARM'
|
2021-05-23 11:02:04 +00:00
|
|
|
ARM64:
|
|
|
|
platform: 'arm64'
|
|
|
|
cmake_platform: 'ARM64'
|
2020-12-29 18:35:04 +00:00
|
|
|
x86:
|
|
|
|
platform: 'x86'
|
|
|
|
cmake_platform: 'Win32'
|
|
|
|
x64:
|
|
|
|
platform: 'x64'
|
|
|
|
cmake_platform: 'x64'
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
|
|
|
- task: Cache@2
|
|
|
|
displayName: "Cache vcpkg's packages"
|
2021-05-23 11:02:04 +00:00
|
|
|
condition: and(not(in(variables['Build.Reason'], 'Schedule')), ${{ parameters.useCache }})
|
2020-12-29 18:35:04 +00:00
|
|
|
inputs:
|
2021-05-23 11:02:04 +00:00
|
|
|
key: $(VCPKG_REVISION) | "$(platform)"
|
|
|
|
path: '$(VCPKG_INSTALLATION_ROOT)\installed'
|
2020-12-29 18:35:04 +00:00
|
|
|
cacheHitVar: CACHE_RESTORED
|
2021-05-23 11:02:04 +00:00
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
echo $(generator)
|
|
|
|
echo $(toolset)
|
|
|
|
# choco upgrade ninja -y
|
|
|
|
# ninja --version
|
|
|
|
cmake --version
|
|
|
|
rm -rf C:/Strawberry/perl/bin/pkg-config*
|
2021-12-05 16:45:10 +00:00
|
|
|
choco install --svc --sdc -i pkgconfiglite
|
|
|
|
# chocoTask=$!
|
2021-05-23 11:02:04 +00:00
|
|
|
# manually update vcpkg
|
|
|
|
cd $VCPKG_INSTALLATION_ROOT
|
|
|
|
# git checkout master
|
2021-06-10 07:26:43 +00:00
|
|
|
git remote -v
|
2021-12-05 16:45:10 +00:00
|
|
|
git fetch --tags --prune --progress origin
|
2021-06-10 07:26:43 +00:00
|
|
|
git checkout --force $(VCPKG_REVISION)
|
2021-05-23 11:02:04 +00:00
|
|
|
sed -i 's/arm64/arm/g' ports/glib/portfile.cmake
|
|
|
|
./bootstrap-vcpkg.sh
|
2021-12-05 16:45:10 +00:00
|
|
|
# wait $chocoTask
|
2021-05-23 11:02:04 +00:00
|
|
|
which pkg-config
|
|
|
|
displayName: 'Update vcpkg'
|
|
|
|
- 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-$(cmake_platform)
|
|
|
|
downloadPath: '$(Agent.TempDirectory)'
|
|
|
|
displayName: 'Get libinstpatch'
|
|
|
|
condition: and(succeeded(), and(ne(variables['platform'], 'arm'), ne(variables['platform'], 'arm64')))
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(Agent.TempDirectory)\libinstpatch-$(cmake_platform)'
|
|
|
|
Contents: '**'
|
|
|
|
TargetFolder: '$(VCPKG_INSTALLATION_ROOT)\installed\$(platform)-windows'
|
|
|
|
displayName: 'Install libinstpatch'
|
|
|
|
condition: and(succeeded(), and(ne(variables['platform'], 'arm'), ne(variables['platform'], 'arm64')))
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
vcpkg install glib:$(platform)-windows libsndfile:$(platform)-windows
|
|
|
|
displayName: 'vcpkg build Dependencies'
|
|
|
|
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
cd $VCPKG_INSTALLATION_ROOT/installed/$(platform)-windows/
|
|
|
|
pwd
|
|
|
|
rm -rf include/FLAC* include/ffi* include/iconv* include/opus tools share
|
|
|
|
ls -Rg .
|
|
|
|
pkg-config --list-all
|
|
|
|
pkg-config --cflags libinstpatch-1.0 || true
|
|
|
|
displayName: 'Cleanup dependencies'
|
|
|
|
condition: and(succeeded(), ne(variables.CACHE_RESTORED, 'true'))
|
|
|
|
- bash: |
|
|
|
|
set -ex
|
2020-12-29 18:35:04 +00:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2021-05-23 11:02:04 +00:00
|
|
|
cmake -Werror=dev -G "$(generator)" -A "$(cmake_platform)" -T "$(toolset)" -Denable-readline=0 -DCMAKE_TOOLCHAIN_FILE=$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=$VCPKG_INSTALLATION_ROOT/installed/$(platform)-windows -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
|
|
|
cmake --build . --config $(configuration) --parallel 3
|
2020-12-29 18:35:04 +00:00
|
|
|
displayName: 'Compile fluidsynth'
|
2021-05-23 11:02:04 +00:00
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
cmake --build build --config $(configuration) --target check --parallel 3
|
2020-12-29 18:35:04 +00:00
|
|
|
displayName: 'Execute Unittests'
|
2021-05-23 11:02:04 +00:00
|
|
|
condition: and(succeeded(), and(ne(variables['platform'], 'arm'), ne(variables['platform'], 'arm64')))
|
2022-01-23 14:33:33 +00:00
|
|
|
- bash: |
|
|
|
|
set -ex
|
|
|
|
cmake --build build --config $(configuration) --target demo --parallel 3
|
|
|
|
displayName: 'Compile demos'
|
2020-12-29 18:35:04 +00:00
|
|
|
- script: |
|
|
|
|
@ECHO ON
|
|
|
|
cd build
|
|
|
|
cmake --build . --config $(configuration) --target install || exit -1
|
2021-05-23 11:02:04 +00:00
|
|
|
REM del bin\concrt*.dll
|
2020-12-29 18:35:04 +00:00
|
|
|
REM del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
|
|
|
|
REM del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
|
|
|
|
REM del $(Build.ArtifactStagingDirectory)\lib\instpatch*.lib
|
|
|
|
REM del $(Build.ArtifactStagingDirectory)\lib\pkgconfig\libinstpatch*.pc
|
|
|
|
REM rd $(Build.ArtifactStagingDirectory)\include\libinstpatch-2 /s /q
|
2021-05-23 11:02:04 +00:00
|
|
|
displayName: 'fluidsynth install'
|
|
|
|
- task: CopyFiles@2
|
|
|
|
inputs:
|
|
|
|
SourceFolder: '$(VCPKG_INSTALLATION_ROOT)/installed/$(platform)-windows/'
|
|
|
|
Contents: '**'
|
|
|
|
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
CleanTargetFolder: true
|
|
|
|
displayName: 'Copy Binaries to Artifact Dir'
|
2020-12-29 18:35:04 +00:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
inputs:
|
|
|
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
|
|
|
artifactName: fluidsynth-vcpkg-$(platform)
|