@@ -12,6 +12,9 @@ jobs:
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
name: Check formatting and Clippy lints
runs-on: namespace-profile-16x32-ubuntu-2204
+ env:
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -42,6 +45,9 @@ jobs:
- style
name: Run tests
runs-on: namespace-profile-16x32-ubuntu-2204
+ env:
+ CC: clang
+ CXX: clang++
steps:
- name: steps::checkout_repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -14,8 +14,12 @@ ARG GITHUB_SHA
ENV GITHUB_SHA=$GITHUB_SHA
# Also add `cmake`, since we need it to build `wasmtime`.
+# clang is needed because `webrtc-sys` uses Clang-specific compiler flags.
RUN apt-get update; \
- apt-get install -y --no-install-recommends cmake
+ apt-get install -y --no-install-recommends cmake clang
+
+ENV CC=clang
+ENV CXX=clang++
RUN --mount=type=cache,target=./script/node_modules \
--mount=type=cache,target=/usr/local/cargo/registry \
@@ -3,7 +3,7 @@ use indoc::indoc;
use crate::tasks::workflows::runners::{self, Platform};
use crate::tasks::workflows::steps::{
- self, CommonJobConditions, FluentBuilder as _, NamedJob, dependant_job, named,
+ self, CommonJobConditions, FluentBuilder as _, NamedJob, dependant_job, named, use_clang,
};
use crate::tasks::workflows::vars;
@@ -23,7 +23,7 @@ pub(crate) fn deploy_collab() -> Workflow {
}
fn style() -> NamedJob {
- named::job(
+ named::job(use_clang(
dependant_job(&[])
.name("Check formatting and Clippy lints")
.with_repository_owner_guard()
@@ -34,7 +34,7 @@ fn style() -> NamedJob {
.map(steps::install_linux_dependencies)
.add_step(steps::cargo_fmt())
.add_step(steps::clippy(Platform::Linux)),
- )
+ ))
}
fn tests(deps: &[&NamedJob]) -> NamedJob {
@@ -42,7 +42,7 @@ fn tests(deps: &[&NamedJob]) -> NamedJob {
named::bash("cargo nextest run --package collab --no-fail-fast")
}
- named::job(
+ named::job(use_clang(
dependant_job(deps)
.name("Run tests")
.runs_on(runners::LINUX_XL)
@@ -65,7 +65,7 @@ fn tests(deps: &[&NamedJob]) -> NamedJob {
.add_step(steps::cargo_install_nextest())
.add_step(steps::clear_target_dir_if_large(Platform::Linux))
.add_step(run_collab_tests()),
- )
+ ))
}
fn publish(deps: &[&NamedJob]) -> NamedJob {