From 831f7dbbc0fac338b7e10a8662b2922892860e1f Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 14 Jun 2024 16:15:13 -0600 Subject: [PATCH] Fix collab deploy (#13076) Release Notes: - N/A --- .cargo/ci-config.toml | 15 --------------- .cargo/collab-config.toml | 5 +++++ .github/workflows/ci.yml | 3 --- .github/workflows/deploy_collab.yml | 3 +++ 4 files changed, 8 insertions(+), 18 deletions(-) delete mode 100644 .cargo/ci-config.toml create mode 100644 .cargo/collab-config.toml diff --git a/.cargo/ci-config.toml b/.cargo/ci-config.toml deleted file mode 100644 index 664419837b..0000000000 --- a/.cargo/ci-config.toml +++ /dev/null @@ -1,15 +0,0 @@ -# This config is different from config.toml in this directory, as the latter is recognized by Cargo. -# This file is placed in $HOME/.cargo/config.toml on CI runs. Cargo then merges Zeds .cargo/config.toml with $HOME/.cargo/config.toml -# with preference for settings from Zeds config.toml. -# TL;DR: If a value is set in both ci-config.toml and config.toml, config.toml value takes precedence. -# Arrays are merged together though. See: https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure -# The intent for this file is to configure CI build process with a divergance from Zed developers experience; for example, in this config file -# we use `-D warnings` for rustflags (which makes compilation fail in presence of warnings during build process). Placing that in developers `config.toml` -# would be incovenient. -# We *could* override things like RUSTFLAGS manually by setting them as environment variables, but that is less DRY; worse yet, if you forget to set proper environment variables -# in one spot, that's going to trigger a rebuild of all of the artifacts. Using ci-config.toml we can define these overrides for CI in one spot and not worry about it. -[build] -rustflags = ["-D", "warnings"] - -[alias] -xtask = "run --package xtask --" diff --git a/.cargo/collab-config.toml b/.cargo/collab-config.toml new file mode 100644 index 0000000000..74603802d8 --- /dev/null +++ b/.cargo/collab-config.toml @@ -0,0 +1,5 @@ +# This file is used to build collab in a Docker image. +# In particular, we don't use clang. +[build] +# v0 mangling scheme provides more detailed backtraces around closures +rustflags = ["-C", "symbol-mangling-version=v0", "--cfg", "tokio_unstable"] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38ecd4228c..0c21c1b7df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,9 +38,6 @@ jobs: - name: Remove untracked files run: git clean -df - - name: Set up default .cargo/config.toml - run: cp ./.cargo/ci-config.toml ~/.cargo/config.toml - - name: Check spelling run: | if ! which typos > /dev/null; then diff --git a/.github/workflows/deploy_collab.yml b/.github/workflows/deploy_collab.yml index e6f741bcb1..27c6a9bac3 100644 --- a/.github/workflows/deploy_collab.yml +++ b/.github/workflows/deploy_collab.yml @@ -75,6 +75,9 @@ jobs: with: clean: false + - name: Set up default .cargo/config.toml + run: cp ./.cargo/collab-config.toml ~/.cargo/config.toml + - name: Build docker image run: docker build . --build-arg GITHUB_SHA=$GITHUB_SHA --tag registry.digitalocean.com/zed/collab:$GITHUB_SHA