-
Notifications
You must be signed in to change notification settings - Fork 3
211 lines (175 loc) · 7.29 KB
/
Copy pathrelease.yml
File metadata and controls
211 lines (175 loc) · 7.29 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
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build-windows:
name: Build & Release (Windows)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build:win
- name: Upload artifacts
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
# This job is the SOLE owner of the release body — the other jobs
# upload files only, so nothing races or clobbers it. The macOS
# note therefore lives here rather than in the macOS job: that one
# is a 2-leg matrix (aarch64 + x86_64) and would append the same
# text twice. GitHub prepends `body` to the generated notes, so
# this lands at the top of the release page — exactly where people
# are standing when they download the DMG and hit "damaged".
body: |
### macOS: first launch says "damaged"? The download is fine.
The DMG is ad-hoc signed but **not notarized** (that needs a paid
Apple Developer ID). macOS quarantines every such download and
shows the misleading *"InspectorRust.app is damaged and can't be
opened"* instead of the usual unidentified-developer prompt.
**Right-click → Open does _not_ clear this one.**
Drag the app to Applications, then run this once:
```bash
xattr -dr com.apple.quarantine /Applications/InspectorRust.app
```
The app then launches normally, for good. To convince yourself the
bundle is intact, run `codesign --verify --deep --strict /Applications/InspectorRust.app`
— silence means the signature is valid and nothing is corrupted.
The mounted DMG also carries these instructions as
**! READ ME FIRST.txt**.
---
files: |
target/release/inspector-rust.exe
target/release/bundle/msi/*.msi
build-linux:
name: Build & Release (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Linux system dependencies
# libfuse2 is needed by Tauri's AppImage bundling step.
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
patchelf \
libxdo-dev \
libxcb-shape0-dev \
libxcb-xfixes0-dev \
libssl-dev \
libfuse2 \
libudev-dev \
libinput-dev \
libasound2-dev \
pkg-config
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build:linux
- name: Upload artifacts
uses: softprops/action-gh-release@v2
with:
files: |
target/release/inspector-rust
target/release/bundle/deb/*.deb
target/release/bundle/appimage/*.AppImage
build-macos:
# Apple Silicon only — see the x86_64 note below before re-adding Intel.
name: Build & Release (macOS ${{ matrix.arch }})
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64
runner: macos-14 # Apple Silicon (M-series)
target: aarch64-apple-darwin
#
# ── Why there is no x86_64 (Intel) job ────────────────────────────
# It is not "temporarily broken" — it is impossible with the current
# ONNX Runtime dependency, and it never once produced an artifact.
#
# `ort-sys` 2.0.0-rc.12 ships prebuilt ONNX Runtime binaries for
# exactly ONE Apple target: its own `build/download/dist.txt` lists
# `aarch64-apple-darwin` and nothing else for macOS (pyke dropped
# Intel macOS). So the build script hard-errors:
# "ort does not provide prebuilt binaries for the target
# x86_64-apple-darwin"
# The `download-binaries` default cannot satisfy it, and the
# xcframework fallback explicitly bails for non-arm Apple targets.
#
# Evidence it never worked: every release back to v0.100.0 carries
# only `*_aarch64.dmg`, while every release RUN was red — the Intel
# job failed each time and `fail-fast: false` let the real artifacts
# upload around it. A permanently failing job that ships nothing is
# worse than no job: it trains you to ignore red releases.
#
# To actually support Intel, one of these is required (each is a
# deliberate piece of work, not a matrix line):
# a) `ort` with `load-dynamic` + bundle an x86_64
# libonnxruntime.dylib into the .app (upstream still publishes
# onnxruntime-osx-x86_64-*.tgz) and sign it with the bundle;
# b) feature-gate `cutout_ml.rs` off for x86_64 so the Intel build
# compiles without `ort` at all — Intel users then get every
# feature except the ML background cut-out;
# c) build ONNX Runtime from source in CI (slow, high maintenance).
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Install dependencies
run: pnpm install
- name: Build
# Pass --target to tauri so the output lands under
# target/<triple>/release/bundle/ and the DMG filename gets an
# arch suffix (e.g. InspectorRust_<ver>_aarch64.dmg).
# Bundles both app + dmg; the next step *re*-seals the .app and
# rebuilds the DMG — tauri alone leaves a linker-only ad-hoc
# signature that Gatekeeper reports as "damaged".
run: pnpm --filter inspector-rust-macos tauri build --target ${{ matrix.target }}
- name: Seal .app + rebuild DMG
# Deep ad-hoc codesign (Info.plist + Resources sealed) + fresh DMG.
# Without this, macOS shows "InspectorRust.app is damaged and can't
# be opened" for every GitHub-release download. See
# scripts/pack-macos-release-dmg.sh.
run: bash scripts/pack-macos-release-dmg.sh ${{ matrix.target }}
- name: Upload artifacts
uses: softprops/action-gh-release@v2
with:
files: target/${{ matrix.target }}/release/bundle/dmg/*.dmg