mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-05-05 05:20:56 +00:00
Update CI scripts from master
This commit is contained in:
parent
6776569abe
commit
6b0ddee85c
3 changed files with 148 additions and 69 deletions
|
@ -1,58 +1,81 @@
|
||||||
image:
|
|
||||||
- Visual Studio 2019
|
|
||||||
|
|
||||||
build:
|
variables:
|
||||||
parallel: true
|
toolset: 'v142'
|
||||||
verbosity: detailed
|
generator: 'Visual Studio 16 2019'
|
||||||
|
VCPKG_DIR: 'C:\vcpkg'
|
||||||
|
|
||||||
configuration:
|
jobs:
|
||||||
- Release
|
- job: vcpkg
|
||||||
|
workspace:
|
||||||
environment:
|
clean: all
|
||||||
# update the vcpkg cache even if build fails
|
strategy:
|
||||||
APPVEYOR_SAVE_CACHE_ON_ERROR: true
|
matrix:
|
||||||
|
ARM:
|
||||||
matrix:
|
platform: 'ARM'
|
||||||
- platform: ARM
|
cmake_platform: 'ARM'
|
||||||
- platform: x86
|
configuration: 'Release'
|
||||||
- platform: x64
|
x86:
|
||||||
|
platform: 'x86'
|
||||||
cache:
|
cmake_platform: 'Win32'
|
||||||
- c:\Tools\vcpkg\installed
|
configuration: 'Release'
|
||||||
|
x64:
|
||||||
init:
|
platform: 'x64'
|
||||||
- set TARGET_PLATFORM=
|
cmake_platform: 'x64'
|
||||||
- if "%platform%"=="x86" ( set TARGET_PLATFORM=Win32)
|
configuration: 'Release'
|
||||||
- if "%platform%"=="x64" ( set TARGET_PLATFORM=x64)
|
pool:
|
||||||
- if "%platform%"=="ARM" ( set TARGET_PLATFORM=ARM)
|
vmImage: 'windows-2019'
|
||||||
- echo %TARGET_PLATFORM%
|
steps:
|
||||||
- echo %APPVEYOR_BUILD_WORKER_IMAGE%
|
- script: |
|
||||||
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2019" ( set "generator=Visual Studio 16 2019" && set "toolset=v142" )
|
@ECHO ON
|
||||||
- echo %generator%
|
echo $(generator)
|
||||||
- echo %toolset%
|
echo $(toolset)
|
||||||
|
choco upgrade ninja -y
|
||||||
install:
|
ninja --version
|
||||||
# make sure the latest version of git is installed
|
cmake --version
|
||||||
- choco upgrade git ninja -y
|
REM manually update vcpkg
|
||||||
- ninja --version
|
REM cd "$(VCPKG_DIR)" || exit -1
|
||||||
- cmake --version
|
REM git pull || exit -1
|
||||||
# manually update vcpkg
|
REM .\bootstrap-vcpkg.bat || exit -1
|
||||||
- cd "C:\Tools\vcpkg"
|
REM cd $(Build.SourcesDirectory)
|
||||||
- git pull
|
where vcpkg.exe
|
||||||
- .\bootstrap-vcpkg.bat
|
vcpkg install --only-downloads glib:$(platform)-windows
|
||||||
- cd %appveyor_build_folder%
|
displayName: 'Prerequisites'
|
||||||
- vcpkg install glib:%platform%-windows || type C:\Tools\vcpkg\buildtrees\libffi\config-arm-windows-out.log
|
- task: Cache@2
|
||||||
|
displayName: "Cache vcpkg's packages"
|
||||||
build_script:
|
inputs:
|
||||||
- mkdir build
|
key: $(VCPKG_DIR)\downloads\glib* | "$(platform)"
|
||||||
- cd build
|
path: "$(VCPKG_DIR)"
|
||||||
- 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 ..
|
cacheHitVar: CACHE_RESTORED
|
||||||
- cmake --build . --config Release # build libfluidsynth and fluidsynth exec
|
- script: |
|
||||||
- if not "%platform%"=="ARM" ( cmake --build . --config Release --target check ) # build and exec unittests, unless when cross-compiling
|
@ECHO ON
|
||||||
|
vcpkg install glib:$(platform)-windows
|
||||||
after_build:
|
displayName: 'vcpkg build glib'
|
||||||
- 7z a fluidsynth-vcpkg-%platform%.zip %APPVEYOR_BUILD_FOLDER%\build\src\Release\*
|
condition: ne(variables.CACHE_RESTORED, 'true')
|
||||||
|
- script: |
|
||||||
artifacts:
|
@ECHO ON
|
||||||
- path: build/fluidsynth-vcpkg-%platform%.zip
|
mkdir build
|
||||||
name: FluidSynth
|
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)
|
||||||
|
|
|
@ -49,6 +49,7 @@ jobs:
|
||||||
mv -f * ..
|
mv -f * ..
|
||||||
cd ..
|
cd ..
|
||||||
rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\
|
rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\
|
||||||
|
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
|
||||||
displayName: 'Prerequisites'
|
displayName: 'Prerequisites'
|
||||||
- script: |
|
- script: |
|
||||||
@ECHO ON
|
@ECHO ON
|
||||||
|
@ -122,6 +123,7 @@ jobs:
|
||||||
REM need to fix the naming of libsndfile otherwise the linker won't find it
|
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.lib lib\sndfile.lib || exit -1
|
||||||
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
||||||
|
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
|
||||||
displayName: 'Prerequisites'
|
displayName: 'Prerequisites'
|
||||||
- script: |
|
- script: |
|
||||||
@ECHO ON
|
@ECHO ON
|
||||||
|
@ -146,12 +148,14 @@ jobs:
|
||||||
gtk-bundle: $(gtk-bundle-x86)
|
gtk-bundle: $(gtk-bundle-x86)
|
||||||
libsndfile-url: $(libsndfile-url-x86)
|
libsndfile-url: $(libsndfile-url-x86)
|
||||||
mingw-url: $(mingw-url-x86)
|
mingw-url: $(mingw-url-x86)
|
||||||
|
artifact-prefix: "fluidsynth-mingw"
|
||||||
x64:
|
x64:
|
||||||
CMAKE_FLAGS:
|
CMAKE_FLAGS:
|
||||||
platform: x64
|
platform: x64
|
||||||
gtk-bundle: $(gtk-bundle-x64)
|
gtk-bundle: $(gtk-bundle-x64)
|
||||||
libsndfile-url: $(libsndfile-url-x64)
|
libsndfile-url: $(libsndfile-url-x64)
|
||||||
mingw-url: $(mingw-url-x64)
|
mingw-url: $(mingw-url-x64)
|
||||||
|
artifact-prefix: "fluidsynth-mingw"
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'vs2017-win2016'
|
vmImage: 'vs2017-win2016'
|
||||||
steps:
|
steps:
|
||||||
|
@ -180,6 +184,7 @@ jobs:
|
||||||
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
mv lib\libsndfile-1.def lib\sndfile.def || exit -1
|
||||||
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
|
cd mingw*\ && cp -rf * .. && cd .. && rm -rf mingw* || exit -1
|
||||||
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && mv -f * .. && cd .. && rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
|
cd $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform) && cp -rf * d:\deps\ && mv -f * .. && cd .. && rmdir $(Build.ArtifactStagingDirectory)\libinstpatch-$(platform)\ || exit -1
|
||||||
|
DEL /F C:\Strawberry\perl\bin\pkg-config.bat
|
||||||
displayName: 'Prerequisites'
|
displayName: 'Prerequisites'
|
||||||
- script: |
|
- script: |
|
||||||
@ECHO ON
|
@ECHO ON
|
||||||
|
@ -189,7 +194,7 @@ jobs:
|
||||||
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
|
||||||
pkg-config --list-all
|
pkg-config --list-all
|
||||||
mkdir build && cd build || exit -1
|
mkdir build && cd build || exit -1
|
||||||
cmake -Werror=dev -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) $(CMAKE_FLAGS) -Denable-readline=0 -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
|
cmake -Werror=dev -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory) $(CMAKE_FLAGS) -Denable-readline=0 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 .. || exit -1
|
||||||
mingw32-make.exe all || exit -1
|
mingw32-make.exe all || exit -1
|
||||||
displayName: 'Compile fluidsynth'
|
displayName: 'Compile fluidsynth'
|
||||||
- script: |
|
- script: |
|
||||||
|
@ -201,3 +206,20 @@ jobs:
|
||||||
cd build || exit -1
|
cd build || exit -1
|
||||||
mingw32-make.exe check || exit -1
|
mingw32-make.exe check || exit -1
|
||||||
displayName: 'Execute Unittests'
|
displayName: 'Execute Unittests'
|
||||||
|
continueOnError: 'true'
|
||||||
|
- script: |
|
||||||
|
@ECHO ON
|
||||||
|
cd build
|
||||||
|
mingw32-make.exe install || exit -1
|
||||||
|
xcopy test $(Build.ArtifactStagingDirectory)\bin /s
|
||||||
|
del $(Build.ArtifactStagingDirectory)\bin\concrt*.dll
|
||||||
|
del $(Build.ArtifactStagingDirectory)\bin\vcruntime*.dll
|
||||||
|
del $(Build.ArtifactStagingDirectory)\bin\msvcp*.dll
|
||||||
|
del $(Build.ArtifactStagingDirectory)\lib\instpatch*.lib
|
||||||
|
del $(Build.ArtifactStagingDirectory)\lib\pkgconfig\libinstpatch*.pc
|
||||||
|
rd $(Build.ArtifactStagingDirectory)\include\libinstpatch-2 /s /q
|
||||||
|
displayName: 'Copy Artifacts'
|
||||||
|
- task: PublishBuildArtifacts@1
|
||||||
|
inputs:
|
||||||
|
pathtoPublish: $(Build.ArtifactStagingDirectory)
|
||||||
|
artifactName: $(artifact-prefix)-$(platform)
|
||||||
|
|
58
.travis.yml
58
.travis.yml
|
@ -1,15 +1,18 @@
|
||||||
language: c
|
language: c
|
||||||
sudo: false
|
sudo: false
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: focal
|
||||||
|
git:
|
||||||
|
depth: false # disable shallow fetch, history is needed by SonarQube
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
update: true
|
update: true
|
||||||
sources:
|
sources:
|
||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
- llvm-toolchain-bionic-7
|
- llvm-toolchain-focal-7
|
||||||
- llvm-toolchain-bionic-8
|
- llvm-toolchain-focal-8
|
||||||
- llvm-toolchain-bionic-9
|
- llvm-toolchain-focal-9
|
||||||
|
- llvm-toolchain-focal-10
|
||||||
packages:
|
packages:
|
||||||
- cmake-data
|
- cmake-data
|
||||||
- cmake
|
- cmake
|
||||||
|
@ -36,33 +39,61 @@ env:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
- addons:
|
||||||
|
sonarcloud:
|
||||||
|
organization: "fluidsynth"
|
||||||
|
env:
|
||||||
|
- BW="build-wrapper-linux-x86-64 --out-dir bw-output"
|
||||||
|
- SONARSC="sonar-scanner -Dsonar.cfamily.build-wrapper-output=build/bw-output"
|
||||||
|
|
||||||
- arch: arm64
|
- arch: arm64
|
||||||
env:
|
env:
|
||||||
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7 && sudo apt-get install gcc-7"
|
- CC="gcc-7"
|
||||||
|
- CXX="g++-7"
|
||||||
|
- MATRIX_EVAL="sudo apt-get install gcc-7 g++-7"
|
||||||
|
|
||||||
|
- dist: trusty
|
||||||
|
env:
|
||||||
|
- CMAKE_FLAGS=""
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8 && sudo apt-get install gcc-8"
|
- CC="gcc-8"
|
||||||
|
- CXX="g++-8"
|
||||||
|
- MATRIX_EVAL="sudo apt-get install gcc-8 g++-8"
|
||||||
- CMAKE_FLAGS="-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
- CMAKE_FLAGS="-Denable-debug=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- MATRIX_EVAL="CC=clang-7 && CXX=clang++-7 && sudo apt-get install clang-7"
|
- CC="clang-7"
|
||||||
|
- CXX="clang++-7"
|
||||||
|
- MATRIX_EVAL="sudo apt-get install clang-7"
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8 && sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
|
- CC="clang-8"
|
||||||
|
- CXX="clang++-8"
|
||||||
|
- MATRIX_EVAL="sudo rm -f /usr/local/clang-7.0.0/bin/clang-tidy && sudo ln -s /usr/bin/clang-tidy-8 /usr/bin/clang-tidy && sudo apt-get install clang-8 clang-tidy-8"
|
||||||
- CMAKE_FLAGS="-Denable-profiling=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
- CMAKE_FLAGS="-Denable-profiling=1 -DCMAKE_C_FLAGS_DEBUG=-fuse-ld=gold"
|
||||||
|
|
||||||
- env:
|
- env:
|
||||||
- MATRIX_EVAL="CC=clang-9 && CXX=clang++-9 && sudo apt-get install clang-9"
|
- CC="clang-9"
|
||||||
|
- CXX="clang++-9"
|
||||||
|
- MATRIX_EVAL="sudo apt-get install clang-9"
|
||||||
|
|
||||||
|
- env:
|
||||||
|
- CC="clang-10"
|
||||||
|
- CXX="clang++-10"
|
||||||
|
- MATRIX_EVAL="sudo apt-get install clang-10"
|
||||||
|
|
||||||
- os: linux-ppc64le
|
- os: linux-ppc64le
|
||||||
env:
|
env:
|
||||||
- CMAKE_FLAGS=""
|
- CMAKE_FLAGS=""
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- eval "${MATRIX_EVAL}"
|
|
||||||
- which clang-tidy || true
|
- which clang-tidy || true
|
||||||
- ls -la `which clang-tidy` || true
|
- ls -la `which clang-tidy` || true
|
||||||
- echo $PATH
|
- echo $PATH
|
||||||
|
- echo $MATRIX_EVAL
|
||||||
|
- eval "${MATRIX_EVAL}"
|
||||||
|
- echo $SONARSC
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir $HOME/fluidsynth_install/
|
- mkdir $HOME/fluidsynth_install/
|
||||||
|
@ -70,6 +101,9 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install ${CMAKE_FLAGS} -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
- cmake -Werror=dev -DCMAKE_INSTALL_PREFIX=$HOME/fluidsynth_install ${CMAKE_FLAGS} -Denable-portaudio=1 -Denable-ladspa=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_VERBOSE_MAKEFILE=1 -DNO_GUI=1 ..
|
||||||
- make -j4
|
- ${BW} make -j4
|
||||||
|
- ls -la
|
||||||
- make check
|
- make check
|
||||||
- make install # install only on linux, as CMAKE_INSTALL_PREFIX is ignored for frameworks on macosx and I cant tell whether that's correct or a bug.
|
- make install
|
||||||
|
- cd ..
|
||||||
|
- ${SONARSC}
|
||||||
|
|
Loading…
Reference in a new issue