Commit b1127f6
committed
Resolves #6815 ([FR-2612](https://lablup.atlassian.net/browse/FR-2612))
## Summary
The release pipeline previously ran everything sequentially on a single macOS runner (~30+ min). This PR introduces several optimizations that cut release time roughly in half.
### Dry run test result
| Job | Duration | Runner |
|-----|----------|--------|
| `build_web` | 3m 30s | ubuntu |
| `build_mac` (unsigned) | 3m 54s | macos |
| `build_desktop` | 2m 54s | ubuntu |
| **Total wall time** | **~7m 24s** | |
Previous release (v26.4.3): **26m 35s** → **72% reduction** in wall time.
Actual release with code signing/notarization is expected to be ~10-12 min.
- Dry run: https://github.com/lablup/backend.ai-webui/actions/runs/24537688533
### Changes
1. **Split CI into 3 parallel jobs** (`package.yml`)
- `build_web` (ubuntu): Builds web assets + uploads bundle
- `build_mac` (macos): macOS desktop builds with code signing/notarization
- `build_desktop` (ubuntu): Windows + Linux desktop builds
- macOS and win/linux jobs run **concurrently** after web build completes
2. **Eliminate double React build** (`scripts/patch-electron-publicpath.js`, `Makefile`)
- Previously the entire React app was rebuilt for Electron just to change `publicPath` from `/` to `es6://`
- Now a lightweight post-build script patches the already-built files instead
3. **Parallelize local proxy compilation** (`Makefile`)
- All platform targets now compile concurrently within each job via the new `compile_all_localproxy` target
- `compile_localproxy` is now **idempotent**: skips when the output ZIP already exists, so downstream targets (`mac_x64`, `win_x64`, ...) reuse the cached artifact without recompiling. Set `FORCE_COMPILE_LOCALPROXY=1` to force a rebuild.
- `dep_electron` is likewise idempotent: skips when `build/electron-app/app/index.html` already carries the patched `es6://static/js/main` marker. Set `FORCE_DEP_ELECTRON=1` to force a re-sync.
- This means the original single set of `mac_x64`/`mac_arm64`/`win_*`/`linux_*` targets can be reused across both ad-hoc local builds and the new parallel CI flow — no duplicated `*_package` targets required.
4. **Optimize ZIP compression** (`Makefile`)
- Changed from `-9` (max) to `-6` (default) -- marginal size difference, measurably faster
5. **Concurrent release asset uploads** (`upload-release.js`)
- Uploads up to 4 files simultaneously instead of sequentially
6. **Explicit `NODE_OPTIONS`** (`react/package.json`)
- Added `--max-old-space-size=4096` to `build:only` script to prevent OOM during webpack builds
7. **`workflow_dispatch` trigger** (`package.yml`)
- Enables manual dry-run testing of the build pipeline on any branch
- `dry_run=true` skips release uploads and code signing
### Backward Compatibility
- Existing `make mac`, `make win`, `make linux`, `make dep` targets work unchanged
- `make mac_x64`, `make mac_arm64`, `make win_x64`, `make win_arm64`, `make linux_x64`, `make linux_arm64` targets work unchanged — no new `*_package` variants introduced
- `make all` now uses the optimized parallel path internally (pre-builds all local proxies via `compile_all_localproxy`, then calls the original platform targets which become cheap thanks to idempotent prerequisites)
- `make bundle` no longer requires full `dep` (just `dep_web`)
## Test plan
- [x] Verify `scripts/patch-electron-publicpath.js` correctly patches `es6://` references (local mock test)
- [x] Verify `build_web` job builds web assets and uploads artifact
- [x] Verify `build_mac` job downloads artifact, prepares Electron, packages DMG
- [x] Verify `build_desktop` job packages Win/Linux ZIPs
- [x] Verify all 3 jobs complete successfully in parallel
- [x] Verify `compile_localproxy` skips when output ZIP exists and rebuilds with `FORCE_COMPILE_LOCALPROXY=1`
- [x] Verify `dep_electron` skips when `build/electron-app/app/index.html` already patched and resyncs with `FORCE_DEP_ELECTRON=1`
- [ ] Verify actual release (non-dry-run) uploads assets correctly
Generated with [Claude Code](https://claude.com/claude-code)
[FR-2612]: https://lablup.atlassian.net/browse/FR-2612?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 64b9edb commit b1127f6
5 files changed
Lines changed: 384 additions & 46 deletions
File tree
- .github/workflows
- react
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
3 | 2 | | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
12 | 28 | | |
13 | 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 | + | |
14 | 83 | | |
| 84 | + | |
15 | 85 | | |
16 | 86 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 87 | | |
25 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
26 | 92 | | |
27 | 93 | | |
28 | 94 | | |
| 95 | + | |
29 | 96 | | |
30 | 97 | | |
31 | 98 | | |
32 | 99 | | |
33 | 100 | | |
| 101 | + | |
34 | 102 | | |
35 | 103 | | |
36 | 104 | | |
37 | 105 | | |
38 | 106 | | |
| 107 | + | |
39 | 108 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 109 | | |
44 | | - | |
45 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
46 | 130 | | |
47 | 131 | | |
48 | 132 | | |
| |||
51 | 135 | | |
52 | 136 | | |
53 | 137 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 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 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
58 | 204 | | |
59 | 205 | | |
60 | 206 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
71 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
75 | 89 | | |
76 | | - | |
| 90 | + | |
77 | 91 | | |
| 92 | + | |
| 93 | + | |
78 | 94 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
84 | 115 | | |
85 | 116 | | |
86 | 117 | | |
87 | | - | |
88 | | - | |
| 118 | + | |
89 | 119 | | |
90 | 120 | | |
91 | 121 | | |
92 | 122 | | |
| 123 | + | |
93 | 124 | | |
94 | 125 | | |
95 | 126 | | |
| |||
119 | 150 | | |
120 | 151 | | |
121 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
122 | 161 | | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
128 | 174 | | |
129 | 175 | | |
130 | 176 | | |
131 | 177 | | |
132 | | - | |
| 178 | + | |
133 | 179 | | |
134 | 180 | | |
135 | 181 | | |
| |||
152 | 198 | | |
153 | 199 | | |
154 | 200 | | |
155 | | - | |
| 201 | + | |
156 | 202 | | |
157 | | - | |
| 203 | + | |
| 204 | + | |
158 | 205 | | |
159 | 206 | | |
160 | 207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments