-
Notifications
You must be signed in to change notification settings - Fork 4
189 lines (152 loc) · 6.1 KB
/
Copy pathbuild.yml
File metadata and controls
189 lines (152 loc) · 6.1 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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
create_release:
description: 'Create a release with artifacts'
required: false
default: 'false'
env:
BUILD_TYPE: Release
jobs:
build-macos:
runs-on: macos-14 # Apple Silicon runner
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup CMake
uses: lukka/get-cmake@latest
- name: Configure CMake
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" \
-DJAMWIDE_UNIVERSAL=ON \
-DJAMWIDE_DEV_BUILD=OFF \
-DCLAP_WRAPPER_DOWNLOAD_DEPENDENCIES=TRUE
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }} -j $(sysctl -n hw.ncpu)
- name: Package artifacts
run: |
mkdir -p artifacts/macos
# Package CLAP
cd build
zip -r ../artifacts/macos/JamWide-macOS-CLAP.zip JamWide.clap
# Package VST3
zip -r ../artifacts/macos/JamWide-macOS-VST3.zip JamWide.vst3
# Package AU
zip -r ../artifacts/macos/JamWide-macOS-AU.zip JamWide.component
# Create combined package
zip -r ../artifacts/macos/JamWide-macOS-All.zip JamWide.clap JamWide.vst3 JamWide.component
- name: Upload macOS artifacts
uses: actions/upload-artifact@v4
with:
name: JamWide-macOS
path: artifacts/macos/*.zip
retention-days: 30
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup CMake
uses: lukka/get-cmake@latest
- name: Configure CMake
run: |
cmake -B build `
-G "Visual Studio 17 2022" `
-A x64 `
-DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} `
-DJAMWIDE_DEV_BUILD=OFF `
-DCLAP_WRAPPER_DOWNLOAD_DEPENDENCIES=TRUE
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }} -j $env:NUMBER_OF_PROCESSORS
- name: Package artifacts
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path artifacts/windows
# Debug: Show what was built
Write-Host "=== Build output structure ==="
Get-ChildItem -Path build -Recurse -Include "*.clap","*.vst3" | Select-Object FullName
# CLAP is in build/CLAP/Release/JamWide.clap
Compress-Archive -Path build/CLAP/${{ env.BUILD_TYPE }}/JamWide.clap -DestinationPath artifacts/windows/JamWide-Windows-CLAP.zip
# VST3 is a folder bundle in build/Release/JamWide.vst3/
Compress-Archive -Path build/${{ env.BUILD_TYPE }}/JamWide.vst3 -DestinationPath artifacts/windows/JamWide-Windows-VST3.zip
# Create combined package
Compress-Archive -Path build/CLAP/${{ env.BUILD_TYPE }}/JamWide.clap, build/${{ env.BUILD_TYPE }}/JamWide.vst3 -DestinationPath artifacts/windows/JamWide-Windows-All.zip
- name: Upload Windows artifacts
uses: actions/upload-artifact@v4
with:
name: JamWide-Windows
path: artifacts/windows/*.zip
retention-days: 30
release:
needs: [build-macos, build-windows]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v') || github.event.inputs.create_release == 'true'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Get version from tag
id: get_version
run: |
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
else
VERSION="dev-$(date +%Y%m%d-%H%M%S)"
fi
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Generate release notes
id: release_notes
run: |
# Get build number from source
BUILD_NUM=$(grep -o 'JAMWIDE_BUILD_NUMBER [0-9]*' src/build_number.h | awk '{print $2}' || echo "unknown")
cat << EOF > release_notes.md
## JamWide ${{ steps.get_version.outputs.VERSION }}
**Build:** r${BUILD_NUM}
### Downloads
#### macOS (Universal: Apple Silicon + Intel)
- **JamWide-macOS-All.zip** - All formats (CLAP, VST3, AU)
- **JamWide-macOS-CLAP.zip** - CLAP only
- **JamWide-macOS-VST3.zip** - VST3 only
- **JamWide-macOS-AU.zip** - Audio Unit only
#### Windows (x64)
- **JamWide-Windows-All.zip** - All formats (CLAP, VST3)
- **JamWide-Windows-CLAP.zip** - CLAP only
- **JamWide-Windows-VST3.zip** - VST3 only
### Installation
**macOS:**
- CLAP: \`~/Library/Audio/Plug-Ins/CLAP/\`
- VST3: \`~/Library/Audio/Plug-Ins/VST3/\`
- AU: \`~/Library/Audio/Plug-Ins/Components/\`
**Windows:**
- CLAP: \`C:\\Program Files\\Common Files\\CLAP\\\`
- VST3: \`C:\\Program Files\\Common Files\\VST3\\\`
---
⚠️ **Early Development** - Not yet ready for production use
EOF
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: JamWide ${{ steps.get_version.outputs.VERSION }}
body_path: release_notes.md
draft: false
prerelease: true
files: |
artifacts/JamWide-macOS/*.zip
artifacts/JamWide-Windows/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}