Lightning fast docker rebuilds

This commit is contained in:
Laura Hausmann 2023-08-04 17:14:18 +02:00
parent 8ac6647291
commit 2ea0d06d62
No known key found for this signature in database
GPG Key ID: D044E84C5BE01605
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ RUN --mount=type=cache,target=/iceshrimp/.yarncache rm -rf .yarncache/* && cp -T
COPY packages/backend/native-utils packages/backend/native-utils/
# Compile native-utils utilising sccache
RUN --mount=type=cache,target=/root/.cargo --mount=type=cache,target=/tmp/sccache yarn workspace native-utils build
RUN --mount=type=cache,target=/root/.cargo --mount=type=cache,target=/tmp/sccache --mount=type=cache,target=/iceshrimp/packages/backend/native-utils/target --mount=type=cache,target=/iceshrimp/packages/backend/native-utils/migration/target yarn workspace native-utils build
# Copy in the rest of the files to compile
COPY . ./

View File

@ -36,7 +36,7 @@
"artifacts": "napi artifacts",
"build": "yarn build:napi && yarn build:migration",
"build:napi": "napi build --features napi --platform --release ./built/",
"build:migration": "cargo build --locked --profile release-no-lto -p migration && cp ./target/release-no-lto/migration ./built/migration",
"build:migration": "cargo build --locked --profile release-no-lto -p migration --target-dir migration/target && cp ./migration/target/release-no-lto/migration ./built/migration",
"build:debug": "napi build --platform ./built/ && cargo build -p migration",
"prepublishOnly": "napi prepublish -t npm",
"test": "yarn cargo:test && yarn build:napi && ava",