2021-04-02 21:43:30 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
2024-02-16 03:04:57 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- "v[0-9]+.[0-9]+.x"
|
|
|
|
tags:
|
|
|
|
- "v*"
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "**"
|
2021-04-02 21:43:30 +00:00
|
|
|
|
2023-12-06 20:19:48 +00:00
|
|
|
concurrency:
|
2024-02-16 03:04:57 +00:00
|
|
|
# Allow only one workflow per any non-`main` branch.
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
|
|
|
|
cancel-in-progress: true
|
2023-12-06 20:19:48 +00:00
|
|
|
|
2021-04-02 21:43:30 +00:00
|
|
|
env:
|
2024-02-16 03:04:57 +00:00
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
CARGO_INCREMENTAL: 0
|
|
|
|
RUST_BACKTRACE: 1
|
2021-04-02 21:43:30 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-02-16 03:04:57 +00:00
|
|
|
style:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
2024-02-16 03:04:57 +00:00
|
|
|
name: Check formatting and spelling
|
|
|
|
runs-on:
|
|
|
|
- self-hosted
|
|
|
|
- test
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Remove untracked files
|
|
|
|
run: git clean -df
|
|
|
|
|
|
|
|
- name: Check spelling
|
2024-09-17 19:08:14 +00:00
|
|
|
run: script/check-spelling
|
2024-02-16 03:04:57 +00:00
|
|
|
|
|
|
|
- name: Run style checks
|
|
|
|
uses: ./.github/actions/check_style
|
|
|
|
|
2024-02-27 18:41:49 +00:00
|
|
|
- name: Check unused dependencies
|
|
|
|
uses: bnjbvr/cargo-machete@main
|
|
|
|
|
2024-06-18 19:49:44 +00:00
|
|
|
- name: Check licenses are present
|
|
|
|
run: script/check-licenses
|
|
|
|
|
2024-04-01 09:16:16 +00:00
|
|
|
- name: Check license generation
|
|
|
|
run: script/generate-licenses /tmp/zed_licenses_output
|
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: Ensure fresh merge
|
|
|
|
shell: bash -euxo pipefail {0}
|
|
|
|
run: |
|
|
|
|
if [ -z "$GITHUB_BASE_REF" ];
|
|
|
|
then
|
|
|
|
echo "BUF_BASE_BRANCH=$(git merge-base origin/main HEAD)" >> $GITHUB_ENV
|
|
|
|
else
|
|
|
|
git checkout -B temp
|
|
|
|
git merge -q origin/$GITHUB_BASE_REF -m "merge main into temp"
|
|
|
|
echo "BUF_BASE_BRANCH=$GITHUB_BASE_REF" >> $GITHUB_ENV
|
|
|
|
fi
|
|
|
|
|
|
|
|
- uses: bufbuild/buf-setup-action@v1
|
2024-02-21 22:29:11 +00:00
|
|
|
with:
|
|
|
|
version: v1.29.0
|
2024-02-16 03:04:57 +00:00
|
|
|
- uses: bufbuild/buf-breaking-action@v1
|
|
|
|
with:
|
2024-06-10 18:49:53 +00:00
|
|
|
input: "crates/proto/proto/"
|
2024-06-10 19:16:23 +00:00
|
|
|
against: "https://github.com/${GITHUB_REPOSITORY}.git#branch=${BUF_BASE_BRANCH},subdir=crates/proto/proto/"
|
2024-02-16 03:04:57 +00:00
|
|
|
|
|
|
|
macos_tests:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
2024-02-16 03:04:57 +00:00
|
|
|
name: (macOS) Run Clippy and tests
|
|
|
|
runs-on:
|
|
|
|
- self-hosted
|
|
|
|
- test
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
|
|
|
|
- name: cargo clippy
|
2024-06-18 19:49:44 +00:00
|
|
|
run: ./script/clippy
|
2024-02-16 03:04:57 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
uses: ./.github/actions/run_tests
|
|
|
|
|
|
|
|
- name: Build collab
|
|
|
|
run: cargo build -p collab
|
|
|
|
|
2024-02-16 21:39:40 +00:00
|
|
|
- name: Build other binaries and features
|
|
|
|
run: cargo build --workspace --bins --all-features; cargo check -p gpui --features "macos-blade"
|
2024-02-16 03:04:57 +00:00
|
|
|
|
|
|
|
linux_tests:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
2024-02-16 03:04:57 +00:00
|
|
|
name: (Linux) Run Clippy and tests
|
2024-05-09 21:44:31 +00:00
|
|
|
runs-on:
|
2024-09-17 19:44:33 +00:00
|
|
|
- buildjet-16vcpu-ubuntu-2204
|
2024-02-16 03:04:57 +00:00
|
|
|
steps:
|
2024-05-09 21:44:31 +00:00
|
|
|
- name: Add Rust to the PATH
|
|
|
|
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
|
2024-09-17 19:44:33 +00:00
|
|
|
- name: Cache dependencies
|
|
|
|
uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
|
|
|
|
with:
|
|
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
2024-09-18 22:05:30 +00:00
|
|
|
cache-provider: "buildjet"
|
2024-09-17 19:44:33 +00:00
|
|
|
|
2024-09-17 00:10:57 +00:00
|
|
|
- name: Install Linux dependencies
|
|
|
|
run: ./script/linux
|
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: cargo clippy
|
2024-06-18 19:49:44 +00:00
|
|
|
run: ./script/clippy
|
2024-02-16 03:04:57 +00:00
|
|
|
|
2024-06-13 23:38:53 +00:00
|
|
|
- name: Run tests
|
|
|
|
uses: ./.github/actions/run_tests
|
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: Build Zed
|
|
|
|
run: cargo build -p zed
|
2024-02-20 22:35:29 +00:00
|
|
|
|
2024-03-01 01:19:05 +00:00
|
|
|
# todo(windows): Actually run the tests
|
2024-02-20 22:35:29 +00:00
|
|
|
windows_tests:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
2024-02-20 22:35:29 +00:00
|
|
|
name: (Windows) Run Clippy and tests
|
2024-05-08 17:09:43 +00:00
|
|
|
runs-on: hosted-windows-1
|
2024-02-20 22:35:29 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-02-20 22:35:29 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
|
2024-02-27 16:35:17 +00:00
|
|
|
- name: Cache dependencies
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
|
2024-02-20 22:35:29 +00:00
|
|
|
with:
|
2024-02-27 16:35:17 +00:00
|
|
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
2024-09-18 22:05:30 +00:00
|
|
|
cache-provider: "github"
|
2024-02-24 00:23:42 +00:00
|
|
|
|
|
|
|
- name: cargo clippy
|
2024-07-27 01:38:34 +00:00
|
|
|
# Windows can't run shell scripts, so we need to use `cargo xtask`.
|
|
|
|
run: cargo xtask clippy
|
2024-02-20 22:35:29 +00:00
|
|
|
|
|
|
|
- name: Build Zed
|
|
|
|
run: cargo build -p zed
|
|
|
|
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
bundle-mac:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
name: Create a macOS bundle
|
2024-02-16 03:04:57 +00:00
|
|
|
runs-on:
|
|
|
|
- self-hosted
|
|
|
|
- bundle
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
2024-02-16 03:04:57 +00:00
|
|
|
needs: [macos_tests]
|
|
|
|
env:
|
|
|
|
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
|
|
|
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
|
|
|
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
|
|
|
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
|
|
|
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
2024-08-19 18:47:20 +00:00
|
|
|
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
2024-02-16 03:04:57 +00:00
|
|
|
DIGITALOCEAN_SPACES_ACCESS_KEY: ${{ secrets.DIGITALOCEAN_SPACES_ACCESS_KEY }}
|
|
|
|
DIGITALOCEAN_SPACES_SECRET_KEY: ${{ secrets.DIGITALOCEAN_SPACES_SECRET_KEY }}
|
|
|
|
steps:
|
|
|
|
- name: Install Node
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
node-version: "18"
|
|
|
|
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
2024-04-24 22:56:36 +00:00
|
|
|
# We need to fetch more than one commit so that `script/draft-release-notes`
|
|
|
|
# is able to diff between the current and previous tag.
|
|
|
|
#
|
|
|
|
# 25 was chosen arbitrarily.
|
|
|
|
fetch-depth: 25
|
2024-02-16 03:04:57 +00:00
|
|
|
clean: false
|
|
|
|
|
|
|
|
- name: Limit target directory size
|
|
|
|
run: script/clear-target-dir-if-larger-than 100
|
|
|
|
|
|
|
|
- name: Determine version and release channel
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
version=$(script/get-crate-version zed)
|
|
|
|
channel=$(cat crates/zed/RELEASE_CHANNEL)
|
|
|
|
echo "Publishing version: ${version} on release channel ${channel}"
|
|
|
|
echo "RELEASE_CHANNEL=${channel}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
expected_tag_name=""
|
|
|
|
case ${channel} in
|
|
|
|
stable)
|
|
|
|
expected_tag_name="v${version}";;
|
|
|
|
preview)
|
|
|
|
expected_tag_name="v${version}-pre";;
|
|
|
|
nightly)
|
|
|
|
expected_tag_name="v${version}-nightly";;
|
|
|
|
*)
|
|
|
|
echo "can't publish a release on channel ${channel}"
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
if [[ $GITHUB_REF_NAME != $expected_tag_name ]]; then
|
|
|
|
echo "invalid release tag ${GITHUB_REF_NAME}. expected ${expected_tag_name}"
|
|
|
|
exit 1
|
|
|
|
fi
|
2024-04-22 19:56:54 +00:00
|
|
|
mkdir -p target/
|
2024-04-24 22:56:36 +00:00
|
|
|
# Ignore any errors that occur while drafting release notes to not fail the build.
|
|
|
|
script/draft-release-notes "$version" "$channel" > target/release-notes.md || true
|
2024-02-16 03:04:57 +00:00
|
|
|
|
|
|
|
- name: Generate license file
|
|
|
|
run: script/generate-licenses
|
|
|
|
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
- name: Create macOS app bundle
|
|
|
|
run: script/bundle-mac
|
2024-02-16 03:04:57 +00:00
|
|
|
|
2024-03-18 19:04:58 +00:00
|
|
|
- name: Rename single-architecture binaries
|
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
run: |
|
|
|
|
mv target/aarch64-apple-darwin/release/Zed.dmg target/aarch64-apple-darwin/release/Zed-aarch64.dmg
|
2024-03-18 20:16:30 +00:00
|
|
|
mv target/x86_64-apple-darwin/release/Zed.dmg target/x86_64-apple-darwin/release/Zed-x86_64.dmg
|
2024-03-18 19:04:58 +00:00
|
|
|
|
2024-03-15 16:33:58 +00:00
|
|
|
- name: Upload app bundle (universal) to workflow run if main branch or specific label
|
2024-09-04 19:36:58 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}.dmg
|
|
|
|
path: target/release/Zed.dmg
|
2024-03-15 16:33:58 +00:00
|
|
|
- name: Upload app bundle (aarch64) to workflow run if main branch or specific label
|
2024-09-04 19:36:58 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
2024-03-15 16:33:58 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
with:
|
2024-03-18 19:04:58 +00:00
|
|
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-aarch64.dmg
|
|
|
|
path: target/aarch64-apple-darwin/release/Zed-aarch64.dmg
|
2024-03-15 16:33:58 +00:00
|
|
|
|
|
|
|
- name: Upload app bundle (x86_64) to workflow run if main branch or specific label
|
2024-09-04 19:36:58 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
2024-03-15 16:33:58 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
with:
|
2024-03-18 19:04:58 +00:00
|
|
|
name: Zed_${{ github.event.pull_request.head.sha || github.sha }}-x86_64.dmg
|
|
|
|
path: target/x86_64-apple-darwin/release/Zed-x86_64.dmg
|
2024-02-16 03:04:57 +00:00
|
|
|
|
2024-07-25 13:19:05 +00:00
|
|
|
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
2024-02-16 03:04:57 +00:00
|
|
|
name: Upload app bundle to release
|
|
|
|
if: ${{ env.RELEASE_CHANNEL == 'preview' || env.RELEASE_CHANNEL == 'stable' }}
|
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
|
2024-03-15 16:33:58 +00:00
|
|
|
files: |
|
2024-07-19 22:08:10 +00:00
|
|
|
target/zed-remote-server-macos-x86_64.gz
|
|
|
|
target/zed-remote-server-macos-aarch64.gz
|
2024-03-18 19:04:58 +00:00
|
|
|
target/aarch64-apple-darwin/release/Zed-aarch64.dmg
|
|
|
|
target/x86_64-apple-darwin/release/Zed-x86_64.dmg
|
|
|
|
target/release/Zed.dmg
|
2024-06-26 21:24:59 +00:00
|
|
|
body_path: target/release-notes.md
|
2021-05-18 05:39:01 +00:00
|
|
|
env:
|
2024-02-16 03:04:57 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
|
2024-04-30 12:56:48 +00:00
|
|
|
bundle-linux:
|
2024-05-30 15:17:03 +00:00
|
|
|
timeout-minutes: 60
|
2024-04-30 12:56:48 +00:00
|
|
|
name: Create a Linux bundle
|
2024-05-09 21:44:31 +00:00
|
|
|
runs-on:
|
2024-09-17 19:44:33 +00:00
|
|
|
- buildjet-16vcpu-ubuntu-2204
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
needs: [linux_tests]
|
|
|
|
env:
|
|
|
|
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
2024-08-19 18:47:20 +00:00
|
|
|
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
|
2024-09-17 00:10:57 +00:00
|
|
|
- name: Install Linux dependencies
|
|
|
|
run: ./script/linux
|
|
|
|
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
- name: Determine version and release channel
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
version=$(script/get-crate-version zed)
|
|
|
|
channel=$(cat crates/zed/RELEASE_CHANNEL)
|
|
|
|
echo "Publishing version: ${version} on release channel ${channel}"
|
|
|
|
echo "RELEASE_CHANNEL=${channel}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
expected_tag_name=""
|
|
|
|
case ${channel} in
|
|
|
|
stable)
|
|
|
|
expected_tag_name="v${version}";;
|
|
|
|
preview)
|
|
|
|
expected_tag_name="v${version}-pre";;
|
|
|
|
nightly)
|
|
|
|
expected_tag_name="v${version}-nightly";;
|
|
|
|
*)
|
|
|
|
echo "can't publish a release on channel ${channel}"
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
if [[ $GITHUB_REF_NAME != $expected_tag_name ]]; then
|
|
|
|
echo "invalid release tag ${GITHUB_REF_NAME}. expected ${expected_tag_name}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-06-21 23:32:32 +00:00
|
|
|
- name: Create Linux .tar.gz bundle
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
run: script/bundle-linux
|
|
|
|
|
2024-04-30 12:56:48 +00:00
|
|
|
- name: Upload Linux bundle to workflow run if main branch or specific label
|
2024-09-04 19:36:58 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
with:
|
2024-04-30 12:56:48 +00:00
|
|
|
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-x86_64-unknown-linux-gnu.tar.gz
|
2024-06-21 23:32:32 +00:00
|
|
|
path: target/release/zed-*.tar.gz
|
Initial Linux nightly bundles upload (#8913)
Changes Zed CI to build and upload Linux nightly bundles.
* `todo!(linux)` are replaced with `TODO linux` to make `todo!`-based
workflows more convenient
* renames `run-build-dmg` label into `run-bundling`, also renames a few
GH Actions entries to be more generic
* make another upload path for Linux, which keeps a separate file with SHA to version the nightly artifact.
* adds a `*.deb` package building with a couple of caveats, marked with
new `TODO linux` entries:
1. `cargo-bundle` is not very flexible, so it generates artifacts with
the structure and names that we're unable to alter before/during the
generation.
For that, a set of extra steps is made by repacking the *.deb package —
this is not very portable between different Linux distros, so later one
needs to find a way to combine multiple package types in this script.
2. `cargo-bundle` is not able to properly generate the *.msi bundle
despite declaring it in the features:
https://github.com/burtonageo/cargo-bundle/issues/116
Windows needs to invent its own way of bundling or fix the tool.
3. Both `cli` and `zed` binaries are added into the archive under
`/usr/local/bin/` path with their `-$channel` suffix
(-nightly/-preview/-dev/-stable) and a `/usr/local/bin/zed ->
/usr/local/bin/cli-nightly` symlink is made to make CLI work as Zed
launcher:
```
~/work/zed kb/linux-nightly:origin/kb/linux-nightly* ❯ dpkg -c target/zed_amd64.deb
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/
-rwxr-xr-x allaptop/allaptop 8746832 2024-03-06 00:53 ./usr/local/bin/cli-nightly
-rwxr-xr-x allaptop/allaptop 689078560 2024-03-06 00:53 ./usr/local/bin/zed-nightly
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/applications/
-rw-r--r-- allaptop/allaptop 153 2024-03-06 00:53 ./usr/share/applications/zed.desktop
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/
-rw-r--r-- allaptop/allaptop 716288 2024-03-06 00:53 ./usr/share/icons/hicolor/1024x1024@2x/apps/zed.png
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/
drwxr-xr-x allaptop/allaptop 0 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/
-rw-r--r-- allaptop/allaptop 239870 2024-03-06 00:53 ./usr/share/icons/hicolor/512x512/apps/zed.png
lrwxrwxrwx allaptop/allaptop 0 2024-03-06 00:53 ./usr/local/bin/zed -> /usr/local/bin/cli-nightly
```
But the CLI does not work under Linux yet and there's no way to install
that CLI from Zed now; Zed binary itself is not able to open
`file/location:12:34`-like things and set up the env properly, but is
able to start or open a directory.
So, this structure can be considered temporary and changed, if needed.
4. Zed Nightly on Linux does not know how to update itself, so all
nightly publishing is not picked up automatically.
5. Rust cache from `main` builds does not get shared between CI jobs,
due to being run in a different CI job that forms a different CI key, so
```
- name: Cache dependencies
uses: swatinem/rust-cache@v2
with:
save-if: ${{ false }}
```
would not work.
This makes Linux bundling jobs long.
Release Notes:
- N/A
2024-03-07 21:22:53 +00:00
|
|
|
|
2024-04-30 22:10:48 +00:00
|
|
|
- name: Upload app bundle to release
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
2024-04-30 22:10:48 +00:00
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
|
2024-07-19 17:27:26 +00:00
|
|
|
files: |
|
|
|
|
target/zed-remote-server-linux-x86_64.gz
|
|
|
|
target/release/zed-linux-x86_64.tar.gz
|
2024-04-30 22:10:48 +00:00
|
|
|
body: ""
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2024-06-13 14:00:15 +00:00
|
|
|
|
2024-09-10 16:40:54 +00:00
|
|
|
bundle-linux-aarch64: # this runs on ubuntu22.04
|
2024-06-13 14:00:15 +00:00
|
|
|
timeout-minutes: 60
|
|
|
|
name: Create arm64 Linux bundle
|
|
|
|
runs-on:
|
2024-09-17 19:44:33 +00:00
|
|
|
- buildjet-16vcpu-ubuntu-2204-arm
|
2024-06-13 14:00:15 +00:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
needs: [linux_tests]
|
|
|
|
env:
|
|
|
|
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
|
2024-08-19 18:47:20 +00:00
|
|
|
ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON: ${{ secrets.ZED_CLOUD_PROVIDER_ADDITIONAL_MODELS_JSON }}
|
2024-06-13 14:00:15 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-06-13 14:00:15 +00:00
|
|
|
with:
|
|
|
|
clean: false
|
|
|
|
|
2024-09-17 00:10:57 +00:00
|
|
|
- name: Install Linux dependencies
|
|
|
|
run: ./script/linux
|
2024-06-13 14:00:15 +00:00
|
|
|
|
|
|
|
- name: Determine version and release channel
|
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
run: |
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
version=$(script/get-crate-version zed)
|
|
|
|
channel=$(cat crates/zed/RELEASE_CHANNEL)
|
|
|
|
echo "Publishing version: ${version} on release channel ${channel}"
|
|
|
|
echo "RELEASE_CHANNEL=${channel}" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
expected_tag_name=""
|
|
|
|
case ${channel} in
|
|
|
|
stable)
|
|
|
|
expected_tag_name="v${version}";;
|
|
|
|
preview)
|
|
|
|
expected_tag_name="v${version}-pre";;
|
|
|
|
nightly)
|
|
|
|
expected_tag_name="v${version}-nightly";;
|
|
|
|
*)
|
|
|
|
echo "can't publish a release on channel ${channel}"
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
if [[ $GITHUB_REF_NAME != $expected_tag_name ]]; then
|
|
|
|
echo "invalid release tag ${GITHUB_REF_NAME}. expected ${expected_tag_name}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
- name: Create and upload Linux .tar.gz bundle
|
|
|
|
run: script/bundle-linux
|
|
|
|
|
|
|
|
- name: Upload Linux bundle to workflow run if main branch or specific label
|
2024-09-04 19:36:58 +00:00
|
|
|
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4
|
2024-06-13 14:00:15 +00:00
|
|
|
if: ${{ github.ref == 'refs/heads/main' }} || contains(github.event.pull_request.labels.*.name, 'run-bundling') }}
|
|
|
|
with:
|
|
|
|
name: zed-${{ github.event.pull_request.head.sha || github.sha }}-aarch64-unknown-linux-gnu.tar.gz
|
|
|
|
path: target/release/zed-*.tar.gz
|
|
|
|
|
|
|
|
- name: Upload app bundle to release
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
|
2024-07-03 16:31:14 +00:00
|
|
|
if: ${{ env.RELEASE_CHANNEL == 'preview' || env.RELEASE_CHANNEL == 'stable' }}
|
2024-06-13 14:00:15 +00:00
|
|
|
with:
|
|
|
|
draft: true
|
|
|
|
prerelease: ${{ env.RELEASE_CHANNEL == 'preview' }}
|
2024-07-19 17:27:26 +00:00
|
|
|
files: |
|
|
|
|
target/zed-remote-server-linux-aarch64.gz
|
|
|
|
target/release/zed-linux-aarch64.tar.gz
|
2024-06-13 14:00:15 +00:00
|
|
|
body: ""
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|