- Rename some SFIZZ_ prefixed definitions where possible to permit some modules to be generic and be reused in other projects, keep project' information in the same place and more explicit - Fixed non-compliant code formatting
441 lines
13 KiB
YAML
441 lines
13 KiB
YAML
name: Build UIs
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'develop'
|
|
- 'master'
|
|
tags:
|
|
- '[0-9]*'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
# Manual builds in all branches
|
|
workflow_dispatch:
|
|
branches:
|
|
- '*'
|
|
env:
|
|
build_type: Release
|
|
|
|
jobs:
|
|
clang_tidy:
|
|
# if: ${{ false }}
|
|
name: Clang Tidy
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: sudo apt-get update && sudo apt-get install clang-tidy
|
|
- name: Run
|
|
run: cd "$GITHUB_WORKSPACE" && scripts/run_clang_tidy.sh
|
|
|
|
build_for_linux:
|
|
# if: ${{ false }}
|
|
name: Linux Ubuntu 20.04
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: |
|
|
packages=(
|
|
libcairo2-dev
|
|
libfontconfig1-dev
|
|
libjack-jackd2-dev
|
|
libpango1.0-dev
|
|
libx11-xcb-dev
|
|
libxcb-cursor-dev
|
|
libxcb-keysyms1-dev
|
|
libxcb-util-dev
|
|
libxcb-xkb-dev
|
|
libxkbcommon-dev
|
|
libxkbcommon-x11-dev
|
|
ninja-build
|
|
)
|
|
sudo apt-get update && sudo apt-get install "${packages[@]}"
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
options=(
|
|
-G Ninja
|
|
-B build
|
|
-S "$GITHUB_WORKSPACE"
|
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
|
-D CMAKE_CXX_STANDARD=17
|
|
-D SFIZZ_JACK=OFF
|
|
-D SFIZZ_RENDER=OFF
|
|
-D SFIZZ_SHARED=OFF
|
|
-D PLUGIN_LV2=ON
|
|
-D PLUGIN_LV2_UI=ON
|
|
-D PLUGIN_PUREDATA=ON
|
|
-D PLUGIN_VST3=ON
|
|
)
|
|
cmake "${options[@]}"
|
|
- name: Build
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
|
|
# No custom Linux packages, build from sources or provided in distro
|
|
|
|
build_for_macos:
|
|
# if: ${{ false }}
|
|
name: macOS 11
|
|
runs-on: macos-11
|
|
env:
|
|
install_name: "sfizz-${{ github.ref_name }}-macos"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
if: ${{ github.ref_type == 'branch' }}
|
|
run: brew install abseil
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
options=(
|
|
-B build
|
|
-S "$GITHUB_WORKSPACE"
|
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
|
-D CMAKE_CXX_STANDARD=17
|
|
-D SFIZZ_SHARED=OFF
|
|
-D PLUGIN_AU=ON
|
|
-D PLUGIN_LV2=ON
|
|
-D PLUGIN_LV2_UI=ON
|
|
-D PLUGIN_VST3=ON
|
|
)
|
|
if [[ ${{ github.ref_type }} == 'branch' ]]; then
|
|
options=(
|
|
${options[@]}
|
|
-D SFIZZ_USE_SYSTEM_ABSEIL=ON
|
|
)
|
|
fi
|
|
cmake "${options[@]}"
|
|
- name: Build
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
cmake \
|
|
--build build \
|
|
--config ${{ env.build_type }} \
|
|
--verbose \
|
|
-j 2
|
|
- name: Package bundles
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: $GITHUB_WORKSPACE/scripts/package-osx-bundles.sh
|
|
- name: Create installer
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}/build
|
|
run: |
|
|
productbuild \
|
|
--distribution $GITHUB_WORKSPACE/scripts/plugin.pkg/package.xml \
|
|
--identifier "sfz.tools.sfizz" \
|
|
--package-path "${{ runner.workspace }}/build" \
|
|
--version 0 \
|
|
${{ env.install_name }}.pkg
|
|
- name: Upload
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: macOS package
|
|
path: ${{ runner.workspace }}/build/${{ env.install_name }}.pkg
|
|
|
|
build_for_windows:
|
|
# if: ${{ false }}
|
|
name: Windows 2019
|
|
runs-on: windows-2019
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- platform: x86
|
|
pkg_platform: Win32
|
|
release_arch: Win32
|
|
bits: 32
|
|
- platform: x64
|
|
pkg_platform: Win64
|
|
release_arch: x64
|
|
bits: 64
|
|
env:
|
|
install_name: sfizz-${{ github.ref_name }}-win${{ matrix.bits }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Configure CMake
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
cmake `
|
|
-G "Visual Studio 16 2019" `
|
|
-A "${{ matrix.release_arch }}" `
|
|
-B build `
|
|
-S "${Env:GITHUB_WORKSPACE}" `
|
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }} `
|
|
-D CMAKE_CXX_STANDARD=17 `
|
|
-D PLUGIN_LV2=ON `
|
|
-D PLUGIN_PUREDATA=ON `
|
|
-D PLUGIN_VST3=ON `
|
|
- name: Build
|
|
working-directory: ${{ runner.workspace }}
|
|
run: cmake --build build --config ${{ env.build_type }} --verbose -j 2
|
|
- name: Install pluginval
|
|
if: ${{ matrix.platform == 'x64' }}
|
|
run: |
|
|
Invoke-WebRequest `
|
|
https://github.com/Tracktion/pluginval/releases/download/latest_release/pluginval_Windows.zip `
|
|
-OutFile pluginval.zip
|
|
Expand-Archive pluginval.zip -DestinationPath pluginval
|
|
echo "$(Get-Location)\pluginval" | Out-File `
|
|
-FilePath ${Env:GITHUB_PATH} `
|
|
-Encoding utf8 `
|
|
-Append
|
|
pluginval\pluginval --version
|
|
- name: Validate VST3
|
|
if: ${{ matrix.platform == 'x64' }}
|
|
working-directory: ${{ runner.workspace }}/build
|
|
run: pluginval --validate-in-process --validate sfizz.vst3
|
|
- name: Create installer
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
working-directory: ${{ runner.workspace }}/build
|
|
run: iscc /O"." /F"${{ env.install_name }}" /dARCH="${{ matrix.platform }}" innosetup.iss
|
|
- name: Upload
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.pkg_platform }} installer
|
|
path: "${{ runner.workspace }}/build/${{ env.install_name }}.exe"
|
|
|
|
archive_source_code:
|
|
# if: startsWith(github.ref, 'refs/tags/')
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
name: Source code archive
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
install_name: sfizz-${{ github.ref_name }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install python3-pip
|
|
sudo pip install git-archive-all
|
|
- name: Archive source code
|
|
shell: bash
|
|
run: |
|
|
cd "$GITHUB_WORKSPACE" && git-archive-all \
|
|
--prefix="${{ env.install_name }}/" \
|
|
-9 "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: Source code tarball
|
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
|
|
|
build_for_mingw:
|
|
if: ${{ false }} # DISABLED TEMPORARILY
|
|
name: MinGW
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- platform: i686
|
|
pkg_platform: Win32
|
|
bits: 32
|
|
- platform: x86_64
|
|
pkg_platform: Win64
|
|
bits: 64
|
|
container:
|
|
image: archlinux
|
|
env:
|
|
install_name: sfizz-${{ github.ref_name }}-mingw${{ matrix.bits }}
|
|
steps:
|
|
- name: Configure pacman repositories
|
|
shell: bash
|
|
run: |
|
|
cat >>/etc/pacman.conf <<EOF
|
|
[multilib]
|
|
Include = /etc/pacman.d/mirrorlist
|
|
[mingw-w64]
|
|
SigLevel = Optional TrustAll
|
|
Server = https://github.com/jpcima/arch-mingw-w64/releases/download/repo.\$arch/
|
|
EOF
|
|
- name: Install dependencies
|
|
shell: bash
|
|
run: |
|
|
packages=(
|
|
base-devel git ninja wget
|
|
mingw-w64-{cmake,gcc,pkg-config,libsndfile}
|
|
)
|
|
pacman -Sqyu --noconfirm
|
|
pacman -Sq --needed --noconfirm "${packages[@]}"
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Fix MinGW headers
|
|
shell: bash
|
|
run: |
|
|
cp -vf "$GITHUB_WORKSPACE"/scripts/mingw_dwrite_3.h \
|
|
/usr/${{ matrix.platform }}-w64-mingw32/include/dwrite_3.h
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
options=(
|
|
-G Ninja
|
|
-B build
|
|
-S "$GITHUB_WORKSPACE"
|
|
-D CMAKE_BUILD_TYPE=${{ env.build_type }}
|
|
-D CMAKE_CXX_STANDARD=17
|
|
-D ENABLE_LTO=OFF
|
|
-D SFIZZ_STATIC_DEPENDENCIES=ON
|
|
-D SFIZZ_JACK=OFF
|
|
-D PLUGIN_PUREDATA=ON
|
|
-D PLUGIN_VST3=ON
|
|
)
|
|
${{ matrix.platform }}-w64-mingw32-cmake "${options[@]}"
|
|
- name: Build
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: ${{ matrix.platform }}-w64-mingw32-cmake \
|
|
--build build --config ${{ env.build_type }} --verbose -j 2
|
|
- name: Install
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
working-directory: ${{ runner.workspace }}
|
|
shell: bash
|
|
run: |
|
|
DESTDIR="$(pwd)/${{ env.install_name }}" \
|
|
${{ matrix.platform }}-w64-mingw32-cmake \
|
|
--build build --config ${{ env.build_type }} --target install
|
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
|
- name: Upload
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.pkg_platform }} MinGW tarball
|
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
|
|
|
build_for_mod:
|
|
if: ${{ false }} # DISABLED: Old image which doesn't work with CMake > 3.5
|
|
name: MOD
|
|
runs-on: ubuntu-20.04
|
|
container:
|
|
image: jpcima/mod-plugin-builder
|
|
options: --user 0
|
|
env:
|
|
install_name: sfizz-${{ github.ref_name }}-moddevices
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- name: Fix up MOD environment
|
|
shell: bash
|
|
run: ln -sf /home/builder/mod-workdir ~/mod-workdir
|
|
- name: Configure CMake
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
mod-plugin-builder /usr/local/bin/cmake \
|
|
-B build \
|
|
-S "$GITHUB_WORKSPACE" \
|
|
-D PROJECT_SYSTEM_PROCESSOR=armv7-a \
|
|
-D CMAKE_BUILD_TYPE=Release \
|
|
-D SFIZZ_JACK=OFF \
|
|
-D PLUGIN_VST3=OFF \
|
|
-D PLUGIN_LV2_UI=OFF
|
|
- name: Build
|
|
shell: bash
|
|
working-directory: ${{ runner.workspace }}
|
|
run: |
|
|
mod-plugin-builder /usr/local/bin/cmake \
|
|
--build build --config ${{ env.build_type }} -- -j 2
|
|
- name: Install
|
|
working-directory: ${{ runner.workspace }}
|
|
shell: bash
|
|
run: |
|
|
DESTDIR="$(pwd)/${{ env.install_name }}" mod-plugin-builder \
|
|
/usr/local/bin/cmake --build build --config ${{ env.build_type }} --target install
|
|
tar czvf "${{ env.install_name }}".tar.gz "${{ env.install_name }}"
|
|
- name: Upload
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: MOD devices tarball
|
|
path: "${{ runner.workspace }}/${{ env.install_name }}.tar.gz"
|
|
|
|
deploy:
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
# - build_for_linux
|
|
# - build_for_mingw
|
|
- build_for_macos
|
|
# - build_for_mod
|
|
- build_for_windows
|
|
- archive_source_code
|
|
steps:
|
|
- name: macOS download
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: macOS package
|
|
|
|
- name: MinGW 32 download
|
|
if: ${{ false }} # DISABLED: MinGW 32 build temporarily disabled
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: Win32 MinGW tarball
|
|
|
|
- name: MinGW 64 download
|
|
if: ${{ false }} # DISABLED: MinGW 64 build temporarily disabled
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: Win64 MinGW tarball
|
|
|
|
- name: Windows 32 download
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: Win32 installer
|
|
|
|
- name: Windows 64 download
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: Win64 installer
|
|
|
|
- name: Source code download
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: Source code tarball
|
|
|
|
- name: MOD download
|
|
if: ${{ false }} # DISABLED: See comment above
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: MOD devices tarball
|
|
|
|
- name: Display file information
|
|
shell: bash
|
|
run: ls -lR
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: Release ${{ github.ref_name }}
|
|
draft: false
|
|
prerelease: false
|
|
files: |
|
|
sfizz-${{ github.ref_name }}-*
|
|
sfizz-${{ github.ref_name }}.*
|