@@ -3,9 +3,23 @@ name: CI
33on :
44 push :
55 branches : [master]
6+ paths-ignore :
7+ - " docs/**"
8+ - " playground/**"
9+ - " crates/vide-lsp-wasm/**"
10+ - " .github/actions/setup-emscripten/**"
11+ - " .github/workflows/docs-preview.yml"
12+ - " .github/workflows/deploy-docs.yml"
613 pull_request :
714 types : [opened, synchronize, reopened]
815 branches : ["**"]
16+ paths-ignore :
17+ - " docs/**"
18+ - " playground/**"
19+ - " crates/vide-lsp-wasm/**"
20+ - " .github/actions/setup-emscripten/**"
21+ - " .github/workflows/docs-preview.yml"
22+ - " .github/workflows/deploy-docs.yml"
923 workflow_dispatch :
1024
1125concurrency :
@@ -18,16 +32,20 @@ jobs:
1832 runs-on : ubuntu-latest
1933 steps :
2034 - uses : actions/checkout@v4
21- with :
22- submodules : recursive
2335 - name : Install Rust
24- uses : dtolnay/rust-toolchain@nightly
36+ uses : ./.github/actions/setup-rust
2537 with :
2638 components : clippy, rustfmt
39+ - name : Setup sccache
40+ uses : ./.github/actions/setup-sccache
41+ with :
42+ cmake-launcher : " true"
2743 - name : Rust Cache
2844 uses : Swatinem/rust-cache@v2
2945 continue-on-error : true
3046 with :
47+ shared-key : rust-${{ runner.os }}
48+ key : workspace-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'rust-toolchain.toml', 'src/**', 'crates/**', 'xtask/**') }}
3149 cache-workspace-crates : true
3250 cache-on-failure : true
3351 - name : Format Check
@@ -43,20 +61,24 @@ jobs:
4361 os : [ubuntu-latest, windows-latest, macos-latest]
4462 steps :
4563 - uses : actions/checkout@v4
46- with :
47- submodules : recursive
4864 - name : Install Rust
49- uses : dtolnay/rust-toolchain@nightly
65+ uses : ./.github/actions/setup-rust
5066 with :
5167 components : rustfmt
68+ - name : Setup sccache
69+ uses : ./.github/actions/setup-sccache
70+ with :
71+ cmake-launcher : " true"
5272 - name : Rust Cache
5373 uses : Swatinem/rust-cache@v2
5474 continue-on-error : true
5575 with :
76+ shared-key : rust-${{ runner.os }}
77+ key : workspace-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'rust-toolchain.toml', 'src/**', 'crates/**', 'xtask/**') }}
5678 cache-workspace-crates : true
5779 cache-on-failure : true
5880 - name : Test
59- run : rustup run nightly cargo test --workspace
81+ run : cargo test --workspace
6082
6183 vscode-extension :
6284 name : VS Code Checks
6688 working-directory : editors/vscode
6789 steps :
6890 - uses : actions/checkout@v4
69- with :
70- submodules : recursive
71- - name : Install Rust
72- uses : dtolnay/rust-toolchain@nightly
73- with :
74- components : rustfmt
75- - name : Rust Cache
76- uses : Swatinem/rust-cache@v2
77- continue-on-error : true
78- with :
79- cache-workspace-crates : true
80- cache-on-failure : true
8191 - name : Setup Node
8292 uses : actions/setup-node@v4
8393 with :
@@ -111,16 +121,20 @@ jobs:
111121 working-directory : editors/vscode
112122 steps :
113123 - uses : actions/checkout@v4
114- with :
115- submodules : recursive
116124 - name : Install Rust
117- uses : dtolnay/rust-toolchain@nightly
125+ uses : ./.github/actions/setup-rust
118126 with :
119127 components : rustfmt
128+ - name : Setup sccache
129+ uses : ./.github/actions/setup-sccache
130+ with :
131+ cmake-launcher : " true"
120132 - name : Rust Cache
121133 uses : Swatinem/rust-cache@v2
122134 continue-on-error : true
123135 with :
136+ shared-key : rust-${{ runner.os }}
137+ key : package-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'rust-toolchain.toml', 'src/**', 'crates/**', 'editors/vscode/scripts/**') }}
124138 cache-workspace-crates : true
125139 cache-on-failure : true
126140 - name : Setup Node
@@ -160,8 +174,10 @@ jobs:
160174 include :
161175 - target : alpine-x64
162176 image : ghcr.io/blackdex/rust-musl:x86_64-musl-nightly
177+ rust-target : x86_64-unknown-linux-musl
163178 - target : alpine-arm64
164179 image : ghcr.io/blackdex/rust-musl:aarch64-musl-nightly
180+ rust-target : aarch64-unknown-linux-musl
165181 defaults :
166182 run :
167183 working-directory : editors/vscode
@@ -172,19 +188,32 @@ jobs:
172188 apt-get update
173189 apt-get install -y --no-install-recommends ca-certificates cmake git python3
174190
175- - name : Install Rust components
176- working-directory : .
177- run : rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
178-
179191 - uses : actions/checkout@v4
180- with :
181- submodules : recursive
182192
183193 - name : Trust checkout directories
184194 working-directory : .
185195 run : |
186196 git config --global --add safe.directory "$GITHUB_WORKSPACE"
187- git config --global --add safe.directory "$GITHUB_WORKSPACE/crates/slang"
197+
198+ - name : Install Rust
199+ uses : ./.github/actions/setup-rust
200+ with :
201+ components : rustfmt
202+ targets : ${{ matrix.rust-target }}
203+
204+ - name : Setup sccache
205+ uses : ./.github/actions/setup-sccache
206+ with :
207+ cmake-launcher : " true"
208+
209+ - name : Rust Cache
210+ uses : Swatinem/rust-cache@v2
211+ continue-on-error : true
212+ with :
213+ shared-key : rust-${{ runner.os }}-${{ matrix.target }}
214+ key : package-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'rust-toolchain.toml', 'src/**', 'crates/**', 'editors/vscode/scripts/**') }}
215+ cache-workspace-crates : true
216+ cache-on-failure : true
188217
189218 - name : Setup Node
190219 uses : actions/setup-node@v4
0 commit comments