mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 16:04:57 +03:00
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
This commit is contained in:
commit
ce3acf17cf
6
.github/actions/run_tests/action.yml
vendored
6
.github/actions/run_tests/action.yml
vendored
@ -19,16 +19,12 @@ runs:
|
|||||||
|
|
||||||
- name: Limit target directory size
|
- name: Limit target directory size
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: script/clear-target-dir-if-larger-than 70
|
run: script/clear-target-dir-if-larger-than 100
|
||||||
|
|
||||||
- name: Run check
|
- name: Run check
|
||||||
env:
|
|
||||||
RUSTFLAGS: -D warnings
|
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: cargo check --tests --workspace
|
run: cargo check --tests --workspace
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
|
||||||
RUSTFLAGS: -D warnings
|
|
||||||
shell: bash -euxo pipefail {0}
|
shell: bash -euxo pipefail {0}
|
||||||
run: cargo nextest run --workspace --no-fail-fast
|
run: cargo nextest run --workspace --no-fail-fast
|
||||||
|
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -23,6 +23,9 @@ jobs:
|
|||||||
- self-hosted
|
- self-hosted
|
||||||
- test
|
- test
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up default .cargo/config.toml
|
||||||
|
run: printf "[build]\nrustflags = [\"-D\", \"warnings\"]" > $HOME/.cargo/config.toml
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -87,7 +90,7 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: Limit target directory size
|
- name: Limit target directory size
|
||||||
run: script/clear-target-dir-if-larger-than 70
|
run: script/clear-target-dir-if-larger-than 100
|
||||||
|
|
||||||
- name: Determine version and release channel
|
- name: Determine version and release channel
|
||||||
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
2
.github/workflows/release_nightly.yml
vendored
2
.github/workflows/release_nightly.yml
vendored
@ -79,7 +79,7 @@ jobs:
|
|||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
|
|
||||||
- name: Limit target directory size
|
- name: Limit target directory size
|
||||||
run: script/clear-target-dir-if-larger-than 70
|
run: script/clear-target-dir-if-larger-than 100
|
||||||
|
|
||||||
- name: Set release channel to nightly
|
- name: Set release channel to nightly
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user