add build caching
authorJacob Lifshay <programmerjake@gmail.com>
Thu, 13 May 2021 01:31:07 +0000 (18:31 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Thu, 13 May 2021 01:31:07 +0000 (18:31 -0700)
.gitlab-ci.yml

index 4d9c5410119abdf027dcb1e39e48cd05482c8159..960f310ed3bfb7eeb0d6565f7715a15e68f32a47 100644 (file)
@@ -1,3 +1,7 @@
+variables:
+    XDG_CACHE_HOME: $CI_PROJECT_DIR/.cache
+    CARGO_HOME: $XDG_CACHE_HOME/.cargo
+
 stages:
     - build
 
@@ -10,6 +14,9 @@ rust-latest:
     parallel:
         matrix:
             - FEATURES: ["", "fma,ir", "f16,ir", "fma,f16,ir"]
+    cache:
+        paths:
+            - .cache
 
 rust-latest-release:
     stage: build
@@ -30,6 +37,9 @@ rust-latest-release:
                       "full_tests,fma,f16",
                       "full_tests,f16",
                   ]
+    cache:
+        paths:
+            - .cache
 
 rust-nightly:
     stage: build
@@ -40,3 +50,6 @@ rust-nightly:
     parallel:
         matrix:
             - FEATURES: ["stdsimd,fma,ir", "stdsimd,ir"]
+    cache:
+        paths:
+            - .cache