mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-11-27 14:32:12 +00:00
Replace AppVeyor vcpkg CI with Azure Pipelines (#728)
This commit is contained in:
parent
1be0e5ae7c
commit
21d20eac67
2 changed files with 80 additions and 57 deletions
|
@ -1,58 +1,81 @@
|
|||
image:
|
||||
- Visual Studio 2019
|
||||
|
||||
build:
|
||||
parallel: true
|
||||
verbosity: detailed
|
||||
variables:
|
||||
toolset: 'v142'
|
||||
generator: 'Visual Studio 16 2019'
|
||||
VCPKG_DIR: 'C:\vcpkg'
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
||||
environment:
|
||||
# update the vcpkg cache even if build fails
|
||||
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
||||
|
||||
matrix:
|
||||
- platform: ARM
|
||||
- platform: x86
|
||||
- platform: x64
|
||||
|
||||
cache:
|
||||
- c:\Tools\vcpkg\installed
|
||||
|
||||
init:
|
||||
- set TARGET_PLATFORM=
|
||||
- if "%platform%"=="x86" ( set TARGET_PLATFORM=Win32)
|
||||
- if "%platform%"=="x64" ( set TARGET_PLATFORM=x64)
|
||||
- if "%platform%"=="ARM" ( set TARGET_PLATFORM=ARM)
|
||||
- echo %TARGET_PLATFORM%
|
||||
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
|
||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set "generator=Visual Studio 16 2019" && set "toolset=v142" )
|
||||
- echo %generator%
|
||||
- echo %toolset%
|
||||
|
||||
install:
|
||||
# make sure the latest version of git is installed
|
||||
- choco upgrade git ninja -y
|
||||
- ninja --version
|
||||
- cmake --version
|
||||
# manually update vcpkg
|
||||
- cd "C:\Tools\vcpkg"
|
||||
- git pull
|
||||
- .\bootstrap-vcpkg.bat
|
||||
- cd %appveyor_build_folder%
|
||||
- vcpkg install glib:%platform%-windows || type C:\Tools\vcpkg\buildtrees\libffi\config-arm-windows-out.log
|
||||
|
||||
build_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -Werror=dev -G "%generator%" -A %TARGET_PLATFORM% -T "%toolset%" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=c:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||
- cmake --build . --config Release # build libfluidsynth and fluidsynth exec
|
||||
- if not "%platform%"=="ARM" ( cmake --build . --config Release --target check ) # build and exec unittests, unless when cross-compiling
|
||||
|
||||
after_build:
|
||||
- 7z a fluidsynth-vcpkg-%platform%.zip %APPVEYOR_BUILD_FOLDER%\build\src\Release\*
|
||||
|
||||
artifacts:
|
||||
- path: build/fluidsynth-vcpkg-%platform%.zip
|
||||
name: FluidSynth
|
||||
jobs:
|
||||
- job: vcpkg
|
||||
workspace:
|
||||
clean: all
|
||||
strategy:
|
||||
matrix:
|
||||
ARM:
|
||||
platform: 'ARM'
|
||||
cmake_platform: 'ARM'
|
||||
configuration: 'Release'
|
||||
x86:
|
||||
platform: 'x86'
|
||||
cmake_platform: 'Win32'
|
||||
configuration: 'Release'
|
||||
x64:
|
||||
platform: 'x64'
|
||||
cmake_platform: 'x64'
|
||||
configuration: 'Release'
|
||||
pool:
|
||||
vmImage: 'windows-2019'
|
||||
steps:
|
||||
- script: |
|
||||
@ECHO ON
|
||||
echo $(generator)
|
||||
echo $(toolset)
|
||||
choco upgrade ninja -y
|
||||
ninja --version
|
||||
cmake --version
|
||||
REM manually update vcpkg
|
||||
REM cd "$(VCPKG_DIR)" || exit -1
|
||||
REM git pull || exit -1
|
||||
REM .\bootstrap-vcpkg.bat || exit -1
|
||||
REM cd $(Build.SourcesDirectory)
|
||||
where vcpkg.exe
|
||||
vcpkg install --only-downloads glib:$(platform)-windows
|
||||
displayName: 'Prerequisites'
|
||||
- task: Cache@2
|
||||
displayName: "Cache vcpkg's packages"
|
||||
inputs:
|
||||
key: $(VCPKG_DIR)\downloads\glib* | "$(platform)"
|
||||
path: "$(VCPKG_DIR)"
|
||||
cacheHitVar: CACHE_RESTORED
|
||||
- script: |
|
||||
@ECHO ON
|
||||
vcpkg install glib:$(platform)-windows
|
||||
displayName: 'vcpkg build glib'
|
||||
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||
- script: |
|
||||
@ECHO ON
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -Werror=dev -G "$(generator)" -A "$(cmake_platform)" -T "$(toolset)" -Denable-pkgconfig=0 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
|
||||
REM build libfluidsynth and fluidsynth exec
|
||||
cmake --build . --config $(configuration) || exit -1
|
||||
displayName: 'Compile fluidsynth'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
REM build and exec unittests, unless when cross-compiling
|
||||
if not "%platform%"=="ARM" ( cmake --build build --config $(configuration) --target check )
|
||||
displayName: 'Execute Unittests'
|
||||
- script: |
|
||||
@ECHO ON
|
||||
cd build
|
||||
cmake --build . --config $(configuration) --target install || exit -1
|
||||
REM del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
|
||||
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
|
||||
displayName: 'Copy Artifacts'
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||
artifactName: fluidsynth-vcpkg-$(platform)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
| <img src="https://www.kernel.org/theme/images/logos/tux.png" height="30" alt=""> **Linux** | [![Build Status Travis](https://travis-ci.org/FluidSynth/fluidsynth.svg?branch=master)](https://travis-ci.org/FluidSynth/fluidsynth/branches) |
|
||||
| <img src="https://cdn.pling.com/img//hive/content-pre1/112422-1.png" height="25" alt=""> **FreeBSD** | [![Build Status](https://api.cirrus-ci.com/github/FluidSynth/fluidsynth.svg?branch=master)](https://cirrus-ci.com/github/FluidSynth/fluidsynth) |
|
||||
| <img src="https://www.microsoft.com/windows/favicon.ico" height="25" alt=""> **Windows** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.Win?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=3&branchName=master) |
|
||||
| <img src="https://www.microsoft.com/windows/favicon.ico" height="25" alt=""> **Windows (vcpkg)** | [![Build status](https://ci.appveyor.com/api/projects/status/anbmtebt5uk4q1it/branch/master?svg=true)](https://ci.appveyor.com/project/derselbst/fluidsynth-g2ouw/branch/master) |
|
||||
| <img src="https://www.microsoft.com/windows/favicon.ico" height="25" alt=""> **Windows (vcpkg)** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.vcpkg?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=6&branchName=master) |
|
||||
| <img src="https://www.apple.com/favicon.ico" height="30" alt=""> **MacOSX** | [![Build Status](https://dev.azure.com/tommbrt/tommbrt/_apis/build/status/FluidSynth.fluidsynth.macOS?branchName=master)](https://dev.azure.com/tommbrt/tommbrt/_build/latest?definitionId=5&branchName=master) |
|
||||
| <img src="https://www.android.com/favicon.ico" height="30" alt=""> **Android** | [![CircleCI](https://circleci.com/gh/FluidSynth/fluidsynth/tree/master.svg?style=shield)](https://circleci.com/gh/FluidSynth/fluidsynth) |
|
||||
|
||||
|
|
Loading…
Reference in a new issue