Skip to content

Commit 4adff4a

Browse files
Use gh workflow for tests (#41384)
Follow up for: #41304 Splits CI tests (cherry-picks and PRs only for now) into separate workflows using `gh-workflow`. Includes a couple restructures to - run more things in parallel - remove our previous shell script based checking to filter tests based on files changed, instead using the builtin `paths:` workflow filters Splitting the docs/style/rust tests & checks into separate workflows means we lose the complete summary showing all the tests in one view, but it's possible to re-add in the future if we go back to checking what files changed ourselves or always run everything. Release Notes: - N/A *or* Added/Fixed/Improved ... --------- Co-authored-by: Conrad <[email protected]>
1 parent 7de3c67 commit 4adff4a

25 files changed

+1124
-125
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- "v[0-9]+.[0-9]+.x"
85
tags:
96
- "v*"
107

11-
pull_request:
12-
branches:
13-
- "**"
14-
158
concurrency:
169
# Allow only one workflow per any non-`main` branch.
1710
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
@@ -273,15 +266,12 @@ jobs:
273266
uses: ./.github/actions/run_tests
274267

275268
- name: Build collab
269+
# we should do this on a linux x86 machinge
276270
run: cargo build -p collab
277271

278272
- name: Build other binaries and features
279273
run: |
280-
cargo build --workspace --bins --all-features
281-
cargo check -p gpui --features "macos-blade"
282-
cargo check -p workspace
283-
cargo build -p remote_server
284-
cargo check -p gpui --examples
274+
cargo build --workspace --bins --examples
285275
286276
# Since the macOS runners are stateful, so we need to remove the config file to prevent potential bug.
287277
- name: Clean CI config file
@@ -731,10 +721,6 @@ jobs:
731721
(contains(github.event.pull_request.labels.*.name, 'run-nix') ||
732722
needs.job_spec.outputs.run_nix == 'true')
733723
secrets: inherit
734-
with:
735-
flake-output: debug
736-
# excludes the final package to only cache dependencies
737-
cachix-filter: "-zed-editor-[0-9.]*-nightly"
738724

739725
bundle-windows-x64:
740726
timeout-minutes: 120

.github/workflows/nix_build.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,31 @@
11
# Generated from xtask::workflows::nix_build
22
# Rebuild with `cargo xtask workflows`.
33
name: nix_build
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
48
on:
5-
workflow_call:
6-
inputs:
7-
flake-output:
8-
type: string
9-
default: default
10-
cachix-filter:
11-
type: string
9+
pull_request:
10+
branches:
11+
- '**'
12+
paths:
13+
- nix/**
14+
- flake.*
15+
- Cargo.*
16+
- rust-toolchain.toml
17+
- .cargo/config.toml
18+
push:
19+
branches:
20+
- main
21+
- v[0-9]+.[0-9]+.x
22+
paths:
23+
- nix/**
24+
- flake.*
25+
- Cargo.*
26+
- rust-toolchain.toml
27+
- .cargo/config.toml
28+
workflow_call: {}
1229
jobs:
1330
build_nix_linux_x86_64:
1431
if: github.repository_owner == 'zed-industries'
@@ -33,9 +50,9 @@ jobs:
3350
name: zed
3451
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
3552
cachixArgs: -v
36-
pushFilter: ${{ inputs.cachix-filter }}
53+
pushFilter: -zed-editor-[0-9.]*-nightly
3754
- name: nix_build::build
38-
run: nix build .#${{ inputs.flake-output }} -L --accept-flake-config
55+
run: nix build .#debug -L --accept-flake-config
3956
shell: bash -euxo pipefail {0}
4057
timeout-minutes: 60
4158
continue-on-error: true
@@ -63,9 +80,9 @@ jobs:
6380
name: zed
6481
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
6582
cachixArgs: -v
66-
pushFilter: ${{ inputs.cachix-filter }}
83+
pushFilter: -zed-editor-[0-9.]*-nightly
6784
- name: nix_build::build
68-
run: nix build .#${{ inputs.flake-output }} -L --accept-flake-config
85+
run: nix build .#debug -L --accept-flake-config
6986
shell: bash -euxo pipefail {0}
7087
- name: nix_build::limit_store
7188
run: |-
@@ -75,3 +92,6 @@ jobs:
7592
shell: bash -euxo pipefail {0}
7693
timeout-minutes: 60
7794
continue-on-error: true
95+
concurrency:
96+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
97+
cancel-in-progress: true

.github/workflows/release_nightly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ jobs:
4949
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
5050
with:
5151
node-version: '20'
52+
- name: steps::clippy
53+
run: ./script/clippy
54+
shell: bash -euxo pipefail {0}
5255
- name: steps::cargo_install_nextest
5356
run: cargo install cargo-nextest --locked
5457
shell: bash -euxo pipefail {0}
@@ -81,6 +84,9 @@ jobs:
8184
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
8285
with:
8386
node-version: '20'
87+
- name: steps::clippy
88+
run: ./script/clippy.ps1
89+
shell: pwsh
8490
- name: steps::cargo_install_nextest
8591
run: cargo install cargo-nextest --locked
8692
shell: pwsh
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Generated from xtask::workflows::run_action_checks
2+
# Rebuild with `cargo xtask workflows`.
3+
name: run_action_checks
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
8+
on:
9+
pull_request:
10+
branches:
11+
- '**'
12+
paths:
13+
- .github/workflows/**
14+
- .github/actions/**
15+
- .github/actionlint.yml
16+
- script/**
17+
push:
18+
branches:
19+
- main
20+
- v[0-9]+.[0-9]+.x
21+
paths:
22+
- .github/workflows/**
23+
- .github/actions/**
24+
- .github/actionlint.yml
25+
- script/**
26+
jobs:
27+
actionlint:
28+
if: github.repository_owner == 'zed-industries'
29+
runs-on: namespace-profile-2x4-ubuntu-2404
30+
steps:
31+
- name: steps::checkout_repo
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
33+
with:
34+
clean: false
35+
- id: get_actionlint
36+
name: run_action_checks::download_actionlint
37+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
38+
shell: bash -euxo pipefail {0}
39+
- name: run_action_checks::run_actionlint
40+
run: |
41+
${{ steps.get_actionlint.outputs.executable }} -color
42+
shell: bash -euxo pipefail {0}
43+
timeout-minutes: 60
44+
shellcheck:
45+
if: github.repository_owner == 'zed-industries'
46+
runs-on: namespace-profile-2x4-ubuntu-2404
47+
steps:
48+
- name: steps::checkout_repo
49+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
50+
with:
51+
clean: false
52+
- name: run_action_checks::run_shellcheck
53+
run: ./script/shellcheck-scripts error
54+
shell: bash -euxo pipefail {0}
55+
timeout-minutes: 60
56+
concurrency:
57+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
58+
cancel-in-progress: true

.github/workflows/run_bundling.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ jobs:
109109
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
110110
with:
111111
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
112-
- name: ./script/linux
112+
- name: steps::setup_linux
113113
run: ./script/linux
114114
shell: bash -euxo pipefail {0}
115-
- name: ./script/install-mold
115+
- name: steps::install_mold
116116
run: ./script/install-mold
117117
shell: bash -euxo pipefail {0}
118118
- name: ./script/bundle-linux
@@ -143,9 +143,12 @@ jobs:
143143
uses: matbour/setup-sentry-cli@3e938c54b3018bdd019973689ef984e033b0454b
144144
with:
145145
token: ${{ secrets.SENTRY_AUTH_TOKEN }}
146-
- name: ./script/linux
146+
- name: steps::setup_linux
147147
run: ./script/linux
148148
shell: bash -euxo pipefail {0}
149+
- name: steps::install_mold
150+
run: ./script/install-mold
151+
shell: bash -euxo pipefail {0}
149152
- name: ./script/bundle-linux
150153
run: ./script/bundle-linux
151154
shell: bash -euxo pipefail {0}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Generated from xtask::workflows::run_docs_checks
2+
# Rebuild with `cargo xtask workflows`.
3+
name: run_docs_checks
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
8+
on:
9+
pull_request:
10+
branches:
11+
- '**'
12+
paths:
13+
- docs/**
14+
- crates/docs_preprocessor/**
15+
push:
16+
branches:
17+
- main
18+
- v[0-9]+.[0-9]+.x
19+
paths:
20+
- docs/**
21+
- crates/docs_preprocessor/**
22+
jobs:
23+
check_docs:
24+
if: github.repository_owner == 'zed-industries'
25+
runs-on: namespace-profile-8x16-ubuntu-2204
26+
steps:
27+
- name: steps::checkout_repo
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
29+
with:
30+
clean: false
31+
- name: steps::setup_cargo_config
32+
run: |
33+
mkdir -p ./../.cargo
34+
cp ./.cargo/ci-config.toml ./../.cargo/config.toml
35+
shell: bash -euxo pipefail {0}
36+
- name: steps::cache_rust_dependencies
37+
uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6
38+
with:
39+
save-if: ${{ github.ref == 'refs/heads/main' }}
40+
- name: run_docs_checks::lychee_link_check
41+
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
42+
with:
43+
args: --no-progress --exclude '^http' './docs/src/**/*'
44+
fail: true
45+
- name: steps::setup_linux
46+
run: ./script/linux
47+
shell: bash -euxo pipefail {0}
48+
- name: steps::install_mold
49+
run: ./script/install-mold
50+
shell: bash -euxo pipefail {0}
51+
- name: run_docs_checks::install_mdbook
52+
uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
53+
with:
54+
mdbook-version: 0.4.37
55+
- name: run_docs_checks::build_docs
56+
run: |
57+
mkdir -p target/deploy
58+
mdbook build ./docs --dest-dir=../target/deploy/docs/
59+
shell: bash -euxo pipefail {0}
60+
- name: run_docs_checks::lychee_link_check
61+
uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
62+
with:
63+
args: --no-progress --exclude '^http' 'target/deploy/docs'
64+
fail: true
65+
timeout-minutes: 60
66+
concurrency:
67+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
68+
cancel-in-progress: true
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Generated from xtask::workflows::run_license_checks
2+
# Rebuild with `cargo xtask workflows`.
3+
name: run_license_checks
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
8+
on:
9+
pull_request:
10+
branches:
11+
- '**'
12+
paths:
13+
- Cargo.lock
14+
- '**/Cargo.lock'
15+
- script/*licenses
16+
- '**/LICENSE*'
17+
- .github/workflows/run_license_checks.yml
18+
push:
19+
branches:
20+
- main
21+
- v[0-9]+.[0-9]+.x
22+
paths:
23+
- Cargo.lock
24+
- '**/Cargo.lock'
25+
- script/*licenses
26+
- '**/LICENSE*'
27+
- .github/workflows/run_license_checks.yml
28+
jobs:
29+
check_licenses:
30+
runs-on: namespace-profile-2x4-ubuntu-2404
31+
steps:
32+
- name: steps::checkout_repo
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+
with:
35+
clean: false
36+
- name: ./script/check-licenses
37+
run: ./script/check-licenses
38+
shell: bash -euxo pipefail {0}
39+
build_licenses:
40+
runs-on: namespace-profile-4x8-ubuntu-2204
41+
steps:
42+
- name: steps::checkout_repo
43+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
44+
with:
45+
clean: false
46+
- name: ./script/generate-licenses
47+
run: ./script/generate-licenses
48+
shell: bash -euxo pipefail {0}
49+
concurrency:
50+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
51+
cancel-in-progress: true
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Generated from xtask::workflows::run_style_checks
2+
# Rebuild with `cargo xtask workflows`.
3+
name: run_style_checks
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
8+
on:
9+
pull_request:
10+
branches:
11+
- '**'
12+
push:
13+
branches:
14+
- main
15+
- v[0-9]+.[0-9]+.x
16+
jobs:
17+
check_style:
18+
if: github.repository_owner == 'zed-industries'
19+
runs-on: namespace-profile-4x8-ubuntu-2204
20+
steps:
21+
- name: steps::checkout_repo
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
23+
with:
24+
clean: false
25+
- name: steps::setup_pnpm
26+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
27+
with:
28+
version: '9'
29+
- name: ./script/prettier
30+
run: ./script/prettier
31+
shell: bash -euxo pipefail {0}
32+
- name: ./script/check-todos
33+
run: ./script/check-todos
34+
shell: bash -euxo pipefail {0}
35+
- name: ./script/check-keymaps
36+
run: ./script/check-keymaps
37+
shell: bash -euxo pipefail {0}
38+
- name: run_style_checks::check_for_typos
39+
uses: crate-ci/typos@80c8a4945eec0f6d464eaf9e65ed98ef085283d1
40+
with:
41+
config: ./typos.toml
42+
- name: steps::cargo_fmt
43+
run: cargo fmt --all -- --check
44+
shell: bash -euxo pipefail {0}
45+
timeout-minutes: 60
46+
concurrency:
47+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
48+
cancel-in-progress: true

0 commit comments

Comments
 (0)