Skip to content

Add stereo separation factor #84

Add stereo separation factor

Add stereo separation factor #84

Workflow file for this run

name: Release Juicy Noise VST
on:
push:
tags:
- '*'
branches:
- 'main'
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [
ubuntu-latest,
windows-2019
]
runs-on: ${{ matrix.os }}
env:
BUILDER_IMAGE_UBUNTU: ghcr.io/danand/docker-juce-build-linux/juce-build-linux:0.1.1
BUILDER_IMAGE_FILE_UBUNTU: juce-build-linux.tar
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Format ref
id: format-ref
shell: bash
run: |
sha_short="$(echo "${{ github.sha }}" | head -c 8)"
ref="${sha_short}"
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
ref="${{ github.ref_name }}"
fi
echo "::set-output name=value::${ref}"
- name: Restore builder image cache for Linux
if: matrix.os == 'ubuntu-latest'
id: cache-builder-image-ubuntu
uses: actions/cache@v3
with:
path: ${{ env.BUILDER_IMAGE_FILE_UBUNTU }}
key: ${{ env.BUILDER_IMAGE_UBUNTU }}
- name: Pull builder image for Linux
if: |
matrix.os == 'ubuntu-latest' &&
steps.cache-builder-image-ubuntu.outputs.cache-hit != 'true'
shell: bash
run: |
docker login \
--username ${{ github.repository_owner }} \
--password ${{ secrets._GITHUB_PAT }} \
ghcr.io
docker pull ${{ env.BUILDER_IMAGE_UBUNTU }}
docker save \
-o ${{ env.BUILDER_IMAGE_FILE_UBUNTU }} \
${{ env.BUILDER_IMAGE_UBUNTU }}
- name: Load builder image cache for Linux
if: |
matrix.os == 'ubuntu-latest' &&
steps.cache-builder-image-ubuntu.outputs.cache-hit == 'true'
shell: bash
run: |
docker load -i ${{ env.BUILDER_IMAGE_FILE_UBUNTU }}
- name: Restore Projucer cache for Linux
if: matrix.os == 'ubuntu-latest'
id: cache-projucer-ubuntu
uses: actions/cache@v3
with:
path: JUCE/extras/Projucer/Builds/LinuxMakefile/build/
key: Projucer-${{ matrix.os }}-${{ hashFiles('JUCE/extras/Projucer/Source/**') }}
- name: Restore JUCE modules cache for Linux
if: matrix.os == 'ubuntu-latest'
id: cache-juce-modules-ubuntu
uses: actions/cache@v3
with:
path: juicy-noise-fx/Builds/LinuxMakefile/build/intermediate/**/include_*
key: JUCE-modules-${{ matrix.os }}-${{ hashFiles('JUCE/modules/**') }}
- name: Restore Projucer cache for Windows
if: matrix.os == 'windows-2019'
id: cache-projucer-windows
uses: actions/cache@v3
with:
path: JUCE\extras\Projucer\Builds\VisualStudio2019
key: Projucer-${{ matrix.os }}-${{ hashFiles('JUCE\extras\Projucer\Source\**') }}
- name: Restore JUCE modules cache for Windows
if: matrix.os == 'windows-2019'
id: cache-juce-modules-windows
uses: actions/cache@v3
with:
path: 'juicy-noise-fx\Builds\VisualStudio2019\**\Shared Code\include_*'
key: JUCE-modules-${{ matrix.os }}-${{ hashFiles('JUCE\modules\**') }}
- name: Touch restored cache
shell: bash
run: |
if [ -d "JUCE/extras/Projucer/Builds" ]; then
find "JUCE/extras/Projucer/Builds" -type f | while read -r file; do touch "${file}"; done
fi
if [ -d "juicy-noise-fx/Builds" ]; then
find "juicy-noise-fx/Builds" -type f | while read -r file; do touch "${file}"; done
fi
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
project_root="juicy-noise-fx"
jucer_project="juicy-noise-fx.jucer"
juce_repo="JUCE"
outputs_dir="${project_root}/Builds/LinuxMakefile/build"
cwd="$(pwd)"
mkdir -p "${outputs_dir}"
docker run \
--rm \
--user "$(id -u):$(id -g)" \
--mount "type=bind,source=${cwd}/${project_root},target=/project-root" \
--mount "type=bind,source=${cwd}/${juce_repo},target=/JUCE" \
--mount "type=bind,source=${cwd}/${outputs_dir},target=/outputs" \
--env "JUCER_PROJECT=${jucer_project}" \
${{ env.BUILDER_IMAGE_UBUNTU }}
- name: Find MSBuild
if: matrix.os == 'windows-2019'
uses: microsoft/setup-msbuild@v1.1
- name: Build for Windows
if: matrix.os == 'windows-2019'
shell: pwsh
run: |
$project_path = "$((Get-Location).Path)\juicy-noise-fx\juicy-noise-fx.jucer"
pushd "JUCE\extras\Projucer\Builds\VisualStudio2019"
msbuild Projucer.sln
$projucer = "$((Get-Location).Path)\x64\Debug\App\Projucer.exe"
$job = Start-Job -ScriptBlock { `
param($executable, $project) `
& $executable "--resave", "${project}" `
} `
-ArgumentList `
"${projucer}", `
"${project_path}"
Start-Sleep -Seconds 20
Receive-Job -Job $job
Remove-Job -Job $job
popd
pushd "juicy-noise-fx\Builds\VisualStudio2019"
msbuild juicy-noise-fx.sln
- name: Pack artifacts for Linux
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
find . -name "juicy-noise-fx.so" \
| while read -r so_file; do
platform="$(basename "$(dirname "${so_file}")")"
archive_name="juicy-noise-fx-${{ steps.format-ref.outputs.value }}-${platform}"
archive_dir="${archive_name}/juicy-noise-fx.vst3/Contents/${platform}"
mkdir -p "${archive_dir}"
cp "${so_file}" "${archive_dir}/"
zip -r "${archive_name}.zip" "${archive_dir}/"
rm -rf "${archive_dir}"
done
- name: Pack artifacts for Windows
if: matrix.os == 'windows-2019'
shell: bash
run: |
vst_name="juicy-noise-fx.vst3"
find . -type f -name "${vst_name}" \
| while read -r vst_file; do
cp "${vst_file}" "${vst_name}"
arch="$(basename "$(realpath "$(dirname "${vst_file}")/../..")")"
archive_name="juicy-noise-fx-${{ steps.format-ref.outputs.value }}-${arch}-windows"
7z a "${archive_name}.zip" "${vst_name}"
done
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: vst
path: juicy-noise-fx-*.zip
if-no-files-found: error
retention-days: 2
release:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: List artifacts
run: |
echo "Artifacts:"
ls -R
- name: Release
uses: softprops/action-gh-release@v1
with:
token: '${{ secrets._GITHUB_PAT }}'
files: './**/juicy-noise-fx-*.zip'