1# Generated from xtask::workflows::run_bundling
2# Rebuild with `cargo xtask workflows`.
3name: run_bundling
4env:
5 CARGO_TERM_COLOR: always
6 RUST_BACKTRACE: '1'
7on:
8 pull_request:
9 types:
10 - labeled
11 - synchronize
12jobs:
13 bundle_linux_aarch64:
14 if: |-
15 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
16 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
17 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
18 env:
19 CARGO_INCREMENTAL: 0
20 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
21 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
22 CC: clang-18
23 CXX: clang++-18
24 steps:
25 - name: steps::checkout_repo
26 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
27 with:
28 clean: false
29 - name: steps::setup_sentry
30 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
31 with:
32 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
33 - name: steps::setup_linux
34 run: ./script/linux
35 - name: steps::download_wasi_sdk
36 run: ./script/download-wasi-sdk
37 - name: ./script/bundle-linux
38 run: ./script/bundle-linux
39 - name: '@actions/upload-artifact zed-linux-aarch64.tar.gz'
40 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
41 with:
42 name: zed-linux-aarch64.tar.gz
43 path: target/release/zed-linux-aarch64.tar.gz
44 if-no-files-found: error
45 - name: '@actions/upload-artifact zed-remote-server-linux-aarch64.gz'
46 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
47 with:
48 name: zed-remote-server-linux-aarch64.gz
49 path: target/zed-remote-server-linux-aarch64.gz
50 if-no-files-found: error
51 timeout-minutes: 60
52 bundle_linux_x86_64:
53 if: |-
54 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
55 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
56 runs-on: namespace-profile-32x64-ubuntu-2004
57 env:
58 CARGO_INCREMENTAL: 0
59 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
60 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
61 CC: clang-18
62 CXX: clang++-18
63 steps:
64 - name: steps::checkout_repo
65 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
66 with:
67 clean: false
68 - name: steps::setup_sentry
69 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
70 with:
71 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
72 - name: steps::setup_linux
73 run: ./script/linux
74 - name: steps::download_wasi_sdk
75 run: ./script/download-wasi-sdk
76 - name: ./script/bundle-linux
77 run: ./script/bundle-linux
78 - name: '@actions/upload-artifact zed-linux-x86_64.tar.gz'
79 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
80 with:
81 name: zed-linux-x86_64.tar.gz
82 path: target/release/zed-linux-x86_64.tar.gz
83 if-no-files-found: error
84 - name: '@actions/upload-artifact zed-remote-server-linux-x86_64.gz'
85 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
86 with:
87 name: zed-remote-server-linux-x86_64.gz
88 path: target/zed-remote-server-linux-x86_64.gz
89 if-no-files-found: error
90 timeout-minutes: 60
91 bundle_mac_aarch64:
92 if: |-
93 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
94 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
95 runs-on: namespace-profile-mac-large
96 env:
97 CARGO_INCREMENTAL: 0
98 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
99 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
100 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
101 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
102 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
103 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
104 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
105 steps:
106 - name: steps::checkout_repo
107 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
108 with:
109 clean: false
110 - name: steps::setup_node
111 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
112 with:
113 node-version: '20'
114 - name: steps::setup_sentry
115 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
116 with:
117 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
118 - name: steps::clear_target_dir_if_large
119 run: ./script/clear-target-dir-if-larger-than 350 200
120 - name: run_bundling::bundle_mac::bundle_mac
121 run: ./script/bundle-mac aarch64-apple-darwin
122 - name: '@actions/upload-artifact Zed-aarch64.dmg'
123 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
124 with:
125 name: Zed-aarch64.dmg
126 path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
127 if-no-files-found: error
128 - name: '@actions/upload-artifact zed-remote-server-macos-aarch64.gz'
129 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
130 with:
131 name: zed-remote-server-macos-aarch64.gz
132 path: target/zed-remote-server-macos-aarch64.gz
133 if-no-files-found: error
134 timeout-minutes: 60
135 bundle_mac_x86_64:
136 if: |-
137 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
138 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
139 runs-on: namespace-profile-mac-large
140 env:
141 CARGO_INCREMENTAL: 0
142 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
143 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
144 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
145 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
146 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
147 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
148 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
149 steps:
150 - name: steps::checkout_repo
151 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
152 with:
153 clean: false
154 - name: steps::setup_node
155 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
156 with:
157 node-version: '20'
158 - name: steps::setup_sentry
159 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
160 with:
161 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
162 - name: steps::clear_target_dir_if_large
163 run: ./script/clear-target-dir-if-larger-than 350 200
164 - name: run_bundling::bundle_mac::bundle_mac
165 run: ./script/bundle-mac x86_64-apple-darwin
166 - name: '@actions/upload-artifact Zed-x86_64.dmg'
167 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
168 with:
169 name: Zed-x86_64.dmg
170 path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
171 if-no-files-found: error
172 - name: '@actions/upload-artifact zed-remote-server-macos-x86_64.gz'
173 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
174 with:
175 name: zed-remote-server-macos-x86_64.gz
176 path: target/zed-remote-server-macos-x86_64.gz
177 if-no-files-found: error
178 timeout-minutes: 60
179 bundle_windows_aarch64:
180 if: |-
181 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
182 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
183 runs-on: self-32vcpu-windows-2022
184 env:
185 CARGO_INCREMENTAL: 0
186 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
187 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
188 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
189 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
190 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
191 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
192 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
193 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
194 FILE_DIGEST: SHA256
195 TIMESTAMP_DIGEST: SHA256
196 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
197 steps:
198 - name: steps::checkout_repo
199 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
200 with:
201 clean: false
202 - name: steps::setup_sentry
203 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
204 with:
205 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
206 - name: run_bundling::bundle_windows::bundle_windows
207 run: script/bundle-windows.ps1 -Architecture aarch64
208 shell: pwsh
209 working-directory: ${{ env.ZED_WORKSPACE }}
210 - name: '@actions/upload-artifact Zed-aarch64.exe'
211 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
212 with:
213 name: Zed-aarch64.exe
214 path: target/Zed-aarch64.exe
215 if-no-files-found: error
216 - name: '@actions/upload-artifact zed-remote-server-windows-aarch64.zip'
217 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
218 with:
219 name: zed-remote-server-windows-aarch64.zip
220 path: target/zed-remote-server-windows-aarch64.zip
221 if-no-files-found: error
222 timeout-minutes: 60
223 bundle_windows_x86_64:
224 if: |-
225 (github.event.action == 'labeled' && github.event.label.name == 'run-bundling') ||
226 (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling'))
227 runs-on: self-32vcpu-windows-2022
228 env:
229 CARGO_INCREMENTAL: 0
230 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
231 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
232 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
233 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
234 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
235 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
236 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
237 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
238 FILE_DIGEST: SHA256
239 TIMESTAMP_DIGEST: SHA256
240 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
241 steps:
242 - name: steps::checkout_repo
243 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
244 with:
245 clean: false
246 - name: steps::setup_sentry
247 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
248 with:
249 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
250 - name: run_bundling::bundle_windows::bundle_windows
251 run: script/bundle-windows.ps1 -Architecture x86_64
252 shell: pwsh
253 working-directory: ${{ env.ZED_WORKSPACE }}
254 - name: '@actions/upload-artifact Zed-x86_64.exe'
255 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
256 with:
257 name: Zed-x86_64.exe
258 path: target/Zed-x86_64.exe
259 if-no-files-found: error
260 - name: '@actions/upload-artifact zed-remote-server-windows-x86_64.zip'
261 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
262 with:
263 name: zed-remote-server-windows-x86_64.zip
264 path: target/zed-remote-server-windows-x86_64.zip
265 if-no-files-found: error
266 timeout-minutes: 60
267 build_nix_linux_x86_64:
268 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && ((github.event.action == 'labeled' && github.event.label.name == 'run-bundling') || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling')))
269 runs-on: namespace-profile-32x64-ubuntu-2004
270 env:
271 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
272 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
273 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
274 GIT_LFS_SKIP_SMUDGE: '1'
275 steps:
276 - name: steps::checkout_repo
277 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
278 with:
279 clean: false
280 - name: steps::cache_nix_dependencies_namespace
281 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
282 with:
283 cache: nix
284 - name: nix_build::build_nix::install_nix
285 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
286 with:
287 github_access_token: ${{ secrets.GITHUB_TOKEN }}
288 - name: nix_build::build_nix::cachix_action
289 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
290 with:
291 name: zed
292 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
293 cachixArgs: -v
294 pushFilter: -zed-editor-[0-9.]*
295 - name: nix_build::build_nix::build
296 run: nix build .#default -L --accept-flake-config
297 timeout-minutes: 60
298 continue-on-error: true
299 build_nix_mac_aarch64:
300 if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && ((github.event.action == 'labeled' && github.event.label.name == 'run-bundling') || (github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'run-bundling')))
301 runs-on: namespace-profile-mac-large
302 env:
303 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
304 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
305 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
306 GIT_LFS_SKIP_SMUDGE: '1'
307 steps:
308 - name: steps::checkout_repo
309 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
310 with:
311 clean: false
312 - name: steps::cache_nix_store_macos
313 uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
314 with:
315 path: ~/nix-cache
316 - name: nix_build::build_nix::install_nix
317 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
318 with:
319 github_access_token: ${{ secrets.GITHUB_TOKEN }}
320 - name: nix_build::build_nix::configure_local_nix_cache
321 run: |
322 mkdir -p ~/nix-cache
323 echo "extra-substituters = file://$HOME/nix-cache?priority=10" | sudo tee -a /etc/nix/nix.conf
324 echo "require-sigs = false" | sudo tee -a /etc/nix/nix.conf
325 sudo launchctl kickstart -k system/org.nixos.nix-daemon
326 - name: nix_build::build_nix::cachix_action
327 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
328 with:
329 name: zed
330 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
331 cachixArgs: -v
332 pushFilter: -zed-editor-[0-9.]*
333 - name: nix_build::build_nix::build
334 run: nix build .#default -L --accept-flake-config
335 - name: nix_build::build_nix::export_to_local_nix_cache
336 if: always()
337 run: |
338 if [ -L result ]; then
339 echo "Copying build closure to local binary cache..."
340 nix copy --to "file://$HOME/nix-cache" ./result || echo "Warning: nix copy to local cache failed"
341 else
342 echo "No build result found, skipping cache export."
343 fi
344 timeout-minutes: 60
345 continue-on-error: true
346concurrency:
347 group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
348 cancel-in-progress: true
349defaults:
350 run:
351 shell: bash -euxo pipefail {0}