Skip to content

Commit 5692501

Browse files
committed
ci: remove cd xtask from xtask not being in the root workspace
1 parent 06ec042 commit 5692501

File tree

1 file changed

+21
-20
lines changed

1 file changed

+21
-20
lines changed

.github/workflows/ci.yaml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,19 @@ jobs:
4949
# figure out native target triple while we're at it
5050
- name: install rust-toolchain
5151
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
52-
- name: xtask cargo fetch --locked
53-
run: cd xtask && cargo fetch --locked --target $TARGET
52+
- name: cargo fetch --locked
53+
run: cargo fetch --locked --target $TARGET
5454
- name: xtask build
55-
run: cd xtask && cargo build
55+
run: cargo build -p xtask
5656
- name: xtask generate
57-
# generate all variants, since `--clean` deletes `generated/`, not generating all of them will cause changes
57+
# generate all variants
58+
# If this fails, the files committed don't match what should have been generated.
59+
# Since `--clean` deletes `generated/`, any additional files in git are marked as removed.
5860
run: cargo xtask generate --clean
5961
- name: check generated files are up-to-date
6062
run: |
6163
git add .
6264
git diff --cached
63-
# if this fails, the files committed don't match what should have been generated
6465
git diff --quiet && git diff --cached --quiet
6566
# no --locked, templates need to generate their lockfile
6667
- name: cargo fetch
@@ -104,16 +105,15 @@ jobs:
104105
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
105106
- name: Install rustup components
106107
run: rustup component add rustfmt clippy
107-
- name: xtask cargo fetch --locked
108-
run: cd xtask && cargo fetch --locked --target $TARGET
109-
- name: xtask build
110-
run: cd xtask && cargo build
111-
- name: xtask test
112-
run: cd xtask && cargo nextest run
113-
- name: xtask fmt
114-
run: cd xtask && cargo fmt --all -- --check
115-
- name: xtask clippy
116-
run: cd xtask && cargo clippy --all-targets -- -D warnings
108+
# no --target since lint needs all targets
109+
- name: cargo fetch --locked
110+
run: cargo fetch --locked
111+
- name: xtask cargo test
112+
run: cargo nextest run -p xtask
113+
- name: xtask cargo fmt
114+
run: cargo fmt -p xtask --all -- --check
115+
- name: xtask cargo clippy
116+
run: cargo clippy -p xtask --all-targets -- -D warnings
117117

118118
lint:
119119
name: lint
@@ -133,18 +133,19 @@ jobs:
133133
run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
134134
- name: Install rustup components
135135
run: rustup component add rustfmt clippy
136-
- name: xtask cargo fetch --locked
137-
run: cd xtask && cargo fetch --locked
136+
# no --target since lint needs all targets
137+
- name: cargo fetch --locked
138+
run: cargo fetch --locked
138139
- name: xtask build
139-
run: cd xtask && cargo build
140+
run: cargo build -p xtask
140141
- name: xtask generate
141142
run: cargo xtask generate ${{ matrix.integration }}
142143
# no --locked, templates need to generate their lockfile
143144
- name: cargo fetch
144145
run: cargo xtask generate ${{ matrix.integration }} -x "cargo fetch"
145-
- name: fmt
146+
- name: cargo fmt
146147
run: cargo xtask generate ${{ matrix.integration }} -x "cargo fmt --all -- --check"
147-
- name: clippy
148+
- name: cargo clippy
148149
run: cargo xtask generate ${{ matrix.integration }} -x "cargo clippy --all-targets -- -D warnings"
149150

150151
defaults:

0 commit comments

Comments
 (0)