1111 RUST_BACKTRACE : 1
1212 # Trunk version for caching
1313 TRUNK_VERSION : " 0.21.5"
14+ # Disable incremental compilation to avoid deadlocks
15+ CARGO_INCREMENTAL : 0
16+ # Limit parallel cargo jobs to avoid deadlocks
17+ CARGO_BUILD_JOBS : 2
1418
1519jobs :
1620 fmt :
3640 clippy :
3741 name : Clippy (Backend & MCP)
3842 runs-on : ubuntu-latest
43+ timeout-minutes : 15
3944 steps :
4045 - uses : actions/checkout@v4
4146
8691 test :
8792 name : Test Suite
8893 runs-on : ubuntu-latest
94+ timeout-minutes : 15
8995 steps :
9096 - uses : actions/checkout@v4
9197
@@ -110,8 +116,8 @@ jobs:
110116 - name : Run tests on MCP server
111117 run : cargo test --package strom-mcp-server --all-features
112118
113- build :
114- name : Build (Backend + Frontend + MCP )
119+ build-frontend :
120+ name : Build Frontend (WASM )
115121 runs-on : ubuntu-latest
116122 steps :
117123 - uses : actions/checkout@v4
@@ -121,12 +127,6 @@ jobs:
121127 with :
122128 targets : wasm32-unknown-unknown
123129
124- - name : Cache apt packages
125- uses : awalsh128/cache-apt-pkgs-action@v1
126- with :
127- packages : libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
128- version : 1.1
129-
130130 - name : Cache trunk binary
131131 id : cache-trunk
132132 uses : actions/cache@v4
@@ -142,17 +142,83 @@ jobs:
142142 - name : Cache Rust dependencies
143143 uses : Swatinem/rust-cache@v2
144144 with :
145- shared-key : build
145+ shared-key : frontend-wasm
146146 cache-on-failure : true
147- # Cache trunk build artifacts
148- cache-directories : |
149- frontend/dist
150147
151148 - name : Build frontend
152149 run : |
153150 cd frontend
154151 trunk build --release
155152
153+ - name : Upload frontend dist
154+ uses : actions/upload-artifact@v4
155+ with :
156+ name : frontend-dist
157+ path : backend/dist
158+ retention-days : 1
159+
160+ build :
161+ name : Build ${{ matrix.platform }}
162+ needs : build-frontend
163+ runs-on : ${{ matrix.os }}
164+ timeout-minutes : 30
165+ strategy :
166+ fail-fast : false
167+ matrix :
168+ include :
169+ - os : ubuntu-latest
170+ platform : linux
171+ binary_ext : " "
172+ - os : windows-latest
173+ platform : windows
174+ binary_ext : " .exe"
175+ - os : macos-latest
176+ platform : macos
177+ binary_ext : " "
178+ steps :
179+ - uses : actions/checkout@v4
180+
181+ - name : Install Rust stable with WASM target
182+ uses : dtolnay/rust-toolchain@stable
183+ with :
184+ targets : wasm32-unknown-unknown
185+
186+ # Linux: Install GStreamer via apt
187+ - name : Cache apt packages (Linux)
188+ if : matrix.platform == 'linux'
189+ uses : awalsh128/cache-apt-pkgs-action@v1
190+ with :
191+ packages : libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
192+ version : 1.1
193+
194+ # Windows: Install GStreamer and pkg-config via Chocolatey
195+ - name : Install GStreamer (Windows)
196+ if : matrix.platform == 'windows'
197+ run : |
198+ choco install pkgconfiglite gstreamer gstreamer-devel --yes --no-progress
199+ echo "GSTREAMER_1_0_ROOT_MSVC_X86_64=D:\gstreamer\1.0\msvc_x86_64\" >> $env:GITHUB_ENV
200+ echo "D:\gstreamer\1.0\msvc_x86_64\bin" >> $env:GITHUB_PATH
201+ echo "PKG_CONFIG_PATH=D:\gstreamer\1.0\msvc_x86_64\lib\pkgconfig" >> $env:GITHUB_ENV
202+
203+ # macOS: Install GStreamer via Homebrew
204+ - name : Install GStreamer (macOS)
205+ if : matrix.platform == 'macos'
206+ run : |
207+ brew install gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav
208+
209+ # Download the pre-built frontend from the frontend build job
210+ - name : Download frontend dist
211+ uses : actions/download-artifact@v4
212+ with :
213+ name : frontend-dist
214+ path : backend/dist
215+
216+ - name : Cache Rust dependencies
217+ uses : Swatinem/rust-cache@v2
218+ with :
219+ shared-key : build-${{ matrix.platform }}
220+ cache-on-failure : true
221+
156222 - name : Build backend (with embedded frontend)
157223 run : cargo build --release --package strom-backend
158224
@@ -162,13 +228,13 @@ jobs:
162228 - name : Upload backend binary
163229 uses : actions/upload-artifact@v4
164230 with :
165- name : strom-backend
166- path : target/release/strom-backend
231+ name : strom-backend-${{ matrix.platform }}
232+ path : target/release/strom-backend${{ matrix.binary_ext }}
167233 retention-days : 7
168234
169235 - name : Upload MCP server binary
170236 uses : actions/upload-artifact@v4
171237 with :
172- name : strom-mcp-server
173- path : target/release/strom-mcp-server
238+ name : strom-mcp-server-${{ matrix.platform }}
239+ path : target/release/strom-mcp-server${{ matrix.binary_ext }}
174240 retention-days : 7
0 commit comments