1# Generated from xtask::workflows::release_nightly
2# Rebuild with `cargo xtask workflows`.
3name: release_nightly
4env:
5 CARGO_TERM_COLOR: always
6 CARGO_INCREMENTAL: '0'
7 RUST_BACKTRACE: '1'
8 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
9 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
10 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
11 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
12on:
13 push:
14 tags:
15 - nightly
16 schedule:
17 - cron: 0 7 * * *
18jobs:
19 check_style:
20 if: github.repository_owner == 'zed-industries'
21 runs-on: self-mini-macos
22 steps:
23 - name: steps::checkout_repo
24 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25 with:
26 clean: false
27 fetch-depth: 0
28 - name: steps::cargo_fmt
29 run: cargo fmt --all -- --check
30 shell: bash -euxo pipefail {0}
31 - name: ./script/clippy
32 run: ./script/clippy
33 shell: bash -euxo pipefail {0}
34 timeout-minutes: 60
35 run_tests_mac:
36 if: 'false'
37 runs-on: self-mini-macos
38 steps:
39 - name: steps::checkout_repo
40 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
41 with:
42 clean: false
43 - name: steps::setup_cargo_config
44 run: |
45 mkdir -p ./../.cargo
46 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
47 shell: bash -euxo pipefail {0}
48 - name: steps::setup_node
49 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
50 with:
51 node-version: '20'
52 - name: steps::clippy
53 run: ./script/clippy
54 shell: bash -euxo pipefail {0}
55 - name: steps::cargo_install_nextest
56 run: cargo install cargo-nextest --locked
57 shell: bash -euxo pipefail {0}
58 - name: steps::clear_target_dir_if_large
59 run: ./script/clear-target-dir-if-larger-than 300
60 shell: bash -euxo pipefail {0}
61 - name: steps::cargo_nextest
62 run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
63 shell: bash -euxo pipefail {0}
64 - name: steps::cleanup_cargo_config
65 if: always()
66 run: |
67 rm -rf ./../.cargo
68 shell: bash -euxo pipefail {0}
69 timeout-minutes: 60
70 run_tests_windows:
71 if: 'false'
72 runs-on: self-32vcpu-windows-2022
73 steps:
74 - name: steps::checkout_repo
75 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
76 with:
77 clean: false
78 - name: steps::setup_cargo_config
79 run: |
80 New-Item -ItemType Directory -Path "./../.cargo" -Force
81 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
82 shell: pwsh
83 - name: steps::setup_node
84 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
85 with:
86 node-version: '20'
87 - name: steps::clippy
88 run: ./script/clippy.ps1
89 shell: pwsh
90 - name: steps::cargo_install_nextest
91 run: cargo install cargo-nextest --locked
92 shell: pwsh
93 - name: steps::clear_target_dir_if_large
94 run: ./script/clear-target-dir-if-larger-than.ps1 250
95 shell: pwsh
96 - name: steps::cargo_nextest
97 run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
98 shell: pwsh
99 - name: steps::cleanup_cargo_config
100 if: always()
101 run: |
102 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
103 shell: pwsh
104 timeout-minutes: 60
105 bundle_mac_nightly_x86_64:
106 needs:
107 - check_style
108 - run_tests_mac
109 if: github.repository_owner == 'zed-industries'
110 runs-on: self-mini-macos
111 env:
112 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
113 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
114 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
115 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
116 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
117 steps:
118 - name: steps::checkout_repo
119 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
120 with:
121 clean: false
122 - name: steps::setup_node
123 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
124 with:
125 node-version: '20'
126 - name: steps::setup_sentry
127 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
128 with:
129 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
130 - name: steps::clear_target_dir_if_large
131 run: ./script/clear-target-dir-if-larger-than 300
132 shell: bash -euxo pipefail {0}
133 - name: release_nightly::set_release_channel_to_nightly
134 run: |
135 set -eu
136 version=$(git rev-parse --short HEAD)
137 echo "Publishing version: ${version} on release channel nightly"
138 echo "nightly" > crates/zed/RELEASE_CHANNEL
139 shell: bash -euxo pipefail {0}
140 - name: run_bundling::bundle_mac
141 run: ./script/bundle-mac x86_64-apple-darwin
142 shell: bash -euxo pipefail {0}
143 - name: release_nightly::upload_zed_nightly
144 run: script/upload-nightly macos x86_64
145 shell: bash -euxo pipefail {0}
146 timeout-minutes: 60
147 bundle_mac_nightly_aarch64:
148 needs:
149 - check_style
150 - run_tests_mac
151 if: github.repository_owner == 'zed-industries'
152 runs-on: self-mini-macos
153 env:
154 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
155 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
156 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
157 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
158 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
159 steps:
160 - name: steps::checkout_repo
161 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
162 with:
163 clean: false
164 - name: steps::setup_node
165 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
166 with:
167 node-version: '20'
168 - name: steps::setup_sentry
169 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
170 with:
171 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
172 - name: steps::clear_target_dir_if_large
173 run: ./script/clear-target-dir-if-larger-than 300
174 shell: bash -euxo pipefail {0}
175 - name: release_nightly::set_release_channel_to_nightly
176 run: |
177 set -eu
178 version=$(git rev-parse --short HEAD)
179 echo "Publishing version: ${version} on release channel nightly"
180 echo "nightly" > crates/zed/RELEASE_CHANNEL
181 shell: bash -euxo pipefail {0}
182 - name: run_bundling::bundle_mac
183 run: ./script/bundle-mac aarch64-apple-darwin
184 shell: bash -euxo pipefail {0}
185 - name: release_nightly::upload_zed_nightly
186 run: script/upload-nightly macos aarch64
187 shell: bash -euxo pipefail {0}
188 timeout-minutes: 60
189 bundle_linux_nightly_x86_64:
190 needs:
191 - check_style
192 - run_tests_mac
193 if: github.repository_owner == 'zed-industries'
194 runs-on: namespace-profile-32x64-ubuntu-2004
195 steps:
196 - name: steps::checkout_repo
197 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
198 with:
199 clean: false
200 - name: steps::setup_sentry
201 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
202 with:
203 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
204 - name: release_nightly::add_rust_to_path
205 run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
206 shell: bash -euxo pipefail {0}
207 - name: ./script/linux
208 run: ./script/linux
209 shell: bash -euxo pipefail {0}
210 - name: ./script/install-mold
211 run: ./script/install-mold
212 shell: bash -euxo pipefail {0}
213 - name: steps::clear_target_dir_if_large
214 run: ./script/clear-target-dir-if-larger-than 100
215 shell: bash -euxo pipefail {0}
216 - name: release_nightly::set_release_channel_to_nightly
217 run: |
218 set -eu
219 version=$(git rev-parse --short HEAD)
220 echo "Publishing version: ${version} on release channel nightly"
221 echo "nightly" > crates/zed/RELEASE_CHANNEL
222 shell: bash -euxo pipefail {0}
223 - name: ./script/bundle-linux
224 run: ./script/bundle-linux
225 shell: bash -euxo pipefail {0}
226 - name: release_nightly::upload_zed_nightly
227 run: script/upload-nightly linux-targz x86_64
228 shell: bash -euxo pipefail {0}
229 timeout-minutes: 60
230 bundle_linux_nightly_aarch64:
231 needs:
232 - check_style
233 - run_tests_mac
234 if: github.repository_owner == 'zed-industries'
235 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
236 steps:
237 - name: steps::checkout_repo
238 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
239 with:
240 clean: false
241 - name: steps::setup_sentry
242 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
243 with:
244 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
245 - name: release_nightly::add_rust_to_path
246 run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
247 shell: bash -euxo pipefail {0}
248 - name: ./script/linux
249 run: ./script/linux
250 shell: bash -euxo pipefail {0}
251 - name: steps::clear_target_dir_if_large
252 run: ./script/clear-target-dir-if-larger-than 100
253 shell: bash -euxo pipefail {0}
254 - name: release_nightly::set_release_channel_to_nightly
255 run: |
256 set -eu
257 version=$(git rev-parse --short HEAD)
258 echo "Publishing version: ${version} on release channel nightly"
259 echo "nightly" > crates/zed/RELEASE_CHANNEL
260 shell: bash -euxo pipefail {0}
261 - name: ./script/bundle-linux
262 run: ./script/bundle-linux
263 shell: bash -euxo pipefail {0}
264 - name: release_nightly::upload_zed_nightly
265 run: script/upload-nightly linux-targz aarch64
266 shell: bash -euxo pipefail {0}
267 timeout-minutes: 60
268 bundle_windows_nightly_x86_64:
269 needs:
270 - check_style
271 - run_tests_windows
272 if: github.repository_owner == 'zed-industries'
273 runs-on: self-32vcpu-windows-2022
274 env:
275 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
276 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
277 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
278 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
279 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
280 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
281 FILE_DIGEST: SHA256
282 TIMESTAMP_DIGEST: SHA256
283 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
284 steps:
285 - name: steps::checkout_repo
286 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
287 with:
288 clean: false
289 - name: steps::setup_sentry
290 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
291 with:
292 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
293 - name: release_nightly::set_release_channel_to_nightly
294 run: |
295 $ErrorActionPreference = "Stop"
296 $version = git rev-parse --short HEAD
297 Write-Host "Publishing version: $version on release channel nightly"
298 "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
299 shell: pwsh
300 working-directory: ${{ env.ZED_WORKSPACE }}
301 - name: release_nightly::build_zed_installer
302 run: script/bundle-windows.ps1 -Architecture x86_64
303 shell: pwsh
304 working-directory: ${{ env.ZED_WORKSPACE }}
305 - name: release_nightly::upload_zed_nightly_windows
306 run: script/upload-nightly.ps1 -Architecture x86_64
307 shell: pwsh
308 working-directory: ${{ env.ZED_WORKSPACE }}
309 timeout-minutes: 60
310 bundle_windows_nightly_aarch64:
311 needs:
312 - check_style
313 - run_tests_windows
314 if: github.repository_owner == 'zed-industries'
315 runs-on: self-32vcpu-windows-2022
316 env:
317 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
318 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
319 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
320 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
321 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
322 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
323 FILE_DIGEST: SHA256
324 TIMESTAMP_DIGEST: SHA256
325 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
326 steps:
327 - name: steps::checkout_repo
328 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
329 with:
330 clean: false
331 - name: steps::setup_sentry
332 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
333 with:
334 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
335 - name: release_nightly::set_release_channel_to_nightly
336 run: |
337 $ErrorActionPreference = "Stop"
338 $version = git rev-parse --short HEAD
339 Write-Host "Publishing version: $version on release channel nightly"
340 "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
341 shell: pwsh
342 working-directory: ${{ env.ZED_WORKSPACE }}
343 - name: release_nightly::build_zed_installer
344 run: script/bundle-windows.ps1 -Architecture aarch64
345 shell: pwsh
346 working-directory: ${{ env.ZED_WORKSPACE }}
347 - name: release_nightly::upload_zed_nightly_windows
348 run: script/upload-nightly.ps1 -Architecture aarch64
349 shell: pwsh
350 working-directory: ${{ env.ZED_WORKSPACE }}
351 timeout-minutes: 60
352 build_nix_linux_x86_64:
353 needs:
354 - check_style
355 - run_tests_mac
356 if: github.repository_owner == 'zed-industries'
357 runs-on: namespace-profile-32x64-ubuntu-2004
358 env:
359 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
360 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
361 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
362 GIT_LFS_SKIP_SMUDGE: '1'
363 steps:
364 - name: steps::checkout_repo
365 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
366 with:
367 clean: false
368 - name: nix_build::install_nix
369 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
370 with:
371 github_access_token: ${{ secrets.GITHUB_TOKEN }}
372 - name: nix_build::cachix_action
373 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
374 with:
375 name: zed
376 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
377 cachixArgs: -v
378 - name: nix_build::build
379 run: nix build .#default -L --accept-flake-config
380 shell: bash -euxo pipefail {0}
381 timeout-minutes: 60
382 continue-on-error: true
383 build_nix_mac_aarch64:
384 needs:
385 - check_style
386 - run_tests_mac
387 if: github.repository_owner == 'zed-industries'
388 runs-on: self-mini-macos
389 env:
390 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
391 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
392 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
393 GIT_LFS_SKIP_SMUDGE: '1'
394 steps:
395 - name: steps::checkout_repo
396 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
397 with:
398 clean: false
399 - name: nix_build::set_path
400 run: |
401 echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
402 echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
403 shell: bash -euxo pipefail {0}
404 - name: nix_build::cachix_action
405 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
406 with:
407 name: zed
408 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
409 cachixArgs: -v
410 - name: nix_build::build
411 run: nix build .#default -L --accept-flake-config
412 shell: bash -euxo pipefail {0}
413 - name: nix_build::limit_store
414 run: |-
415 if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
416 nix-collect-garbage -d || true
417 fi
418 shell: bash -euxo pipefail {0}
419 timeout-minutes: 60
420 continue-on-error: true
421 update_nightly_tag:
422 needs:
423 - bundle_mac_nightly_x86_64
424 - bundle_mac_nightly_aarch64
425 - bundle_linux_nightly_x86_64
426 - bundle_linux_nightly_aarch64
427 - bundle_windows_nightly_x86_64
428 - bundle_windows_nightly_aarch64
429 if: github.repository_owner == 'zed-industries'
430 runs-on: namespace-profile-2x4-ubuntu-2404
431 steps:
432 - name: steps::checkout_repo
433 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
434 with:
435 clean: false
436 fetch-depth: 0
437 - name: release_nightly::update_nightly_tag
438 run: |
439 if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
440 echo "Nightly tag already points to current commit. Skipping tagging."
441 exit 0
442 fi
443 git config user.name github-actions
444 git config user.email github-actions@github.com
445 git tag -f nightly
446 git push origin nightly --force
447 shell: bash -euxo pipefail {0}
448 - name: release_nightly::create_sentry_release
449 uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
450 with:
451 environment: production
452 env:
453 SENTRY_ORG: zed-dev
454 SENTRY_PROJECT: zed
455 SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
456 timeout-minutes: 60