diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 82ac993161..9d7c3912ea 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -275,6 +275,9 @@ jobs: cache-provider: 'turbo' shared-key: build-${{ matrix.settings.target }}-${{ hashFiles('.cargo/config.toml') }} + - name: Clear native build + run: rm -rf packages/next-swc/native + # we only need custom caching for docker builds # as they are on an older Node.js version and have # issues with turbo caching diff --git a/packages/next-swc/package.json b/packages/next-swc/package.json index fef0a7250d..056b9d726e 100644 --- a/packages/next-swc/package.json +++ b/packages/next-swc/package.json @@ -11,7 +11,7 @@ "build-native-no-plugin-woa-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --cargo-flags=--no-default-features --features image-webp,tracing/release_max_level_info --js false native", "build-native-wasi": "npx --package=@napi-rs/cli@3.0.0-alpha.45 napi build --platform --target wasm32-wasip1-threads -p next-swc-napi --cwd ../../ --output-dir packages/next-swc/native", "build-wasm": "wasm-pack build crates/wasm --scope=next", - "cache-build-native": "echo $(ls native)", + "cache-build-native": "[ -d native ] && echo $(ls native)", "rust-check-fmt": "cd ../..; cargo fmt -- --check", "rust-check-clippy": "cargo clippy --workspace --all-targets -- -D warnings -A deprecated", "rust-check-napi-rustls": "cargo check -p next-swc-napi", diff --git a/scripts/pull-turbo-cache.js b/scripts/pull-turbo-cache.js index 919618a347..fa7e9a06e6 100644 --- a/scripts/pull-turbo-cache.js +++ b/scripts/pull-turbo-cache.js @@ -42,6 +42,7 @@ const { spawn } = require('child_process') // pull cache if it was available if (task.cache.local || task.cache.remote) { + console.log('Cache Status', task.taskId, task.hash, task.cache) await new Promise((resolve, reject) => { const child = spawn( '/bin/bash',