CI reorganization

This commit is contained in:
redtide 2020-10-27 04:12:54 +01:00 committed by Jean Pierre Cimalando
parent 401e0a4e21
commit 6a2382f37a
13 changed files with 147 additions and 87 deletions

83
.appveyor.yml Normal file
View file

@ -0,0 +1,83 @@
version: build-{build}
configuration: Release
environment:
matrix:
- job_name: macOS Mojave
appveyor_build_worker_image: macos-mojave
INSTALL_DIR: sfizz-$(APPVEYOR_REPO_TAG_NAME)-macos
- job_name: Windows x86
appveyor_build_worker_image: Visual Studio 2019
platform: x86
VCPKG_TRIPLET: x86-windows-static
PATH: C:\Program Files (x86)\Inno Setup 6;%PATH%
- job_name: Windows x64
appveyor_build_worker_image: Visual Studio 2019
platform: x64
VCPKG_TRIPLET: x64-windows-static
PATH: C:\Program Files (x86)\Inno Setup 6;%PATH%
matrix:
allow_failures:
- platform: x86
- platform: x64
for:
- matrix:
only:
- job_name: macOS Mojave
init:
- system_profiler SPSoftwareDataType
- cmake --version
- gcc -v
install:
- brew install jack
- brew install dylibbundler
before_build:
- chmod +x ${APPVEYOR_BUILD_FOLDER}/scripts/appveyor/before_build.sh
- ${APPVEYOR_BUILD_FOLDER}/scripts/appveyor/before_build.sh
build_script: cd build && make -j2
after_build:
- chmod +x ${APPVEYOR_BUILD_FOLDER}/scripts/appveyor/after_build.sh
- ${APPVEYOR_BUILD_FOLDER}/scripts/appveyor/after_build.sh
test: off
artifacts:
- name: macOS Tarball
path: "sfizz-*.tar.gz"
- matrix:
only:
- job_name: Windows x86
cache: c:\tools\vcpkg\installed\ -> appveyor.yml
install: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\install.cmd
before_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\before_build.cmd
build_script: cmake --build . --config Release -j2
after_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\after_build.cmd
artifacts:
- name: x86 Setup
path: "sfizz-*.exe"
- matrix:
only:
- job_name: Windows x64
cache: c:\tools\vcpkg\installed\ -> appveyor.yml
install: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\install.cmd
before_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\before_build.cmd
build_script: cmake --build . --config Release -j2
after_build: call %APPVEYOR_BUILD_FOLDER%\scripts\appveyor\after_build.cmd
artifacts:
- name: x64 Setup
path: "sfizz-*.exe"
deploy:
- provider: GitHub
auth_token:
secure: xOugGAynvnZdc0DXaL3rlgMf4CICFLkdO8JxoRfLQMKJhkj/kZ4d8h7NCFneDzXG
artifact: macOS Tarball,x86 Setup,x64 Setup
draft: false
prerelease: false
force_update: true
on:
APPVEYOR_REPO_TAG: true

13
.gitignore vendored
View file

@ -1,4 +1,4 @@
build*
build*/*
docs
.vscode
perf.data
@ -23,17 +23,6 @@ clients/sfzprint
/editor/external/fluentui-system-icons/
# gh-pages unstaged files:
_api/
_site/
.bundle/
api/
assets/
node_modules/
.jekyll-cache
.jekyll-metadata
.sass-cache
*.lock
*.sublime-*
*.code-*
.kak.tags.namecache

View file

@ -9,7 +9,6 @@ cache:
jobs:
include:
- name: "clang-tidy checks"
stage: "Tests"
addons:
apt:
packages:
@ -42,27 +41,12 @@ jobs:
install: .travis/download_cmake.sh
script: .travis/script_test.sh
- name: "macOS"
stage: "Build"
os: osx
osx_image: xcode11.3
addons:
homebrew:
packages:
- cmake
- libsndfile
- jack
- dylibbundler
env:
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-${TRAVIS_OS_NAME}-${TRAVIS_CPU_ARCH}"
script: .travis/script_osx.sh
after_success: .travis/prepare_tarball.sh
- name: "MOD devices arm"
env:
- CONTAINER=jpcima/mod-plugin-builder
- CROSS_COMPILE=moddevices-arm
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-moddevices"
- DEPLOY_BUILD=true
before_install: .travis/before_install_moddevices.sh
install: .travis/install_moddevices.sh
script: .travis/script_moddevices.sh
@ -160,8 +144,7 @@ jobs:
script: .travis/script_plugins.sh
after_success: .travis/prepare_tarball.sh
- stage: "Deploy"
name: "Source packaging"
- name: "Source packaging"
if: (tag =~ /^v?[0-9]/) AND (type = push)
env:
- INSTALL_DIR="sfizz-${TRAVIS_BRANCH}-src"

View file

@ -13,7 +13,7 @@ buildenv make DESTDIR=${PWD}/${INSTALL_DIR} install
tar -zcvf "${INSTALL_DIR}.tar.gz" ${INSTALL_DIR}
# Only release a tarball if there is a tag
if [[ ${TRAVIS_TAG} != "" ]]; then
if [[ ${TRAVIS_TAG} != "" ]] && [[ ${DEPLOY_BUILD} ]]; then
mv "${INSTALL_DIR}.tar.gz" ${TRAVIS_BUILD_DIR}
fi

View file

@ -1,53 +0,0 @@
version: build-{build}
image: Visual Studio 2019
configuration: Release
platform:
- Win32
- x64
cache:
- c:\tools\vcpkg\installed\ -> appveyor.yml
install:
- cmd: choco install -y innosetup
- cmd: set PATH=C:\Program Files (x86)\Inno Setup 6;%PATH%
- cmd: if %platform%==Win32 set VCPKG_TRIPLET=x86-windows-static
- cmd: if %platform%==x64 set VCPKG_TRIPLET=x64-windows-static
# - cmd: cd c:\tools\vcpkg\
# - cmd: git pull
# - cmd: .\bootstrap-vcpkg.bat
# - cmd: cd %APPVEYOR_BUILD_FOLDER%
- cmd: vcpkg install libsndfile:%VCPKG_TRIPLET%
before_build:
- cmd: git submodule update --init --recursive
- cmd: mkdir CMakeBuild
- cmd: cd CMakeBuild
- cmd: cmake .. -G"Visual Studio 16 2019" -A"%platform%" -DSFIZZ_JACK=OFF -DSFIZZ_BENCHMARKS=OFF -DSFIZZ_TESTS=OFF -DSFIZZ_LV2=ON -DSFIZZ_VST=ON -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET% -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
build_script:
- cmd: cmake --build . --config Release -j
after_build:
- cmd: if %platform%==Win32 set RELEASE_ARCH=x86
- cmd: if %platform%==x64 set RELEASE_ARCH=x64
- cmd: 7z a sfizz-lv2-%APPVEYOR_REPO_TAG_NAME%-%RELEASE_ARCH%-msvc.zip sfizz.lv2
- cmd: 7z a sfizz-vst3-%APPVEYOR_REPO_TAG_NAME%-%RELEASE_ARCH%-msvc.zip sfizz.vst3
- cmd: 7z a sfizz-lib-%APPVEYOR_REPO_TAG_NAME%-%RELEASE_ARCH%-msvc.zip src/Release/sfizz*
- cmd: iscc.exe /dARCH=%RELEASE_ARCH% innosetup.iss
artifacts:
- name: Packages
path: 'CMakeBuild/sfizz-*-msvc*'
# Deploy to GitHub Releases
# See https://www.appveyor.com/docs/deployment/github/
deploy:
- provider: GitHub
auth_token:
secure: xOugGAynvnZdc0DXaL3rlgMf4CICFLkdO8JxoRfLQMKJhkj/kZ4d8h7NCFneDzXG
artifact: Packages
draft: false
prerelease: false
force_update: true
on:
appveyor_repo_tag: true

View file

@ -40,6 +40,11 @@ if(APPLE)
find_library(APPLE_AUDIOUNIT_LIBRARY "AudioUnit")
find_library(APPLE_COREAUDIO_LIBRARY "CoreAudio")
find_library(APPLE_COREMIDI_LIBRARY "CoreMIDI")
# See https://stackoverflow.com/a/54103956
# and https://stackoverflow.com/a/21692023
# Apparently this is not needed in Travis CI using addons
# but it is in Appveyor instead
list (APPEND CMAKE_PREFIX_PATH /usr/local)
endif()
# The variable CMAKE_SYSTEM_PROCESSOR is incorrect on Visual studio...

View file

@ -0,0 +1,4 @@
@echo off
iscc.exe /dARCH=%platform% innosetup.iss
move *.exe ../

12
scripts/appveyor/after_build.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
set -ex
make DESTDIR=${PWD}/${INSTALL_DIR} install
tar -zcvf "${INSTALL_DIR}.tar.gz" ${INSTALL_DIR}
# Only release a tarball if there is a tag
if [[ ${APPVEYOR_REPO_TAG} ]]; then
mv "${INSTALL_DIR}.tar.gz" ${APPVEYOR_BUILD_FOLDER}
fi
cd ${APPVEYOR_BUILD_FOLDER}

View file

@ -0,0 +1,16 @@
git submodule update --init --recursive
mkdir build && cd build
if %platform%==x86 set RELEASE_ARCH=Win32
if %platform%==x64 set RELEASE_ARCH=x64
cmake .. -G"Visual Studio 16 2019" -A"%RELEASE_ARCH%"^
-DSFIZZ_JACK=OFF^
-DSFIZZ_BENCHMARKS=OFF^
-DSFIZZ_TESTS=OFF^
-DSFIZZ_LV2=ON^
-DSFIZZ_VST=ON^
-DCMAKE_BUILD_TYPE=Release^
-DVCPKG_TARGET_TRIPLET=%VCPKG_TRIPLET%^
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake

View file

@ -0,0 +1,14 @@
#!/bin/bash
set -ex
git submodule update --init --recursive
mkdir -p build/${INSTALL_DIR} && cd build
cmake -DCMAKE_BUILD_TYPE=Release \
-DSFIZZ_VST=ON \
-DSFIZZ_AU=ON \
-DSFIZZ_TESTS=OFF \
-DCMAKE_CXX_STANDARD=14 \
-DLV2PLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/LV2 \
-DVSTPLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/VST3 \
-DAUPLUGIN_INSTALL_DIR=/Library/Audio/Plug-Ins/Components \
..

View file

@ -0,0 +1,7 @@
choco install -y innosetup
REM Uncomment the next 4 lines to force vcpkg update
REM cd c:\tools\vcpkg\
REM git pull
REM .\bootstrap-vcpkg.bat
REM cd %APPVEYOR_BUILD_FOLDER%
vcpkg install libsndfile:%VCPKG_TRIPLET%

View file

@ -33,7 +33,7 @@ DefaultDirName={commonpf}\{#MyAppName}
DefaultGroupName={#MyAppPublisher}
;DisableDirPage=yes
LicenseFile="sfizz.lv2\LICENSE.md"
OutputBaseFileName={#MyAppName}-{#MyAppVersion}-{#Arch}-msvc-setup
OutputBaseFileName={#MyAppName}-{#MyAppVersion}-msvc-{#Arch}-setup
OutputDir=.
UninstallFilesDir={app}
WizardImageFile="C:\Program Files (x86)\Inno Setup 6\WizModernImage-IS.bmp"

View file

@ -255,7 +255,7 @@ elseif(SFIZZ_AU)
DESTINATION "${PROJECT_BINARY_DIR}/${AUPLUGIN_BUNDLE_NAME}")
# Add the resource fork
if (TRUE)
if (FALSE)
execute_process(COMMAND "xcrun" "--find" "Rez"
OUTPUT_VARIABLE OSX_REZ_COMMAND OUTPUT_STRIP_TRAILING_WHITESPACE)
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/include")