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="$BUILD_TYPE" -D CMAKE_CXX_STANDARD=17 -D SFIZZ_JACK=OFF -D SFIZZ_RENDER=OFF -D SFIZZ_SHARED=OFF -D SFIZZ_LV2=ON -D SFIZZ_LV2_UI=ON -D SFIZZ_PUREDATA=ON -D SFIZZ_VST=ON ) cmake "${options[@]}" - name: Build shell: bash working-directory: ${{ runner.workspace }} run: cmake --build build --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.pkg" 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="$BUILD_TYPE" -D CMAKE_CXX_STANDARD=17 -D SFIZZ_SHARED=OFF -D SFIZZ_AU=ON -D SFIZZ_LV2=ON -D SFIZZ_LV2_UI=ON -D SFIZZ_VST=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 --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 }} - name: Upload if: ${{ github.ref_type == 'tag' }} uses: actions/upload-artifact@v3 with: name: macOS package path: ${{ runner.workspace }}/build/${{ env.install_name }} 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 steps: - name: Set install name run: echo "install_name=sfizz-$GITHUB_REF_NAME-moddevices" >> "$GITHUB_ENV" - uses: actions/checkout@v3 with: submodules: recursive - name: Fix up MOD environment shell: bash run: ln -sf /home/builder/mod-workdir ~/mod-workdir - name: Create Build Environment shell: bash working-directory: ${{ runner.workspace }} run: mod-plugin-builder /usr/local/bin/cmake -E make_directory build - name: Configure CMake shell: bash working-directory: ${{ runner.workspace }}/build run: | mod-plugin-builder /usr/local/bin/cmake "$GITHUB_WORKSPACE" \ -DPROJECT_SYSTEM_PROCESSOR=armv7-a \ -DCMAKE_BUILD_TYPE=Release \ -DSFIZZ_JACK=OFF \ -DSFIZZ_VST=OFF \ -DSFIZZ_LV2_UI=OFF - name: Build shell: bash working-directory: ${{ runner.workspace }}/build run: mod-plugin-builder /usr/local/bin/cmake --build . --config "$BUILD_TYPE" -- -j 2 - name: Install working-directory: ${{ runner.workspace }}/build shell: bash run: | DESTDIR="$(pwd)/$install_name" mod-plugin-builder /usr/local/bin/cmake --build . --config "$BUILD_TYPE" --target install tar czvf "$install_name".tar.gz "$install_name" - name: Upload uses: actions/upload-artifact@v3 with: name: MOD devices tarball path: ${{ runner.workspace }}/build/${{ env.install_name }}.tar.gz 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 SFIZZ_LV2=ON ` -D SFIZZ_PUREDATA=ON ` -D SFIZZ_VST=ON ` - name: Build working-directory: ${{ runner.workspace }} run: cmake --build build -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 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 <