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::cargo_install_nextest
53 run: cargo install cargo-nextest --locked
54 shell: bash -euxo pipefail {0}
55 - name: steps::clear_target_dir_if_large
56 run: ./script/clear-target-dir-if-larger-than 300
57 shell: bash -euxo pipefail {0}
58 - name: steps::cargo_nextest
59 run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
60 shell: bash -euxo pipefail {0}
61 - name: steps::cleanup_cargo_config
62 if: always()
63 run: |
64 rm -rf ./../.cargo
65 shell: bash -euxo pipefail {0}
66 timeout-minutes: 60
67 run_tests_windows:
68 if: github.repository_owner == 'zed-industries'
69 runs-on: self-32vcpu-windows-2022
70 steps:
71 - name: steps::checkout_repo
72 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
73 with:
74 clean: false
75 - name: steps::setup_cargo_config
76 run: |
77 New-Item -ItemType Directory -Path "./../.cargo" -Force
78 Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
79 shell: pwsh
80 - name: steps::setup_node
81 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
82 with:
83 node-version: '20'
84 - name: steps::cargo_install_nextest
85 run: cargo install cargo-nextest --locked
86 shell: pwsh
87 - name: steps::clear_target_dir_if_large
88 run: ./script/clear-target-dir-if-larger-than.ps1 250
89 shell: pwsh
90 - name: steps::cargo_nextest
91 run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
92 shell: pwsh
93 - name: steps::cleanup_cargo_config
94 if: always()
95 run: |
96 Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
97 shell: pwsh
98 timeout-minutes: 60
99 bundle_mac_nightly:
100 needs:
101 - check_style
102 - run_tests_mac
103 if: github.repository_owner == 'zed-industries'
104 runs-on: self-mini-macos
105 env:
106 MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
107 MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
108 APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
109 APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
110 APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
111 steps:
112 - name: steps::checkout_repo
113 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
114 with:
115 clean: false
116 - name: steps::setup_node
117 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
118 with:
119 node-version: '20'
120 - name: steps::setup_sentry
121 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
122 with:
123 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
124 - name: steps::clear_target_dir_if_large
125 run: ./script/clear-target-dir-if-larger-than 300
126 shell: bash -euxo pipefail {0}
127 - name: release_nightly::set_release_channel_to_nightly
128 run: |
129 set -eu
130 version=$(git rev-parse --short HEAD)
131 echo "Publishing version: ${version} on release channel nightly"
132 echo "nightly" > crates/zed/RELEASE_CHANNEL
133 shell: bash -euxo pipefail {0}
134 - name: ./script/bundle-mac
135 run: ./script/bundle-mac
136 shell: bash -euxo pipefail {0}
137 - name: release_nightly::upload_zed_nightly
138 run: script/upload-nightly macos
139 shell: bash -euxo pipefail {0}
140 timeout-minutes: 60
141 bundle_linux_nightly_x86_64:
142 needs:
143 - check_style
144 - run_tests_mac
145 if: github.repository_owner == 'zed-industries'
146 runs-on: namespace-profile-32x64-ubuntu-2004
147 steps:
148 - name: steps::checkout_repo
149 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
150 with:
151 clean: false
152 - name: steps::setup_sentry
153 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
154 with:
155 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
156 - name: release_nightly::add_rust_to_path
157 run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
158 shell: bash -euxo pipefail {0}
159 - name: ./script/linux
160 run: ./script/linux
161 shell: bash -euxo pipefail {0}
162 - name: ./script/install-mold
163 run: ./script/install-mold
164 shell: bash -euxo pipefail {0}
165 - name: steps::clear_target_dir_if_large
166 run: ./script/clear-target-dir-if-larger-than 100
167 shell: bash -euxo pipefail {0}
168 - name: release_nightly::set_release_channel_to_nightly
169 run: |
170 set -eu
171 version=$(git rev-parse --short HEAD)
172 echo "Publishing version: ${version} on release channel nightly"
173 echo "nightly" > crates/zed/RELEASE_CHANNEL
174 shell: bash -euxo pipefail {0}
175 - name: ./script/bundle-linux
176 run: ./script/bundle-linux
177 shell: bash -euxo pipefail {0}
178 - name: release_nightly::upload_zed_nightly
179 run: script/upload-nightly linux-targz
180 shell: bash -euxo pipefail {0}
181 timeout-minutes: 60
182 bundle_linux_nightly_aarch64:
183 needs:
184 - check_style
185 - run_tests_mac
186 if: github.repository_owner == 'zed-industries'
187 runs-on: namespace-profile-8x32-ubuntu-2004-arm-m4
188 steps:
189 - name: steps::checkout_repo
190 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
191 with:
192 clean: false
193 - name: steps::setup_sentry
194 uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
195 with:
196 token: ${{ secrets.SENTRY_AUTH_TOKEN }}
197 - name: release_nightly::add_rust_to_path
198 run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
199 shell: bash -euxo pipefail {0}
200 - name: ./script/linux
201 run: ./script/linux
202 shell: bash -euxo pipefail {0}
203 - name: steps::clear_target_dir_if_large
204 run: ./script/clear-target-dir-if-larger-than 100
205 shell: bash -euxo pipefail {0}
206 - name: release_nightly::set_release_channel_to_nightly
207 run: |
208 set -eu
209 version=$(git rev-parse --short HEAD)
210 echo "Publishing version: ${version} on release channel nightly"
211 echo "nightly" > crates/zed/RELEASE_CHANNEL
212 shell: bash -euxo pipefail {0}
213 - name: ./script/bundle-linux
214 run: ./script/bundle-linux
215 shell: bash -euxo pipefail {0}
216 - name: release_nightly::upload_zed_nightly
217 run: script/upload-nightly linux-targz
218 shell: bash -euxo pipefail {0}
219 timeout-minutes: 60
220 bundle_windows_nightly_x86_64:
221 needs:
222 - check_style
223 - run_tests_windows
224 if: github.repository_owner == 'zed-industries'
225 runs-on: self-32vcpu-windows-2022
226 env:
227 AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
228 AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
229 AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
230 ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
231 CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
232 ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
233 FILE_DIGEST: SHA256
234 TIMESTAMP_DIGEST: SHA256
235 TIMESTAMP_SERVER: http://timestamp.acs.microsoft.com
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::set_release_channel_to_nightly
246 run: |
247 $ErrorActionPreference = "Stop"
248 $version = git rev-parse --short HEAD
249 Write-Host "Publishing version: $version on release channel nightly"
250 "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
251 shell: pwsh
252 working-directory: ${{ env.ZED_WORKSPACE }}
253 - name: release_nightly::build_zed_installer
254 run: script/bundle-windows.ps1 -Architecture x86_64
255 shell: pwsh
256 working-directory: ${{ env.ZED_WORKSPACE }}
257 - name: release_nightly::upload_zed_nightly_windows
258 run: script/upload-nightly.ps1 -Architecture x86_64
259 shell: pwsh
260 working-directory: ${{ env.ZED_WORKSPACE }}
261 timeout-minutes: 60
262 bundle_windows_nightly_aarch64:
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: release_nightly::build_zed_installer
296 run: script/bundle-windows.ps1 -Architecture aarch64
297 shell: pwsh
298 working-directory: ${{ env.ZED_WORKSPACE }}
299 - name: release_nightly::upload_zed_nightly_windows
300 run: script/upload-nightly.ps1 -Architecture aarch64
301 shell: pwsh
302 working-directory: ${{ env.ZED_WORKSPACE }}
303 timeout-minutes: 60
304 build_nix_linux_x86_64:
305 needs:
306 - check_style
307 - run_tests_mac
308 if: github.repository_owner == 'zed-industries'
309 runs-on: namespace-profile-32x64-ubuntu-2004
310 env:
311 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
312 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
313 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
314 GIT_LFS_SKIP_SMUDGE: '1'
315 steps:
316 - name: steps::checkout_repo
317 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
318 with:
319 clean: false
320 - name: nix_build::install_nix
321 uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f
322 with:
323 github_access_token: ${{ secrets.GITHUB_TOKEN }}
324 - name: nix_build::cachix_action
325 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
326 with:
327 name: zed
328 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
329 cachixArgs: -v
330 - name: nix_build::build
331 run: nix build .#default -L --accept-flake-config
332 shell: bash -euxo pipefail {0}
333 timeout-minutes: 60
334 continue-on-error: true
335 build_nix_mac_aarch64:
336 needs:
337 - check_style
338 - run_tests_mac
339 if: github.repository_owner == 'zed-industries'
340 runs-on: self-mini-macos
341 env:
342 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
343 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
344 ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
345 GIT_LFS_SKIP_SMUDGE: '1'
346 steps:
347 - name: steps::checkout_repo
348 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
349 with:
350 clean: false
351 - name: nix_build::set_path
352 run: |
353 echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"
354 echo "/Users/administrator/.nix-profile/bin" >> "$GITHUB_PATH"
355 shell: bash -euxo pipefail {0}
356 - name: nix_build::cachix_action
357 uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad
358 with:
359 name: zed
360 authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
361 cachixArgs: -v
362 - name: nix_build::build
363 run: nix build .#default -L --accept-flake-config
364 shell: bash -euxo pipefail {0}
365 - name: nix_build::limit_store
366 run: |-
367 if [ "$(du -sm /nix/store | cut -f1)" -gt 50000 ]; then
368 nix-collect-garbage -d || true
369 fi
370 shell: bash -euxo pipefail {0}
371 timeout-minutes: 60
372 continue-on-error: true
373 update_nightly_tag:
374 needs:
375 - bundle_mac_nightly
376 - bundle_linux_nightly_x86_64
377 - bundle_linux_nightly_aarch64
378 - bundle_windows_nightly_x86_64
379 - bundle_windows_nightly_aarch64
380 if: github.repository_owner == 'zed-industries'
381 runs-on: namespace-profile-2x4-ubuntu-2404
382 steps:
383 - name: steps::checkout_repo
384 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
385 with:
386 clean: false
387 fetch-depth: 0
388 - name: release_nightly::update_nightly_tag
389 run: |
390 if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
391 echo "Nightly tag already points to current commit. Skipping tagging."
392 exit 0
393 fi
394 git config user.name github-actions
395 git config user.email github-actions@github.com
396 git tag -f nightly
397 git push origin nightly --force
398 shell: bash -euxo pipefail {0}
399 - name: release_nightly::create_sentry_release
400 uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c
401 with:
402 environment: production
403 env:
404 SENTRY_ORG: zed-dev
405 SENTRY_PROJECT: zed
406 SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
407 timeout-minutes: 60