Repository navigation
158 lines (158 loc) · 6.51 KB
/
Copy pathrelease-installers.yml
File metadata and controls
158 lines (158 loc) · 6.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
name: Build public installers
# Packaging and publishing are explicit: docs/site edits must never
# trigger an expensive 3-OS rebuild or attempt to overwrite an existing tag.
on:
workflow_dispatch:
inputs:
publish:
type: boolean
description: Publish checked installers to GitHub Releases
default: false
stable:
type: boolean
description: Stable requires ARSON_STABLE_APPROVED=yes repository variable
default: false
permissions:
contents: read
concurrency:
group: arsoncomp-packages-${{ github.ref }}
cancel-in-progress: true
env:
RELEASE_VERSION: 0.2.0
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: build/_deps/juce-src
key: arson-juce-8.0.12-windows
- name: Build and run all Windows tests
shell: pwsh
run: |
cmake -S . -B build -A x64 -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release --parallel 4
ctest --test-dir build -C Release --output-on-failure
- name: Compile Inno installer
shell: pwsh
run: |
$ErrorActionPreference = 'Stop'
$stage = Join-Path $pwd 'dist\stage'
$out = Join-Path $pwd 'dist\out'
New-Item -ItemType Directory -Force "$stage\VST3", "$stage\Standalone", $out | Out-Null
Copy-Item -Recurse 'build\ArSonComp_artefacts\Release\VST3\ArSonComp.vst3' "$stage\VST3\"
Copy-Item 'build\ArSonComp_artefacts\Release\Standalone\ArSonComp.exe' "$stage\Standalone\"
Copy-Item docs\INSTALL-PUBLIC.md "$stage\START-HERE.md"
Copy-Item LICENSE "$stage\LICENSE"
$iscc = Join-Path ([Environment]::GetFolderPath('ProgramFilesX86')) 'Inno Setup 6\ISCC.exe'
if (-not (Test-Path $iscc)) { choco install innosetup -y --no-progress }
if (-not (Test-Path $iscc)) { throw 'Inno Setup 6 was not found' }
& $iscc "/DStageDir=$stage" "/DAppVersion=$env:RELEASE_VERSION" "/O$out" "packaging\windows\ArSonComp.iss"
if ($LASTEXITCODE -ne 0) { throw "ISCC exit $LASTEXITCODE" }
if (@(Get-ChildItem "$out\*.exe").Count -ne 1) { throw 'Missing installer EXE' }
- uses: actions/upload-artifact@v4
with:
name: ArSonComp-Windows-Installer
path: dist/out/*.exe
if-no-files-found: error
linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Install JUCE prerequisites
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends \
libasound2-dev libjack-jackd2-dev ladspa-sdk libfreetype-dev \
libfontconfig1-dev libx11-dev libxcomposite-dev libxcursor-dev \
libxext-dev libxinerama-dev libxrandr-dev libxrender-dev \
libxi-dev libglu1-mesa-dev libgtk-3-dev xvfb
- uses: actions/cache@v4
with:
path: build/_deps/juce-src
key: arson-juce-8.0.12-ubuntu24
- name: Build, smoke-test and package Linux
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --parallel 2
xvfb-run -a ctest --test-dir build --output-on-failure
bash packaging/linux/package.sh build dist/out "$RELEASE_VERSION"
dpkg-deb --info "dist/out/ArSonComp-$RELEASE_VERSION-Ubuntu-Debian-amd64.deb"
tar -tzf "dist/out/ArSonComp-$RELEASE_VERSION-Linux-x86_64-Portable.tar.gz" | grep -F install.sh
- uses: actions/upload-artifact@v4
with:
name: ArSonComp-Linux-Installers
path: dist/out/*
if-no-files-found: error
macos:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: build/_deps/juce-src
key: arson-juce-8.0.12-macos
- name: Universal build, test and ad-hoc package
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 \
'-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64'
cmake --build build --parallel 3
ctest --test-dir build --output-on-failure
bash packaging/macos/package.sh build dist/out "$RELEASE_VERSION"
test -s "dist/out/ArSonComp-$RELEASE_VERSION-macOS-Universal-AdHoc.pkg"
- uses: actions/upload-artifact@v4
with:
name: ArSonComp-macOS-Installers
path: dist/out/*
if-no-files-found: error
publish:
needs: [windows, linux, macos]
if: >-
github.event_name == 'workflow_dispatch' && inputs.publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: ArSonComp-*-Installer*
path: dist
merge-multiple: true
- name: Publish only after all OS gates pass
shell: bash
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
STABLE_APPROVAL: ${{ vars.ARSON_STABLE_APPROVED }}
STABLE_REQUEST: ${{ inputs.stable }}
run: |
set -euo pipefail
shopt -s nullglob
files=(dist/*.exe dist/*.deb dist/*.tar.gz dist/*.pkg dist/*.zip)
if (( ${#files[@]} < 5 )); then
echo "Missing one or more platform installers"; exit 7
fi
( cd dist && sha256sum ./* > SHA256SUMS.txt )
tag="v${RELEASE_VERSION}-rc.1"
flag="--prerelease"
if [[ "$STABLE_REQUEST" == "true" ]]; then
if [[ "$STABLE_APPROVAL" != "yes" ]]; then
echo "Stable requires repository variable ARSON_STABLE_APPROVED=yes"; exit 8
fi
tag="v${RELEASE_VERSION}"
flag=""
fi
if gh release view "$tag" >/dev/null 2>&1; then
echo "Release already exists: $tag. Refusing to overwrite artifacts."; exit 9
fi
cat > notes.md <<EOF
ArSonComp $tag — Windows Inno Setup, Linux DEB + portable and macOS universal ad-hoc PKG/VST3.
Installation: https://github.com/masarray/arson-comp/blob/$GITHUB_SHA/docs/INSTALL-PUBLIC.md
Source (AGPL): https://github.com/masarray/arson-comp/tree/$GITHUB_SHA
macOS PKG is NOT Apple notarized; Gatekeeper may warn.
CI is not hardware/DAW/ASIO stability certification. Check the included SHA256SUMS.txt.
EOF
gh release create "$tag" dist/* \
--target "$GITHUB_SHA" --title "ArSonComp $tag" $flag --notes-file notes.md