Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Install newer LLVM toolchain on Ubuntu 20.04 runners (#50414)
Jakub Konka4668aeb72847
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 69bb80b40d7..8ac5eeb998f 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -299,8 +299,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683@@ -341,8 +341,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683diff --git a/.github/workflows/release_nightly.yml b/.github/workflows/release_nightly.ymlindex faf7788eeaf..7f243411b4f 100644--- a/.github/workflows/release_nightly.yml+++ b/.github/workflows/release_nightly.yml@@ -103,8 +103,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683@@ -151,8 +151,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683diff --git a/.github/workflows/run_bundling.yml b/.github/workflows/run_bundling.ymlindex 683d74a264e..7cb1665f9d0 100644--- a/.github/workflows/run_bundling.yml+++ b/.github/workflows/run_bundling.yml@@ -19,8 +19,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683@@ -60,8 +60,8 @@ jobs:CARGO_INCREMENTAL: 0ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}ZED_MINIDUMP_ENDPOINT: ${{ secrets.ZED_SENTRY_MINIDUMP_ENDPOINT }}- CC: clang- CXX: clang+++ CC: clang-18+ CXX: clang++-18steps:- name: steps::checkout_repouses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683diff --git a/crates/gpui_linux/src/linux/headless/client.rs b/crates/gpui_linux/src/linux/headless/client.rsindex 6dbdc556751..56cc9e8df00 100644--- a/crates/gpui_linux/src/linux/headless/client.rs+++ b/crates/gpui_linux/src/linux/headless/client.rs@@ -64,6 +64,7 @@ impl LinuxClient for HeadlessClient {None}+ #[cfg(feature = "screen-capture")]fn screen_capture_sources(&self,) -> futures::channel::oneshot::Receiver<anyhow::Result<Vec<Rc<dyn gpui::ScreenCaptureSource>>>>diff --git a/script/bundle-linux b/script/bundle-linuxindex 4e58ac315bd..c89d21082dd 100755--- a/script/bundle-linux+++ b/script/bundle-linux@@ -71,7 +71,7 @@ if "$rustup_installed"; thenrustup target add "$remote_server_triple"fi-export CC=$(which clang)+export CC=${CC:-$(which clang)}# Build binary in release modeexport RUSTFLAGS="${RUSTFLAGS:-} -C link-args=-Wl,--disable-new-dtags,-rpath,\$ORIGIN/../lib"diff --git a/script/linux b/script/linuxindex 3f098ec21e3..c20f154eaf2 100755--- a/script/linux+++ b/script/linux@@ -57,11 +57,21 @@ if [[ -n $apt ]]; thenelif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+12|Linux Mint 21|.+22\.04)' /etc/os-release); thendeps+=( mold libstdc++-12-dev )elif (grep -qP 'PRETTY_NAME="((Debian|Raspbian).+11|Linux Mint 20|.+20\.04)' /etc/os-release); then- deps+=( libstdc++-10-dev )+ # Ubuntu 20.04 ships clang-10 and libstdc++-10 which lack adequate C++20+ # support for building webrtc-sys (requires -std=c++20, lambdas in+ # unevaluated contexts from clang 17+, and working std::ranges in the+ # stdlib). clang-18 is available in focal-security/universe as an official+ # backport, and libstdc++-11-dev from the ubuntu-toolchain-r PPA provides+ # headers with working pointer_traits/contiguous_range.+ # Note: the prebuilt libwebrtc.a is compiled with libstdc++, so we must+ # use libstdc++ (not libc++) to avoid ABI mismatches at link time.+ $maysudo add-apt-repository -y ppa:ubuntu-toolchain-r/test+ deps+=( clang-18 libstdc++-11-dev )fi$maysudo "$apt" update$maysudo "$apt" install -y "${deps[@]}"+finalizeexit 0fidiff --git a/tooling/xtask/src/tasks/workflows/run_bundling.rs b/tooling/xtask/src/tasks/workflows/run_bundling.rsindex 2de7000360b..6b9d3b9e36c 100644--- a/tooling/xtask/src/tasks/workflows/run_bundling.rs+++ b/tooling/xtask/src/tasks/workflows/run_bundling.rs@@ -4,9 +4,7 @@ use crate::tasks::workflows::{nix_build::build_nix,release::ReleaseBundleJobs,runners::{Arch, Platform, ReleaseChannel},- steps::{- DEFAULT_REPOSITORY_OWNER_GUARD, FluentBuilder, NamedJob, dependant_job, named, use_clang,- },+ steps::{DEFAULT_REPOSITORY_OWNER_GUARD, FluentBuilder, NamedJob, dependant_job, named},vars::{assets, bundle_envs},};@@ -145,22 +143,22 @@ pub(crate) fn bundle_linux(};NamedJob {name: format!("bundle_linux_{arch}"),- 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}"- ))),+ job: bundle_job(deps)+ .runs_on(arch.linux_bundler())+ .envs(bundle_envs(platform))+ .add_env(Env::new("CC", "clang-18"))+ .add_env(Env::new("CXX", "clang++-18"))+ .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}"+ ))),}}