diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 00000000..655a5b67 --- /dev/null +++ b/.appveyor.yml @@ -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 diff --git a/.gitignore b/.gitignore index d9ddf04e..b1f6f768 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.travis.yml b/.travis.yml index 47ae06a8..1e2a0c6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/.travis/prepare_tarball.sh b/.travis/prepare_tarball.sh index 6e111406..1447feea 100755 --- a/.travis/prepare_tarball.sh +++ b/.travis/prepare_tarball.sh @@ -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 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 47a33c26..00000000 --- a/appveyor.yml +++ /dev/null @@ -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 diff --git a/cmake/SfizzConfig.cmake b/cmake/SfizzConfig.cmake index f9387a09..b10a7a6f 100644 --- a/cmake/SfizzConfig.cmake +++ b/cmake/SfizzConfig.cmake @@ -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... diff --git a/scripts/appveyor/after_build.cmd b/scripts/appveyor/after_build.cmd new file mode 100644 index 00000000..069a079d --- /dev/null +++ b/scripts/appveyor/after_build.cmd @@ -0,0 +1,4 @@ +@echo off + +iscc.exe /dARCH=%platform% innosetup.iss +move *.exe ../ diff --git a/scripts/appveyor/after_build.sh b/scripts/appveyor/after_build.sh new file mode 100755 index 00000000..2eb8e9af --- /dev/null +++ b/scripts/appveyor/after_build.sh @@ -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} diff --git a/scripts/appveyor/before_build.cmd b/scripts/appveyor/before_build.cmd new file mode 100644 index 00000000..6b7fa13e --- /dev/null +++ b/scripts/appveyor/before_build.cmd @@ -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 diff --git a/scripts/appveyor/before_build.sh b/scripts/appveyor/before_build.sh new file mode 100644 index 00000000..bd242fbb --- /dev/null +++ b/scripts/appveyor/before_build.sh @@ -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 \ + .. diff --git a/scripts/appveyor/install.cmd b/scripts/appveyor/install.cmd new file mode 100644 index 00000000..4b7b8c28 --- /dev/null +++ b/scripts/appveyor/install.cmd @@ -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% diff --git a/scripts/innosetup.iss.in b/scripts/innosetup.iss.in index 4ac737bd..3586f7d3 100644 --- a/scripts/innosetup.iss.in +++ b/scripts/innosetup.iss.in @@ -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" diff --git a/vst/CMakeLists.txt b/vst/CMakeLists.txt index b5db2495..c6f573fb 100644 --- a/vst/CMakeLists.txt +++ b/vst/CMakeLists.txt @@ -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")