Commit a0d50568 authored by Rahix's avatar Rahix 🦀
Browse files

ci: Add build cache

Cache cargo build directory (`target/`) and npm's `node_modules/`.
parent 76a9d685
...@@ -4,6 +4,11 @@ stages: ...@@ -4,6 +4,11 @@ stages:
- check - check
- build - build
cache: &global_cache
paths:
- target/
- www/node_modules/
check: check:
stage: check stage: check
script: script:
...@@ -15,6 +20,10 @@ check: ...@@ -15,6 +20,10 @@ check:
build-dev: build-dev:
stage: build stage: build
cache:
# inherit all global cache settings
<<: *global_cache
key: merge-requests
script: script:
- ls -al /usr/local/cargo/bin - ls -al /usr/local/cargo/bin
- wasm-pack build --dev - wasm-pack build --dev
...@@ -23,6 +32,10 @@ build-dev: ...@@ -23,6 +32,10 @@ build-dev:
build-release: build-release:
stage: build stage: build
cache:
# inherit all global cache settings
<<: *global_cache
key: release-build
script: script:
- wasm-pack build - wasm-pack build
- cd www - cd www
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment