# CI: use global config toml \(\#3384\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/ce3acf17cfa76d233d1d78539dcf433913e931fa)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: ce3acf17cfa76d233d1d78539dcf433913e931fa

Requested commit: ce3acf17cfa76d233d1d78539dcf433913e931fa

Commit: ce3acf17cfa76d233d1d78539dcf433913e931fa

Tree: 25256539b5e33d01eff45f9fabee8eb478c6724b

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
CI: use global config toml (#3384)

It looks like we should keep RUSTFLAGS consistent in CI if possible;
some commands augmented RUSTFLAGS with "-D warnings" which overrode
`.cargo/config.toml`, causing unnecessary rebuilds even for non-bundling
runs. Tl;dr: for the last few days our average CI time spiked
significantly.
There are several solutions:
- We can place `-D warnings` in our `.cargo/config.toml`. That's not a
good solution, because then you wouldn't ever be able to build Zed with
warnings locally. A true PITA!
- We can place another config.toml somewhere in the search path
(https://doc.rust-lang.org/cargo/reference/config.html#hierarchical-structure)
and rely on the merging of properties. That way we can avoid having `-D
warnings` on developer machines while being able to override CI
behaviour at will.

This PR implements the latter approach by creating the new config file
manually. Ideally we should have it a a separate file in repository
that's moved into $HOME/.cargo on each CI run. Maybe we should even
place it somewhere more local to the checked out Zed version, as placing
it in a global spot is kinda bad too - what if we start building
multiple cargo projects on our CI machines?

Release Notes:

- N/A
```

## Parents

- [c199d92daca3eb5a46ced2dc8fd125de771f881c](https://git.cafe/gitcafe/zed/commit/c199d92daca3eb5a46ced2dc8fd125de771f881c?format=markdown)

- [492c3a1e83118af28b6a9d534efadeeb1525186d](https://git.cafe/gitcafe/zed/commit/492c3a1e83118af28b6a9d534efadeeb1525186d?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/ce3acf17cfa76d233d1d78539dcf433913e931fa?format=markdown)
