Skip to content

Commit 0567336

Browse files
committed
Merge branch 'main' into fallible-settings
2 parents 0dfcca0 + b3ebcef commit 0567336

File tree

338 files changed

+12629
-6515
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+12629
-6515
lines changed

.github/workflows/after_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- published
88
jobs:
99
rebuild_releases_page:
10-
if: github.repository_owner == 'zed-industries'
10+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
1111
runs-on: namespace-profile-2x4-ubuntu-2404
1212
steps:
1313
- name: after_release::rebuild_releases_page::refresh_cloud_releases
@@ -21,7 +21,7 @@ jobs:
2121
post_to_discord:
2222
needs:
2323
- rebuild_releases_page
24-
if: github.repository_owner == 'zed-industries'
24+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
2525
runs-on: namespace-profile-2x4-ubuntu-2404
2626
steps:
2727
- id: get-release-url
@@ -71,7 +71,7 @@ jobs:
7171
max-versions-to-keep: 5
7272
token: ${{ secrets.WINGET_TOKEN }}
7373
create_sentry_release:
74-
if: github.repository_owner == 'zed-industries'
74+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
7575
runs-on: namespace-profile-2x4-ubuntu-2404
7676
steps:
7777
- name: steps::checkout_repo

.github/workflows/community_close_stale_issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Close Stale Issues"
22
on:
33
schedule:
4-
- cron: "0 7,9,11 * * 3"
4+
- cron: "0 8 31 DEC *"
55
workflow_dispatch:
66

77
jobs:
@@ -26,3 +26,4 @@ jobs:
2626
ascending: true
2727
enable-statistics: true
2828
stale-issue-label: "stale"
29+
exempt-issue-labels: "never stale"

.github/workflows/danger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- main
1313
jobs:
1414
danger:
15-
if: github.repository_owner == 'zed-industries'
15+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
1616
runs-on: namespace-profile-2x4-ubuntu-2404
1717
steps:
1818
- name: steps::checkout_repo
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# Generated from xtask::workflows::extension_tests
2+
# Rebuild with `cargo xtask workflows`.
3+
name: extension_tests
4+
env:
5+
CARGO_TERM_COLOR: always
6+
RUST_BACKTRACE: '1'
7+
CARGO_INCREMENTAL: '0'
8+
ZED_EXTENSION_CLI_SHA: 7cfce605704d41ca247e3f84804bf323f6c6caaf
9+
on:
10+
workflow_call:
11+
inputs:
12+
run_tests:
13+
description: Whether the workflow should run rust tests
14+
required: true
15+
type: boolean
16+
jobs:
17+
orchestrate:
18+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
19+
runs-on: namespace-profile-2x4-ubuntu-2404
20+
steps:
21+
- name: steps::checkout_repo
22+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
23+
with:
24+
clean: false
25+
fetch-depth: ${{ github.ref == 'refs/heads/main' && 2 || 350 }}
26+
- id: filter
27+
name: filter
28+
run: |
29+
if [ -z "$GITHUB_BASE_REF" ]; then
30+
echo "Not in a PR context (i.e., push to main/stable/preview)"
31+
COMPARE_REV="$(git rev-parse HEAD~1)"
32+
else
33+
echo "In a PR context comparing to pull_request.base.ref"
34+
git fetch origin "$GITHUB_BASE_REF" --depth=350
35+
COMPARE_REV="$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD)"
36+
fi
37+
CHANGED_FILES="$(git diff --name-only "$COMPARE_REV" ${{ github.sha }})"
38+
39+
check_pattern() {
40+
local output_name="$1"
41+
local pattern="$2"
42+
local grep_arg="$3"
43+
44+
echo "$CHANGED_FILES" | grep "$grep_arg" "$pattern" && \
45+
echo "${output_name}=true" >> "$GITHUB_OUTPUT" || \
46+
echo "${output_name}=false" >> "$GITHUB_OUTPUT"
47+
}
48+
49+
check_pattern "check_rust" '^(Cargo.lock|Cargo.toml|.*\.rs)$' -qP
50+
check_pattern "check_extension" '^.*\.scm$' -qP
51+
shell: bash -euxo pipefail {0}
52+
outputs:
53+
check_rust: ${{ steps.filter.outputs.check_rust }}
54+
check_extension: ${{ steps.filter.outputs.check_extension }}
55+
check_rust:
56+
needs:
57+
- orchestrate
58+
if: needs.orchestrate.outputs.check_rust == 'true'
59+
runs-on: namespace-profile-16x32-ubuntu-2204
60+
steps:
61+
- name: steps::checkout_repo
62+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
63+
with:
64+
clean: false
65+
- name: steps::cache_rust_dependencies_namespace
66+
uses: namespacelabs/nscloud-cache-action@v1
67+
with:
68+
cache: rust
69+
- name: steps::cargo_fmt
70+
run: cargo fmt --all -- --check
71+
shell: bash -euxo pipefail {0}
72+
- name: extension_tests::run_clippy
73+
run: cargo clippy --release --all-targets --all-features -- --deny warnings
74+
shell: bash -euxo pipefail {0}
75+
- name: steps::cargo_install_nextest
76+
if: inputs.run_tests
77+
uses: taiki-e/install-action@nextest
78+
- name: steps::cargo_nextest
79+
if: inputs.run_tests
80+
run: cargo nextest run --workspace --no-fail-fast --failure-output immediate-final
81+
shell: bash -euxo pipefail {0}
82+
timeout-minutes: 3
83+
check_extension:
84+
needs:
85+
- orchestrate
86+
if: needs.orchestrate.outputs.check_extension == 'true'
87+
runs-on: namespace-profile-2x4-ubuntu-2404
88+
steps:
89+
- name: steps::checkout_repo
90+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
91+
with:
92+
clean: false
93+
- id: cache-zed-extension-cli
94+
name: extension_tests::cache_zed_extension_cli
95+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
96+
with:
97+
path: zed-extension
98+
key: zed-extension-${{ env.ZED_EXTENSION_CLI_SHA }}
99+
- name: extension_tests::download_zed_extension_cli
100+
if: steps.cache-zed-extension-cli.outputs.cache-hit != 'true'
101+
run: |
102+
wget --quiet "https://zed-extension-cli.nyc3.digitaloceanspaces.com/$ZED_EXTENSION_CLI_SHA/x86_64-unknown-linux-gnu/zed-extension"
103+
chmod +x zed-extension
104+
shell: bash -euxo pipefail {0}
105+
- name: extension_tests::check
106+
run: |
107+
mkdir -p /tmp/ext-scratch
108+
mkdir -p /tmp/ext-output
109+
./zed-extension --source-dir . --scratch-dir /tmp/ext-scratch --output-dir /tmp/ext-output
110+
shell: bash -euxo pipefail {0}
111+
timeout-minutes: 1
112+
tests_pass:
113+
needs:
114+
- orchestrate
115+
- check_rust
116+
- check_extension
117+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && always()
118+
runs-on: namespace-profile-2x4-ubuntu-2404
119+
steps:
120+
- name: run_tests::tests_pass
121+
run: |
122+
set +x
123+
EXIT_CODE=0
124+
125+
check_result() {
126+
echo "* $1: $2"
127+
if [[ "$2" != "skipped" && "$2" != "success" ]]; then EXIT_CODE=1; fi
128+
}
129+
130+
check_result "orchestrate" "${{ needs.orchestrate.result }}"
131+
check_result "check_rust" "${{ needs.check_rust.result }}"
132+
check_result "check_extension" "${{ needs.check_extension.result }}"
133+
134+
exit $EXIT_CODE
135+
shell: bash -euxo pipefail {0}
136+
concurrency:
137+
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.ref_name == 'main' && github.sha || 'anysha' }}
138+
cancel-in-progress: true

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- v*
1111
jobs:
1212
run_tests_mac:
13-
if: github.repository_owner == 'zed-industries'
13+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
1414
runs-on: self-mini-macos
1515
steps:
1616
- name: steps::checkout_repo
@@ -42,7 +42,7 @@ jobs:
4242
shell: bash -euxo pipefail {0}
4343
timeout-minutes: 60
4444
run_tests_linux:
45-
if: github.repository_owner == 'zed-industries'
45+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
4646
runs-on: namespace-profile-16x32-ubuntu-2204
4747
steps:
4848
- name: steps::checkout_repo
@@ -89,7 +89,7 @@ jobs:
8989
shell: bash -euxo pipefail {0}
9090
timeout-minutes: 60
9191
run_tests_windows:
92-
if: github.repository_owner == 'zed-industries'
92+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
9393
runs-on: self-32vcpu-windows-2022
9494
steps:
9595
- name: steps::checkout_repo
@@ -121,7 +121,7 @@ jobs:
121121
shell: pwsh
122122
timeout-minutes: 60
123123
check_scripts:
124-
if: github.repository_owner == 'zed-industries'
124+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
125125
runs-on: namespace-profile-2x4-ubuntu-2404
126126
steps:
127127
- name: steps::checkout_repo
@@ -150,7 +150,7 @@ jobs:
150150
shell: bash -euxo pipefail {0}
151151
timeout-minutes: 60
152152
create_draft_release:
153-
if: github.repository_owner == 'zed-industries'
153+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
154154
runs-on: namespace-profile-2x4-ubuntu-2404
155155
steps:
156156
- name: steps::checkout_repo

.github/workflows/release_nightly.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
- cron: 0 7 * * *
1313
jobs:
1414
check_style:
15-
if: github.repository_owner == 'zed-industries'
15+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
1616
runs-on: self-mini-macos
1717
steps:
1818
- name: steps::checkout_repo
@@ -28,7 +28,7 @@ jobs:
2828
shell: bash -euxo pipefail {0}
2929
timeout-minutes: 60
3030
run_tests_windows:
31-
if: github.repository_owner == 'zed-industries'
31+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
3232
runs-on: self-32vcpu-windows-2022
3333
steps:
3434
- name: steps::checkout_repo
@@ -361,7 +361,7 @@ jobs:
361361
needs:
362362
- check_style
363363
- run_tests_windows
364-
if: github.repository_owner == 'zed-industries'
364+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
365365
runs-on: namespace-profile-32x64-ubuntu-2004
366366
env:
367367
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
@@ -392,7 +392,7 @@ jobs:
392392
needs:
393393
- check_style
394394
- run_tests_windows
395-
if: github.repository_owner == 'zed-industries'
395+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
396396
runs-on: self-mini-macos
397397
env:
398398
ZED_CLIENT_CHECKSUM_SEED: ${{ secrets.ZED_CLIENT_CHECKSUM_SEED }}
@@ -434,7 +434,7 @@ jobs:
434434
- bundle_mac_x86_64
435435
- bundle_windows_aarch64
436436
- bundle_windows_x86_64
437-
if: github.repository_owner == 'zed-industries'
437+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
438438
runs-on: namespace-profile-4x8-ubuntu-2204
439439
steps:
440440
- name: steps::checkout_repo

.github/workflows/run_tests.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515
- v[0-9]+.[0-9]+.x
1616
jobs:
1717
orchestrate:
18-
if: github.repository_owner == 'zed-industries'
18+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
1919
runs-on: namespace-profile-2x4-ubuntu-2404
2020
steps:
2121
- name: steps::checkout_repo
@@ -47,7 +47,7 @@ jobs:
4747
}
4848
4949
check_pattern "run_action_checks" '^\.github/(workflows/|actions/|actionlint.yml)|tooling/xtask|script/' -qP
50-
check_pattern "run_docs" '^docs/' -qP
50+
check_pattern "run_docs" '^(docs/|crates/.*\.rs)' -qP
5151
check_pattern "run_licenses" '^(Cargo.lock|script/.*licenses)' -qP
5252
check_pattern "run_nix" '^(nix/|flake\.|Cargo\.|rust-toolchain.toml|\.cargo/config.toml)' -qP
5353
check_pattern "run_tests" '^(docs/|script/update_top_ranking_issues/|\.github/(ISSUE_TEMPLATE|workflows/(?!run_tests)))' -qvP
@@ -59,7 +59,7 @@ jobs:
5959
run_nix: ${{ steps.filter.outputs.run_nix }}
6060
run_tests: ${{ steps.filter.outputs.run_tests }}
6161
check_style:
62-
if: github.repository_owner == 'zed-industries'
62+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions')
6363
runs-on: namespace-profile-4x8-ubuntu-2204
6464
steps:
6565
- name: steps::checkout_repo
@@ -493,7 +493,10 @@ jobs:
493493
needs:
494494
- orchestrate
495495
if: needs.orchestrate.outputs.run_tests == 'true'
496-
runs-on: self-mini-macos
496+
runs-on: namespace-profile-16x32-ubuntu-2204
497+
env:
498+
GIT_AUTHOR_NAME: Protobuf Action
499+
GIT_AUTHOR_EMAIL: ci@zed.dev
497500
steps:
498501
- name: steps::checkout_repo
499502
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -538,7 +541,7 @@ jobs:
538541
- check_scripts
539542
- build_nix_linux_x86_64
540543
- build_nix_mac_aarch64
541-
if: github.repository_owner == 'zed-industries' && always()
544+
if: (github.repository_owner == 'zed-industries' || github.repository_owner == 'zed-extensions') && always()
542545
runs-on: namespace-profile-2x4-ubuntu-2404
543546
steps:
544547
- name: run_tests::tests_pass

0 commit comments

Comments
 (0)