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: github.repository_owner == 'zed-industries'
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: github.repository_owner == 'zed-industries'
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: ./script/linux
205 run: ./script/linux
206 shell: bash -euxo pipefail {0}
207 - name: ./script/install-mold
208 run: ./script/install-mold
209 shell: bash -euxo pipefail {0}
210 - name: steps::clear_target_dir_if_large
211 run: ./script/clear-target-dir-if-larger-than 100
212 shell: bash -euxo pipefail {0}
213 - name: release_nightly::set_release_channel_to_nightly
214 run: |
215 set -eu
216 version=$(git rev-parse --short HEAD)
217 echo "Publishing version: ${version} on release channel nightly"
218 echo "nightly" > crates/zed/RELEASE_CHANNEL
219 shell: bash -euxo pipefail {0}
220 - name: ./script/bundle-linux
221 run: ./script/bundle-linux
222 shell: bash -euxo pipefail {0}
223 - name: release_nightly::upload_zed_nightly
224 run: script/upload-nightly linux-targz x86_64
225 shell: bash -euxo pipefail {0}
226 timeout-minutes: 60
227 bundle_linux_nightly_aarch64:
228 needs:
229 - check_style
230 - run_tests_mac
231 if: github.repository_owner == 'zed-industries'
232 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
233 steps:
234 - name: steps::checkout_repo
235 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
236 with:
237 clean: false
238 - name: steps::setup_sentry
239 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
240 with:
241 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
242 - name: ./script/linux
243 run: ./script/linux
244 shell: bash -euxo pipefail {0}
245 - name: steps::clear_target_dir_if_large
246 run: ./script/clear-target-dir-if-larger-than 100
247 shell: bash -euxo pipefail {0}
248 - name: release_nightly::set_release_channel_to_nightly
249 run: |
250 set -eu
251 version=$(git rev-parse --short HEAD)
252 echo "Publishing version: ${version} on release channel nightly"
253 echo "nightly" > crates/zed/RELEASE_CHANNEL
254 shell: bash -euxo pipefail {0}
255 - name: ./script/bundle-linux
256 run: ./script/bundle-linux
257 shell: bash -euxo pipefail {0}
258 - name: release_nightly::upload_zed_nightly
259 run: script/upload-nightly linux-targz aarch64
260 shell: bash -euxo pipefail {0}
261 timeout-minutes: 60
262 bundle_windows_nightly_x86_64:
263 needs:
264 - check_style
265 - run_tests_windows
266 if: github.repository_owner == 'zed-industries'
267 runs-on: self-32vcpu-windows-2022
268 env:
269 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
270 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
271 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
272 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
273 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
274 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
275 FILE_DIGEST: SHA256
276 TIMESTAMP_DIGEST: SHA256
277 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
278 steps:
279 - name: steps::checkout_repo
280 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
281 with:
282 clean: false
283 - name: steps::setup_sentry
284 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
285 with:
286 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
287 - name: release_nightly::set_release_channel_to_nightly
288 run: |
289 $ErrorActionPreference = "Stop"
290 $version = git rev-parse --short HEAD
291 Write-Host "Publishing version: $version on release channel nightly"
292 "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
293 shell: pwsh
294 working-directory: ${{ env.ZED_WORKSPACE }}
295 - name: run_bundling::bundle_windows
296 run: script/bundle-windows.ps1 -Architecture x86_64
297 shell: pwsh
298 working-directory: ${{ env.ZED_WORKSPACE }}
299 - name: release_nightly::upload_zed_nightly
300 run: script/upload-nightly.ps1 -Architecture x86_64
301 shell: pwsh
302 working-directory: ${{ env.ZED_WORKSPACE }}
303 timeout-minutes: 60
304 bundle_windows_nightly_aarch64:
305 needs:
306 - check_style
307 - run_tests_windows
308 if: github.repository_owner == 'zed-industries'
309 runs-on: self-32vcpu-windows-2022
310 env:
311 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
312 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
313 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
314 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
315 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
316 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
317 FILE_DIGEST: SHA256
318 TIMESTAMP_DIGEST: SHA256
319 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
320 steps:
321 - name: steps::checkout_repo
322 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
323 with:
324 clean: false
325 - name: steps::setup_sentry
326 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
327 with:
328 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
329 - name: release_nightly::set_release_channel_to_nightly
330 run: |
331 $ErrorActionPreference = "Stop"
332 $version = git rev-parse --short HEAD
333 Write-Host "Publishing version: $version on release channel nightly"
334 "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
335 shell: pwsh
336 working-directory: ${{ env.ZED_WORKSPACE }}
337 - name: run_bundling::bundle_windows
338 run: script/bundle-windows.ps1 -Architecture aarch64
339 shell: pwsh
340 working-directory: ${{ env.ZED_WORKSPACE }}
341 - name: release_nightly::upload_zed_nightly
342 run: script/upload-nightly.ps1 -Architecture aarch64
343 shell: pwsh
344 working-directory: ${{ env.ZED_WORKSPACE }}
345 timeout-minutes: 60
346 build_nix_linux_x86_64:
347 needs:
348 - check_style
349 - run_tests_mac
350 if: github.repository_owner == 'zed-industries'
351 runs-on: namespace-profile-32x64-ubuntu-2004
352 env:
353 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
354 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
355 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
356 GIT_LFS_SKIP_SMUDGE: '1'
357 steps:
358 - name: steps::checkout_repo
359 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
360 with:
361 clean: false
362 - name: nix_build::build_nix::install_nix
363 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
364 with:
365 github_access_token: ${{ secrets.GITHUB_TOKEN }}
366 - name: nix_build::build_nix::cachix_action
367 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
368 with:
369 name: zed
370 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
371 cachixArgs: -v
372 - name: nix_build::build_nix::build
373 run: nix build .#default -L --accept-flake-config
374 shell: bash -euxo pipefail {0}
375 timeout-minutes: 60
376 continue-on-error: true
377 build_nix_mac_aarch64:
378 needs:
379 - check_style
380 - run_tests_mac
381 if: github.repository_owner == 'zed-industries'
382 runs-on: self-mini-macos
383 env:
384 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
385 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
386 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
387 GIT_LFS_SKIP_SMUDGE: '1'
388 steps:
389 - name: steps::checkout_repo
390 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
391 with:
392 clean: false
393 - name: nix_build::build_nix::set_path
394 run: |
395 echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
396 echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
397 shell: bash -euxo pipefail {0}
398 - name: nix_build::build_nix::cachix_action
399 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
400 with:
401 name: zed
402 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
403 cachixArgs: -v
404 - name: nix_build::build_nix::build
405 run: nix build .#default -L --accept-flake-config
406 shell: bash -euxo pipefail {0}
407 - name: nix_build::build_nix::limit_store
408 run: |-
409 if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
410 nix-collect-garbage -d || true
411 fi
412 shell: bash -euxo pipefail {0}
413 timeout-minutes: 60
414 continue-on-error: true
415 update_nightly_tag:
416 needs:
417 - bundle_mac_nightly_x86_64
418 - bundle_mac_nightly_aarch64
419 - bundle_linux_nightly_x86_64
420 - bundle_linux_nightly_aarch64
421 - bundle_windows_nightly_x86_64
422 - bundle_windows_nightly_aarch64
423 if: github.repository_owner == 'zed-industries'
424 runs-on: namespace-profile-2x4-ubuntu-2404
425 steps:
426 - name: steps::checkout_repo
427 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
428 with:
429 clean: false
430 fetch-depth: 0
431 - name: release_nightly::update_nightly_tag_job::update_nightly_tag
432 run: |
433 if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
434 echo "Nightly tag already points to current commit. Skipping tagging."
435 exit 0
436 fi
437 git config user.name github-actions
438 git config user.email github-actions@github.com
439 git tag -f nightly
440 git push origin nightly --force
441 shell: bash -euxo pipefail {0}
442 - name: release_nightly::update_nightly_tag_job::create_sentry_release
443 uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
444 with:
445 environment: production
446 env:
447 SENTRY_ORG: zed-dev
448 SENTRY_PROJECT: zed
449 SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
450 timeout-minutes: 60