Skip to content

Commit 6f53cee

Browse files
committed
Switch to .pkg/.exe/.deb installers with Azure Trusted Signing
Replaces the zip-based ci/build.sh flow with installer outputs (Inno Setup on Windows, productbuild on macOS, cpack DEB on Linux) signed via Microsoft Trusted Signing on Windows and Apple Developer ID on macOS.
1 parent 7bf9e7b commit 6f53cee

19 files changed

Lines changed: 757 additions & 303 deletions

.github/workflows/build.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
7+
concurrency:
8+
group: build-${{ github.ref || github.run_id }}
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ${{ matrix.os }}
14+
timeout-minutes: 60
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- name: Windows
20+
os: windows-latest
21+
- name: Linux
22+
os: ubuntu-latest
23+
- name: macOS
24+
os: macos-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
with:
28+
submodules: recursive
29+
30+
- name: Install Linux dependencies
31+
if: matrix.name == 'Linux'
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y --no-install-recommends \
35+
ninja-build clang g++ \
36+
libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev \
37+
libfreetype-dev libfontconfig1-dev \
38+
libx11-dev libxcomposite-dev libxcursor-dev libxext-dev \
39+
libxinerama-dev libxrandr-dev libxrender-dev \
40+
libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev
41+
shell: bash
42+
43+
- name: Install Inno Setup (Windows)
44+
if: matrix.name == 'Windows'
45+
run: choco install innosetup --no-progress -y
46+
shell: bash
47+
48+
- name: Build installer
49+
run: ./Installer/build.sh
50+
shell: bash
51+
env:
52+
APPLICATION: ${{ secrets.APPLICATION }}
53+
INSTALLER: ${{ secrets.INSTALLER }}
54+
APPLE_USER: ${{ secrets.APPLE_USER }}
55+
APPLE_PASS: ${{ secrets.APPLE_PASS }}
56+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
57+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
58+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
59+
60+
- name: Upload Artifact
61+
uses: actions/upload-artifact@v4
62+
if: always()
63+
with:
64+
name: Binaries ${{ matrix.name }}
65+
path: bin/*
66+
retention-days: 30

.github/workflows/build_linux.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.github/workflows/build_macos.yaml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/build_windows.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- '**'
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ${{ matrix.os }}
11+
timeout-minutes: 60
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- name: Windows
17+
os: windows-latest
18+
- name: Linux
19+
os: ubuntu-latest
20+
- name: macOS
21+
os: macos-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- name: Install Linux dependencies
28+
if: matrix.name == 'Linux'
29+
run: |
30+
sudo apt-get update
31+
sudo apt-get install -y --no-install-recommends \
32+
ninja-build clang g++ \
33+
libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev \
34+
libfreetype-dev libfontconfig1-dev \
35+
libx11-dev libxcomposite-dev libxcursor-dev libxext-dev \
36+
libxinerama-dev libxrandr-dev libxrender-dev \
37+
libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev
38+
shell: bash
39+
40+
- name: Install Inno Setup (Windows)
41+
if: matrix.name == 'Windows'
42+
run: choco install innosetup --no-progress -y
43+
shell: bash
44+
45+
- name: Build installer
46+
run: ./Installer/build.sh
47+
shell: bash
48+
env:
49+
APPLICATION: ${{ secrets.APPLICATION }}
50+
INSTALLER: ${{ secrets.INSTALLER }}
51+
APPLE_USER: ${{ secrets.APPLE_USER }}
52+
APPLE_PASS: ${{ secrets.APPLE_PASS }}
53+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
54+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
55+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
56+
57+
- name: Upload Artifact
58+
uses: actions/upload-artifact@v4
59+
if: always()
60+
with:
61+
name: Binaries ${{ matrix.name }}
62+
path: bin/*
63+
retention-days: 30
64+
65+
release:
66+
name: Release
67+
needs: build
68+
runs-on: ubuntu-latest
69+
timeout-minutes: 30
70+
steps:
71+
- uses: actions/checkout@v4
72+
- name: Download Artifacts
73+
uses: actions/download-artifact@v4
74+
- name: Create Release
75+
run: ./release.sh
76+
shell: bash
77+
env:
78+
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
79+
APIKEY: ${{ secrets.APIKEY }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ plugin/Builds/VisualStudio2017/.vs
4848
xcuserdata
4949
Builds
5050
JuceLibraryCode
51+
bin
52+
Installer/macOS/bin
53+
Installer/win/bin
54+
Installer/_flat_presets

CMakeLists.txt

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ set (PLUGIN_CODE Sn76)
1414
set (CMAKE_POLICY_DEFAULT_CMP0077 NEW)
1515
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
1616
set (CMAKE_SUPPRESS_REGENERATION true)
17-
set (CMAKE_SKIP_INSTALL_RULES YES)
17+
# Skip install rules everywhere except Linux, where CPack/DEB needs them.
18+
if (NOT (UNIX AND NOT APPLE))
19+
set (CMAKE_SKIP_INSTALL_RULES YES)
20+
endif()
1821
set_property (GLOBAL PROPERTY DEBUG_CONFIGURATIONS "Debug")
1922

2023
set (CMAKE_C_FLAGS_DEVELOPMENT ${CMAKE_C_FLAGS_RELEASE})
@@ -210,12 +213,47 @@ endif()
210213
if(UNIX AND NOT APPLE)
211214
target_link_libraries (${PLUGIN_NAME} PRIVATE curl)
212215
endif()
213-
214-
215-
if(WIN32)
216-
set (dest "Program Files")
217-
else()
218-
set (dest "Applications")
216+
#
217+
# Install + CPack (Linux only — macOS uses pkgbuild/productbuild, Windows uses Inno Setup)
218+
#
219+
if (UNIX AND NOT APPLE)
220+
set (_artefact_dir "${CMAKE_BINARY_DIR}/${PLUGIN_NAME}_artefacts/$<CONFIG>")
221+
222+
install (FILES "${_artefact_dir}/VST/lib${PLUGIN_NAME}.so"
223+
DESTINATION lib/vst
224+
RENAME "${PLUGIN_NAME}.so"
225+
COMPONENT VST)
226+
227+
install (DIRECTORY "${_artefact_dir}/VST3/${PLUGIN_NAME}.vst3"
228+
DESTINATION lib/vst3
229+
COMPONENT VST3
230+
USE_SOURCE_PERMISSIONS)
231+
232+
install (DIRECTORY "${_artefact_dir}/LV2/${PLUGIN_NAME}.lv2"
233+
DESTINATION lib/lv2
234+
COMPONENT LV2
235+
USE_SOURCE_PERMISSIONS)
236+
237+
install (FILES "${_artefact_dir}/CLAP/${PLUGIN_NAME}.clap"
238+
DESTINATION lib/clap
239+
COMPONENT CLAP)
240+
241+
set (CPACK_PACKAGE_NAME "sn76489")
242+
set (CPACK_PACKAGE_VERSION "${PLUGIN_VERSION}")
243+
set (CPACK_PACKAGE_VENDOR "SocaLabs")
244+
set (CPACK_PACKAGE_HOMEPAGE_URL "https://socalabs.com/")
245+
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Sega SN76489 audio synthesizer plugin")
246+
set (CPACK_PACKAGE_CONTACT "support@socalabs.com")
247+
set (CPACK_PACKAGING_INSTALL_PREFIX "/usr")
248+
set (CPACK_GENERATOR "DEB")
249+
set (CPACK_DEB_COMPONENT_INSTALL OFF)
250+
set (CPACK_COMPONENTS_ALL VST VST3 LV2 CLAP)
251+
set (CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
252+
set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Roland Rabien <support@socalabs.com>")
253+
set (CPACK_DEBIAN_PACKAGE_SECTION "sound")
254+
set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
255+
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
256+
set (CPACK_DEBIAN_FILE_NAME "SN76489.deb")
257+
258+
include (CPack)
219259
endif()
220-
221-
install (TARGETS ${PLUGIN_NAME} DESTINATION "${dest}")

0 commit comments

Comments
 (0)