Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ci: Fix bundling linux (#50375)

Jakub Konka2eea301b62b1
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4fe1d4dd7d6..69bb80b40d7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -299,6 +299,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -339,6 +341,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.yml
index d3f01447e52..faf7788eeaf 100644
--- a/.github/workflows/release_nightly.yml
+++ b/.github/workflows/release_nightly.yml
@@ -103,6 +103,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -149,6 +151,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
diff --git a/.github/workflows/run_bundling.yml b/.github/workflows/run_bundling.yml
index 2b536425a1d..683d74a264e 100644
--- a/.github/workflows/run_bundling.yml
+++ b/.github/workflows/run_bundling.yml
@@ -19,6 +19,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -58,6 +60,8 @@ jobs:
CARGO_INCREMENTAL: 0
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
diff --git a/Cargo.lock b/Cargo.lock
index 6ae4f57301f..c28d777c3f4 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -9698,7 +9698,7 @@ dependencies = [
[[package]]
name = "libwebrtc"
version = "0.3.26"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"cxx",
"glib",
@@ -9796,7 +9796,7 @@ checksum = "11d3d7f243d5c5a8b9bb5d6dd2b1602c0cb0b9db1621bafc7ed66e35ff9fe092"
[[package]]
name = "livekit"
version = "0.7.32"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"base64 0.22.1",
"bmrng",
@@ -9822,7 +9822,7 @@ dependencies = [
[[package]]
name = "livekit-api"
version = "0.4.14"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"base64 0.21.7",
"futures-util",
@@ -9849,7 +9849,7 @@ dependencies = [
[[package]]
name = "livekit-protocol"
version = "0.7.1"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"futures-util",
"livekit-runtime",
@@ -9865,7 +9865,7 @@ dependencies = [
[[package]]
name = "livekit-runtime"
version = "0.4.0"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"tokio",
"tokio-stream",
@@ -19882,7 +19882,7 @@ dependencies = [
[[package]]
name = "webrtc-sys"
version = "0.3.23"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"cc",
"cxx",
@@ -19896,7 +19896,7 @@ dependencies = [
[[package]]
name = "webrtc-sys-build"
version = "0.3.13"
-source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=9c38d9a0a91951967f8fa84ed86e193626436774#9c38d9a0a91951967f8fa84ed86e193626436774"
+source = "git+https://github.com/zed-industries/livekit-rust-sdks?rev=fccf29d1d0d0a139b2e50746b0b9a1bac828fa04#fccf29d1d0d0a139b2e50746b0b9a1bac828fa04"
dependencies = [
"anyhow",
"fs2",
diff --git a/Cargo.toml b/Cargo.toml
index 3b63808046e..148a909ccc8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -837,8 +837,8 @@ notify = { git = "https://github.com/zed-industries/notify.git", rev = "ce58c24c
notify-types = { git = "https://github.com/zed-industries/notify.git", rev = "ce58c24cad542c28e04ced02e20325a4ec28a31d" }
windows-capture = { git = "https://github.com/zed-industries/windows-capture.git", rev = "f0d6c1b6691db75461b732f6d5ff56eed002eeb9" }
calloop = { git = "https://github.com/zed-industries/calloop" }
-livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "9c38d9a0a91951967f8fa84ed86e193626436774" }
-libwebrtc = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "9c38d9a0a91951967f8fa84ed86e193626436774" }
+livekit = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "fccf29d1d0d0a139b2e50746b0b9a1bac828fa04" }
+libwebrtc = { git = "https://github.com/zed-industries/livekit-rust-sdks", rev = "fccf29d1d0d0a139b2e50746b0b9a1bac828fa04" }
[profile.dev]
split-debuginfo = "unpacked"
diff --git a/tooling/xtask/src/tasks/workflows/run_bundling.rs b/tooling/xtask/src/tasks/workflows/run_bundling.rs
index 7fa82e80c52..2de7000360b 100644
--- a/tooling/xtask/src/tasks/workflows/run_bundling.rs
+++ b/tooling/xtask/src/tasks/workflows/run_bundling.rs
@@ -4,7 +4,9 @@ use crate::tasks::workflows::{
nix_build::build_nix,
release::ReleaseBundleJobs,
runners::{Arch, Platform, ReleaseChannel},
- steps::{DEFAULT_REPOSITORY_OWNER_GUARD, FluentBuilder, NamedJob, dependant_job, named},
+ steps::{
+ DEFAULT_REPOSITORY_OWNER_GUARD, FluentBuilder, NamedJob, dependant_job, named, use_clang,
+ },
vars::{assets, bundle_envs},
};
@@ -143,20 +145,22 @@ pub(crate) fn bundle_linux(
};
NamedJob {
name: format!("bundle_linux_{arch}"),
- job: bundle_job(deps)
- .runs_on(arch.linux_bundler())
- .envs(bundle_envs(platform))
- .add_step(steps::checkout_repo())
- .when_some(release_channel, |job, release_channel| {
- job.add_step(set_release_channel(platform, release_channel))
- })
- .add_step(steps::setup_sentry())
- .map(steps::install_linux_dependencies)
- .add_step(steps::script("./script/bundle-linux"))
- .add_step(upload_artifact(&format!("target/release/{artifact_name}")))
- .add_step(upload_artifact(&format!(
- "target/{remote_server_artifact_name}"
- ))),
+ job: use_clang(
+ bundle_job(deps)
+ .runs_on(arch.linux_bundler())
+ .envs(bundle_envs(platform)),
+ )
+ .add_step(steps::checkout_repo())
+ .when_some(release_channel, |job, release_channel| {
+ job.add_step(set_release_channel(platform, release_channel))
+ })
+ .add_step(steps::setup_sentry())
+ .map(steps::install_linux_dependencies)
+ .add_step(steps::script("./script/bundle-linux"))
+ .add_step(upload_artifact(&format!("target/release/{artifact_name}")))
+ .add_step(upload_artifact(&format!(
+ "target/{remote_server_artifact_name}"
+ ))),
}
}
diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs
index 378af0eba5d..9c5529cc536 100644
--- a/tooling/xtask/src/tasks/workflows/run_tests.rs
+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs
@@ -1,12 +1,12 @@
use gh_workflow::{
- Concurrency, Container, Env, Event, Expression, Job, Port, PullRequest, Push, Run, Step, Use,
+ Concurrency, Container, Event, Expression, Job, Port, PullRequest, Push, Run, Step, Use,
Workflow,
};
use indexmap::IndexMap;
use indoc::formatdoc;
use crate::tasks::workflows::{
- steps::{CommonJobConditions, repository_owner_guard_expression},
+ steps::{CommonJobConditions, repository_owner_guard_expression, use_clang},
vars::{self, PathCondition},
};
@@ -15,11 +15,6 @@ use super::{
steps::{self, FluentBuilder, NamedJob, named, release_job},
};
-fn use_clang(job: Job) -> Job {
- job.add_env(Env::new("CC", "clang"))
- .add_env(Env::new("CXX", "clang++"))
-}
-
pub(crate) fn run_tests() -> Workflow {
// Specify anything which should potentially skip full test suite in this regex:
// - docs/
diff --git a/tooling/xtask/src/tasks/workflows/steps.rs b/tooling/xtask/src/tasks/workflows/steps.rs
index 8220d8311ff..9e54452424d 100644
--- a/tooling/xtask/src/tasks/workflows/steps.rs
+++ b/tooling/xtask/src/tasks/workflows/steps.rs
@@ -3,6 +3,11 @@ use serde_json::Value;
use crate::tasks::workflows::{runners::Platform, vars, vars::StepOutput};
+pub(crate) fn use_clang(job: Job) -> Job {
+ job.add_env(Env::new("CC", "clang"))
+ .add_env(Env::new("CXX", "clang++"))
+}
+
const SCCACHE_R2_BUCKET: &str = "sccache-zed";
const BASH_SHELL: &str = "bash -euxo pipefail {0}";