From b5c6942fda86ac9d12be2eff72e76bc33f01ddd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Wed, 20 Mar 2024 23:58:52 -0400
Subject: [PATCH] Experiment for the caches...

hoping this doesn't leave an empty zip file laying aorund.
---
 .gitlab-ci-unix.yml | 17 +++++++++++++++++
 .gitlab-ci.yml      |  5 +++++
 2 files changed, 22 insertions(+)

diff --git a/.gitlab-ci-unix.yml b/.gitlab-ci-unix.yml
index 46ad5ae0f0..050f3b5219 100644
--- a/.gitlab-ci-unix.yml
+++ b/.gitlab-ci-unix.yml
@@ -181,6 +181,11 @@ spec:
     - cd src/sbbs3
     - touch depend
     - $[[ inputs.gnu_make ]] $[[ inputs.build_flags ]] $BUILD_ARGS gitinfo
+  cache:
+    key: "${CI_PIPELINE_ID}-gitinfo"
+    files:
+      - "src/sbbs3/git_*.h"
+    policy: push
   artifacts:
     expire_in: 30 mins
     name: "gitinfo-$[[ inputs.os ]]-$[[ inputs.platform ]]"
@@ -188,6 +193,18 @@ spec:
       - "src/sbbs3/git_*.h"
   needs: []
 
+"$[[ inputs.os ]]-$[[ inputs.platform ]] [cleanup]":
+  extends:
+    - .$[[ inputs.os ]]-build
+  script:
+    - echo "Delete ${CI_PIPELINE_ID}-gitinfo"
+  cache:
+    key: "${CI_PIPELINE_ID}-gitinfo"
+    files:
+      - "src/sbbs3/git_*.h"
+    policy: push
+  needs: []
+
 "$[[ inputs.os ]]-$[[ inputs.platform ]] [scfg]":
   extends:
     - .$[[ inputs.os ]]-build
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0c896d6bcf..0df29add7d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,11 @@ variables:
   BUILD_ARGS:
     description: "Extra arguments to pass on gmake command lines."
 
+states:
+  - build
+  - test
+  - cleanup
+
 .rules:
   rules:
     - changes:
-- 
GitLab