Skip to content

release: v0.15.0

release: v0.15.0 #63

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//' | sed 's/-rc\.[0-9]*//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release --target Intersect_All
- name: Package
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
mkdir staging
cp -r "$ART_ROOT/VST3/INTERSECT.vst3" staging/
cp -a "$ART_ROOT/Standalone/." staging/
cd staging && 7z a ../INTERSECT-${{ github.ref_name }}-Windows-x64.zip *
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-Windows-x64
path: INTERSECT-${{ github.ref_name }}-Windows-x64.zip
build-linux:
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libfreetype-dev libx11-dev libxrandr-dev libxcursor-dev libxinerama-dev libwebkit2gtk-4.1-dev libcurl4-openssl-dev
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//' | sed 's/-rc\.[0-9]*//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release --target Intersect_All
- name: Audit Linux ABI baseline
shell: bash
run: |
set -euo pipefail
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
STANDALONE="$ART_ROOT/Standalone/INTERSECT"
VST3="$ART_ROOT/VST3/INTERSECT.vst3/Contents/x86_64-linux/INTERSECT.so"
MAX_GLIBC="2.35"
ldd --version
find_linked_library() {
local binary="$1"
local soname="$2"
ldd "$binary" | awk -v soname="$soname" '$1 == soname { print $3; exit }'
}
fail_newer_glibc() {
local binary="$1"
local bad_versions=""
local version
while IFS= read -r version; do
if [ "$(printf '%s\n%s\n' "$MAX_GLIBC" "$version" | sort -V | tail -n 1)" != "$MAX_GLIBC" ]; then
bad_versions="${bad_versions}GLIBC_${version}"$'\n'
fi
done < <(readelf --version-info "$binary" | grep -oE 'GLIBC_[0-9]+(\.[0-9]+)+' | sed 's/^GLIBC_//' | sort -Vu)
if [ -n "$bad_versions" ]; then
echo "::error file=$binary::Requires glibc newer than GLIBC_$MAX_GLIBC"
printf '%s' "$bad_versions"
return 1
fi
}
fail_unavailable_symbols() {
local binary="$1"
local soname="$2"
local pattern="$3"
local provider
local symbols
local missing=""
symbols=$(readelf --version-info "$binary" | grep -oE "$pattern" | sort -Vu || true)
if [ -z "$symbols" ]; then
return 0
fi
provider=$(find_linked_library "$binary" "$soname")
if [ -z "$provider" ] || [ ! -f "$provider" ]; then
echo "::error file=$binary::Could not locate $soname via ldd"
return 1
fi
while IFS= read -r symbol; do
if ! grep -Fxq "$symbol" < <(strings "$provider"); then
missing="${missing}${symbol}"$'\n'
fi
done <<< "$symbols"
if [ -n "$missing" ]; then
echo "::error file=$binary::Requires symbols not provided by $provider"
printf '%s' "$missing"
return 1
fi
}
audit_binary() {
local binary="$1"
local ldd_output
echo "Auditing $binary"
test -f "$binary"
if ! ldd_output=$(ldd "$binary" 2>&1); then
echo "$ldd_output"
echo "::error file=$binary::ldd failed"
return 1
fi
echo "$ldd_output"
if echo "$ldd_output" | grep -q 'not found'; then
echo "::error file=$binary::Unresolved shared library dependency"
return 1
fi
fail_newer_glibc "$binary"
fail_unavailable_symbols "$binary" libstdc++.so.6 'GLIBCXX_[0-9]+(\.[0-9]+)+|CXXABI_[0-9]+(\.[0-9]+)+'
fail_unavailable_symbols "$binary" libasound.so.2 'ALSA_[0-9]+(\.[0-9]+)+([a-z0-9]+)?'
}
audit_binary "$STANDALONE"
audit_binary "$VST3"
- name: Package
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
mkdir staging
cp -r "$ART_ROOT/VST3/INTERSECT.vst3" staging/
cp -a "$ART_ROOT/Standalone/." staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-Linux-x64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-Linux-x64
path: INTERSECT-${{ github.ref_name }}-Linux-x64.zip
build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//' | sed 's/-rc\.[0-9]*//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release --target Intersect_All
- name: Codesign
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
codesign --force --deep --sign - "$ART_ROOT/AU/INTERSECT.component"
codesign --force --deep --sign - "$ART_ROOT/VST3/INTERSECT.vst3"
codesign --force --deep --sign - "$ART_ROOT/Standalone/INTERSECT.app"
- name: Package
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
mkdir staging
cp -r "$ART_ROOT/VST3/INTERSECT.vst3" staging/
cp -r "$ART_ROOT/Standalone/INTERSECT.app" staging/
cp -r "$ART_ROOT/AU/INTERSECT.component" staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-macOS-arm64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-macOS-arm64
path: INTERSECT-${{ github.ref_name }}-macOS-arm64.zip
build-macos-x64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//' | sed 's/-rc\.[0-9]*//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release --target Intersect_All
- name: Codesign
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
codesign --force --deep --sign - "$ART_ROOT/AU/INTERSECT.component"
codesign --force --deep --sign - "$ART_ROOT/VST3/INTERSECT.vst3"
codesign --force --deep --sign - "$ART_ROOT/Standalone/INTERSECT.app"
- name: Package
run: |
ART_ROOT=build/Intersect_artefacts
if [ -d "$ART_ROOT/Release" ]; then
ART_ROOT="$ART_ROOT/Release"
fi
mkdir staging
cp -r "$ART_ROOT/VST3/INTERSECT.vst3" staging/
cp -r "$ART_ROOT/Standalone/INTERSECT.app" staging/
cp -r "$ART_ROOT/AU/INTERSECT.component" staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-macOS-x64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-macOS-x64
path: INTERSECT-${{ github.ref_name }}-macOS-x64.zip
release:
needs: [build-windows, build-linux, build-macos-arm64, build-macos-x64]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Extract changelog for this version
run: |
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
# Extract the section for this version from CHANGELOG.md
# Matches from the version heading to the next heading (or EOF)
awk -v ver="$VERSION" '
/^## \[/ {
if (found) exit
if (index($0, "[" ver "]")) { found=1; next }
}
found { print }
' CHANGELOG.md > release_notes.md
# If no changelog section found, use a default message
if [ ! -s release_notes.md ]; then
echo "Release ${{ github.ref_name }}" > release_notes.md
fi
- uses: actions/download-artifact@v5
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
prerelease: ${{ contains(github.ref_name, '-rc') }}
files: |
artifacts/INTERSECT-Windows-x64/INTERSECT-${{ github.ref_name }}-Windows-x64.zip
artifacts/INTERSECT-Linux-x64/INTERSECT-${{ github.ref_name }}-Linux-x64.zip
artifacts/INTERSECT-macOS-arm64/INTERSECT-${{ github.ref_name }}-macOS-arm64.zip
artifacts/INTERSECT-macOS-x64/INTERSECT-${{ github.ref_name }}-macOS-x64.zip