Skip to content

Commit 9d12f85

Browse files
committed
2 parents 3f94d75 + fd7593e commit 9d12f85

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed
+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Build Project
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
8+
defaults:
9+
run:
10+
shell: bash
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
matrix:
18+
os: [ubuntu-latest, windows-latest, macos-latest]
19+
build_type: [Release]
20+
21+
steps:
22+
- name: Checkout Code
23+
uses: actions/checkout@v4
24+
25+
- name: Setup MSVC
26+
if: matrix.os == 'windows-latest'
27+
uses: TheMrMilchmann/setup-msvc-dev@v3
28+
with:
29+
arch: x64
30+
spectre: true
31+
32+
- name: Set Up Windows
33+
if: matrix.os == 'windows-latest'
34+
run: choco install ninja
35+
36+
- name: Set Up Mac
37+
if: matrix.os == 'macos-latest'
38+
run: brew install ninja osxutils
39+
40+
- name: Set Up Linux
41+
if: matrix.os == 'ubuntu-latest'
42+
run: |
43+
sudo apt-get update
44+
sudo apt-get install ninja-build
45+
sudo apt install libasound2-dev libx11-dev \
46+
libxinerama-dev libxext-dev libfreetype6-dev \
47+
libwebkit2gtk-4.0-dev libglu1-mesa-dev xvfb
48+
sudo /usr/bin/Xvfb $DISPLAY &
49+
50+
- name: Configure Build on Windows
51+
if: matrix.os == 'windows-latest'
52+
run: cmake --preset "Windows Release"
53+
54+
- name: Configure Build on macOS
55+
if: matrix.os == 'macos-latest'
56+
run: cmake --preset "Mac Release" -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
57+
58+
- name: Configure Build on Linux
59+
if: matrix.os == 'ubuntu-latest'
60+
run: cmake --preset "Linux Release"
61+
62+
- name: Build
63+
run: cmake --build build --config "Release"
64+
65+
- name: Package Windows Artifacts
66+
if: matrix.os == 'windows-latest'
67+
run: |
68+
mkdir -p artifacts
69+
cp -r build/src/OscilloscopePlugin_artefacts/Release/VST3 artifacts/
70+
cp -r build/src/OscilloscopePlugin_artefacts/Release/CLAP artifacts/
71+
shell: bash
72+
73+
- name: Package macOS Artifacts
74+
if: matrix.os == 'macos-latest'
75+
run: |
76+
mkdir -p artifacts
77+
cp -r build/src/OscilloscopePlugin_artefacts/Release/VST3 artifacts/
78+
cp -r build/src/OscilloscopePlugin_artefacts/Release/CLAP artifacts/
79+
cp -r build/src/OscilloscopePlugin_artefacts/Release/AU artifacts/
80+
shell: bash
81+
82+
- name: Package Linux Artifacts
83+
if: matrix.os == 'ubuntu-latest'
84+
run: |
85+
mkdir -p artifacts
86+
cp -r build/src/OscilloscopePlugin_artefacts/Release/VST3 artifacts/
87+
cp -r build/src/OscilloscopePlugin_artefacts/Release/LV2 artifacts/
88+
cp -r build/src/OscilloscopePlugin_artefacts/Release/CLAP artifacts/
89+
shell: bash
90+
91+
- name: Upload Artifacts
92+
uses: actions/upload-artifact@v4
93+
with:
94+
name: build-artifacts-${{ matrix.os }}
95+
path: artifacts
96+
97+
release:
98+
runs-on: ubuntu-latest
99+
needs: build
100+
env:
101+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102+
103+
steps:
104+
- name: Checkout Code
105+
uses: actions/checkout@v4
106+
107+
- name: Get Artifacts
108+
uses: actions/download-artifact@v4
109+
110+
- name: Zip Artifacts
111+
run: |
112+
zip -r oscilloscope-snapshot-macos.zip ./build-artifacts-macos-latest
113+
zip -r oscilloscope-snapshot-linux.zip ./build-artifacts-ubuntu-latest
114+
zip -r oscilloscope-snapshot-windows.zip ./build-artifacts-windows-latest
115+
116+
- name: Create Release
117+
uses: softprops/action-gh-release@v2
118+
with:
119+
tag_name: "Snapshot"
120+
prerelease: true
121+
body: |
122+
### ⚠️ WARNING: Unstable Release ⚠️
123+
This is a **unstable** snapshot intended solely for testing purposes.
124+
It may contain bugs, incomplete features, or cause instability.
125+
**Not recommended** for production or general use—proceed with caution.
126+
127+
- name: Upload Assets
128+
run: |
129+
gh release upload "Snapshot" oscilloscope-snapshot-macos.zip --clobber
130+
gh release upload "Snapshot" oscilloscope-snapshot-linux.zip --clobber
131+
gh release upload "Snapshot" oscilloscope-snapshot-windows.zip --clobber

0 commit comments

Comments
 (0)