1name: Release Nightly
2
3on:
4 schedule:
5 # Fire every day at 7:00am UTC (Roughly before EU workday and after US workday)
6 - cron: "0 7 * * *"
7 push:
8 branches:
9 - rustdoc-action
10
11env:
12 CARGO_TERM_COLOR: always
13 CARGO_INCREMENTAL: 0
14 RUST_BACKTRACE: 1
15 ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
16 ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
17 DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
18 DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
19
20jobs:
21 # style:
22 # timeout-minutes: 60
23 # name: Check formatting and Clippy lints
24 # if: github.repository_owner == 'zed-industries'
25 # runs-on:
26 # - self-hosted
27 # - macOS
28 # steps:
29 # - name: Checkout repo
30 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
31 # with:
32 # clean: false
33 # fetch-depth: 0
34
35 # - name: Run style checks
36 # uses: ./.github/actions/check_style
37
38 # - name: Run clippy
39 # run: ./script/clippy
40
41 # tests:
42 # timeout-minutes: 60
43 # name: Run tests
44 # if: github.repository_owner == 'zed-industries'
45 # runs-on:
46 # - self-hosted
47 # - macOS
48 # needs: style
49 # steps:
50 # - name: Checkout repo
51 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
52 # with:
53 # clean: false
54
55 # - name: Run tests
56 # uses: ./.github/actions/run_tests
57
58 # windows-tests:
59 # timeout-minutes: 60
60 # name: Run tests on Windows
61 # if: github.repository_owner == 'zed-industries'
62 # runs-on: [self-32vcpu-windows-2022]
63 # steps:
64 # - name: Checkout repo
65 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
66 # with:
67 # clean: false
68
69 # - name: Configure CI
70 # run: |
71 # New-Item -ItemType Directory -Path "./../.cargo" -Force
72 # Copy-Item -Path "./.cargo/ci-config.toml" -Destination "./../.cargo/config.toml"
73
74 # - name: Run tests
75 # uses: ./.github/actions/run_tests_windows
76
77 # - name: Limit target directory size
78 # run: ./script/clear-target-dir-if-larger-than.ps1 1024
79
80 # - name: Clean CI config file
81 # if: always()
82 # run: Remove-Item -Recurse -Path "./../.cargo" -Force -ErrorAction SilentlyContinue
83
84 # bundle-mac:
85 # timeout-minutes: 60
86 # name: Create a macOS bundle
87 # if: github.repository_owner == 'zed-industries'
88 # runs-on:
89 # - self-mini-macos
90 # needs: tests
91 # env:
92 # MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
93 # MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
94 # APPLE_NOTARIZATION_KEY: ${{ secrets.APPLE_NOTARIZATION_KEY }}
95 # APPLE_NOTARIZATION_KEY_ID: ${{ secrets.APPLE_NOTARIZATION_KEY_ID }}
96 # APPLE_NOTARIZATION_ISSUER_ID: ${{ secrets.APPLE_NOTARIZATION_ISSUER_ID }}
97 # steps:
98 # - name: Install Node
99 # uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
100 # with:
101 # node-version: "18"
102
103 # - name: Checkout repo
104 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
105 # with:
106 # clean: false
107
108 # - name: Set release channel to nightly
109 # run: |
110 # set -eu
111 # version=$(git rev-parse --short HEAD)
112 # echo "Publishing version: ${version} on release channel nightly"
113 # echo "nightly" > crates/zed/RELEASE_CHANNEL
114
115 # - name: Setup Sentry CLI
116 # uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
117 # with:
118 # token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
119
120 # - name: Create macOS app bundle
121 # run: script/bundle-mac
122
123 # - name: Upload Zed Nightly
124 # run: script/upload-nightly macos
125
126 # bundle-linux-x86:
127 # timeout-minutes: 60
128 # name: Create a Linux *.tar.gz bundle for x86
129 # if: github.repository_owner == 'zed-industries'
130 # runs-on:
131 # - namespace-profile-16x32-ubuntu-2004 # ubuntu 20.04 for minimal glibc
132 # needs: tests
133 # steps:
134 # - name: Checkout repo
135 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
136 # with:
137 # clean: false
138
139 # - name: Add Rust to the PATH
140 # run: echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
141
142 # - name: Install Linux dependencies
143 # run: ./script/linux && ./script/install-mold 2.34.0
144
145 # - name: Setup Sentry CLI
146 # uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
147 # with:
148 # token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
149
150 # - name: Limit target directory size
151 # run: script/clear-target-dir-if-larger-than 100
152
153 # - name: Set release channel to nightly
154 # run: |
155 # set -euo pipefail
156 # version=$(git rev-parse --short HEAD)
157 # echo "Publishing version: ${version} on release channel nightly"
158 # echo "nightly" > crates/zed/RELEASE_CHANNEL
159
160 # - name: Create Linux .tar.gz bundle
161 # run: script/bundle-linux
162
163 # - name: Upload Zed Nightly
164 # run: script/upload-nightly linux-targz
165
166 # bundle-linux-arm:
167 # timeout-minutes: 60
168 # name: Create a Linux *.tar.gz bundle for ARM
169 # if: github.repository_owner == 'zed-industries'
170 # runs-on:
171 # - namespace-profile-8x32-ubuntu-2004-arm-m4 # ubuntu 20.04 for minimal glibc
172 # needs: tests
173 # steps:
174 # - name: Checkout repo
175 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
176 # with:
177 # clean: false
178
179 # - name: Install Linux dependencies
180 # run: ./script/linux
181
182 # - name: Setup Sentry CLI
183 # uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
184 # with:
185 # token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
186
187 # - name: Limit target directory size
188 # run: script/clear-target-dir-if-larger-than 100
189
190 # - name: Set release channel to nightly
191 # run: |
192 # set -euo pipefail
193 # version=$(git rev-parse --short HEAD)
194 # echo "Publishing version: ${version} on release channel nightly"
195 # echo "nightly" > crates/zed/RELEASE_CHANNEL
196
197 # - name: Create Linux .tar.gz bundle
198 # run: script/bundle-linux
199
200 # - name: Upload Zed Nightly
201 # run: script/upload-nightly linux-targz
202
203 # freebsd:
204 # timeout-minutes: 60
205 # if: false && github.repository_owner == 'zed-industries'
206 # runs-on: github-8vcpu-ubuntu-2404
207 # needs: tests
208 # name: Build Zed on FreeBSD
209 # steps:
210 # - uses: actions/checkout@v4
211 # - name: Build FreeBSD remote-server
212 # id: freebsd-build
213 # uses: vmactions/freebsd-vm@c3ae29a132c8ef1924775414107a97cac042aad5 # v1.2.0
214 # with:
215 # # envs: "MYTOKEN MYTOKEN2"
216 # usesh: true
217 # release: 13.5
218 # copyback: true
219 # prepare: |
220 # pkg install -y \
221 # bash curl jq git \
222 # rustup-init cmake-core llvm-devel-lite pkgconf protobuf # ibx11 alsa-lib rust-bindgen-cli
223 # run: |
224 # freebsd-version
225 # sysctl hw.model
226 # sysctl hw.ncpu
227 # sysctl hw.physmem
228 # sysctl hw.usermem
229 # git config --global --add safe.directory /home/runner/work/zed/zed
230 # rustup-init --profile minimal --default-toolchain none -y
231 # . "$HOME/.cargo/env"
232 # ./script/bundle-freebsd
233 # mkdir -p out/
234 # mv "target/zed-remote-server-freebsd-x86_64.gz" out/
235 # rm -rf target/
236 # cargo clean
237
238 # - name: Upload Zed Nightly
239 # run: script/upload-nightly freebsd
240
241 # bundle-nix:
242 # name: Build and cache Nix package
243 # needs: tests
244 # secrets: inherit
245 # uses: ./.github/workflows/nix.yml
246
247 # bundle-windows-x64:
248 # timeout-minutes: 60
249 # name: Create a Windows installer
250 # if: github.repository_owner == 'zed-industries'
251 # runs-on: [self-32vcpu-windows-2022]
252 # needs: windows-tests
253 # env:
254 # AZURE_TENANT_ID: ${{ secrets.AZURE_SIGNING_TENANT_ID }}
255 # AZURE_CLIENT_ID: ${{ secrets.AZURE_SIGNING_CLIENT_ID }}
256 # AZURE_CLIENT_SECRET: ${{ secrets.AZURE_SIGNING_CLIENT_SECRET }}
257 # ACCOUNT_NAME: ${{ vars.AZURE_SIGNING_ACCOUNT_NAME }}
258 # CERT_PROFILE_NAME: ${{ vars.AZURE_SIGNING_CERT_PROFILE_NAME }}
259 # ENDPOINT: ${{ vars.AZURE_SIGNING_ENDPOINT }}
260 # FILE_DIGEST: SHA256
261 # TIMESTAMP_DIGEST: SHA256
262 # TIMESTAMP_SERVER: "http://timestamp.acs.microsoft.com"
263 # steps:
264 # - name: Checkout repo
265 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
266 # with:
267 # clean: false
268
269 # - name: Set release channel to nightly
270 # working-directory: ${{ env.ZED_WORKSPACE }}
271 # run: |
272 # $ErrorActionPreference = "Stop"
273 # $version = git rev-parse --short HEAD
274 # Write-Host "Publishing version: $version on release channel nightly"
275 # "nightly" | Set-Content -Path "crates/zed/RELEASE_CHANNEL"
276
277 # - name: Setup Sentry CLI
278 # uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b #v2
279 # with:
280 # token: ${{ SECRETS.SENTRY_AUTH_TOKEN }}
281
282 # - name: Build Zed installer
283 # working-directory: ${{ env.ZED_WORKSPACE }}
284 # run: script/bundle-windows.ps1
285
286 # - name: Upload Zed Nightly
287 # working-directory: ${{ env.ZED_WORKSPACE }}
288 # run: script/upload-nightly.ps1 windows
289
290 gpui-docs:
291 timeout-minutes: 60
292 name: Render rust docs for gpui
293 if: github.repository_owner == 'zed-industries'
294 # TODO: build for multiple targets?
295 runs-on:
296 - github-16vcpu-ubuntu-2404
297 # needs: tests
298 continue-on-error: true
299 steps:
300 - name: Checkout repo
301 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
302 with:
303 clean: false
304
305 - name: Add Rust to the PATH
306 run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
307
308 - name: Install Linux dependencies
309 run: ./script/linux && ./script/install-mold 2.34.0
310
311 - name: Limit target directory size
312 run: script/clear-target-dir-if-larger-than 100
313
314 - name: Build rustdocs
315 run: cargo doc -p gpui --no-deps
316
317 - name: Check for broken links (in HTML)
318 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
319 with:
320 args: --no-progress --exclude '^http' 'target/doc/'
321 fail: true
322
323 - name: Deploy rustdoc
324 uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
325 with:
326 apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
327 accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
328 command: pages deploy target/doc --project-name=gpui-rustdoc
329
330 # update-nightly-tag:
331 # name: Update nightly tag
332 # if: github.repository_owner == 'zed-industries'
333 # runs-on: namespace-profile-2x4-ubuntu-2404
334 # needs:
335 # - bundle-mac
336 # - bundle-linux-x86
337 # - bundle-linux-arm
338 # - bundle-windows-x64
339 # steps:
340 # - name: Checkout repo
341 # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
342 # with:
343 # fetch-depth: 0
344
345 # - name: Update nightly tag
346 # run: |
347 # if [ "$(git rev-parse nightly)" = "$(git rev-parse HEAD)" ]; then
348 # echo "Nightly tag already points to current commit. Skipping tagging."
349 # exit 0
350 # fi
351 # git config user.name github-actions
352 # git config user.email github-actions@github.com
353 # git tag -f nightly
354 # git push origin nightly --force
355
356 # - name: Create Sentry release
357 # uses: getsentry/action-release@526942b68292201ac6bbb99b9a0747d4abee354c # v3
358 # env:
359 # SENTRY_ORG: zed-dev
360 # SENTRY_PROJECT: zed
361 # SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
362 # with:
363 # environment: production