Skip to content

Commit 1c96ced

Browse files
authored
Merge pull request #168 from shift-editor/ci/reuse-native-turbo-build
Reuse native Turbo builds in CI
2 parents 594fbc5 + a495825 commit 1c96ced

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,6 @@ jobs:
122122
- name: Install dependencies
123123
run: pnpm install --frozen-lockfile --prefer-offline
124124

125-
- uses: Swatinem/rust-cache@v2
126-
with:
127-
shared-key: shift-rust
128-
129125
- name: Typecheck
130126
run: pnpm typecheck
131127

@@ -164,16 +160,13 @@ jobs:
164160
with:
165161
shared-key: shift-rust
166162

167-
- name: Cache native module binary
168-
id: native-cache
163+
- name: Cache native Turbo build
169164
uses: actions/cache@v6
170165
with:
171-
path: crates/shift-bridge/*.node
172-
key: native-module-${{ runner.os }}-${{ hashFiles('crates/**', 'Cargo.lock') }}
173-
174-
- name: Build native module
175-
if: steps.native-cache.outputs.cache-hit != 'true'
176-
run: pnpm build:native
166+
path: |
167+
.turbo/cache
168+
crates/shift-bridge/*.node
169+
key: native-turbo-v1-${{ runner.os }}-${{ hashFiles('Cargo.toml', 'Cargo.lock', 'rust-toolchain.toml', 'crates/*/Cargo.toml', 'crates/*/build.rs', 'crates/*/src/**', 'crates/shift-bridge/package.json', 'crates/shift-bridge/*.d.ts', 'pnpm-lock.yaml', 'turbo.json') }}
177170

178171
- name: Run unit tests
179172
run: pnpm test:unit

turbo.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"outputs": ["resources/**"]
3232
},
3333
"typecheck": {
34-
"dependsOn": ["^build", "^generate:bridge-types", "generate:bridge-types"],
34+
"dependsOn": ["^generate:bridge-types", "generate:bridge-types"],
3535
"outputs": []
3636
},
3737
"@shift/glyph-info#typecheck": {
@@ -40,7 +40,6 @@
4040
},
4141
"@shift/desktop#typecheck": {
4242
"dependsOn": [
43-
"^build",
4443
"@shift/glyph-info#generate",
4544
"^generate:bridge-types",
4645
"generate:bridge-types"

0 commit comments

Comments
 (0)