]> git.eshelyaron.com Git - emacs.git/commitdiff
* test/infra/gitlab-ci.yml: Bootstrap only from web, schedule, or C-related.
authorTed Zlatanov <tzz@lifelogs.com>
Tue, 19 Jan 2021 13:35:07 +0000 (13:35 +0000)
committerTed Zlatanov <tzz@lifelogs.com>
Tue, 19 Jan 2021 18:00:55 +0000 (18:00 +0000)
test/infra/gitlab-ci.yml

index 3214f01eddb8404d66bf8465167d30f774259677..ddabacfe010bc9f02384fc150060894fddbceb44 100644 (file)
@@ -49,6 +49,8 @@ variables:
   # DOCKER_TLS_CERTDIR: "/certs"
   # Put the configuration for each run in a separate directory to avoid conflicts
   DOCKER_CONFIG: "/.docker-config-${CI_COMMIT_SHA}"
+  # We don't use ${CI_COMMIT_SHA} to be able to do one bootstrap across multiple builds
+  BUILD_TAG: ${CI_COMMIT_REF_SLUG}
 
 default:
   image: docker:19.03.12
@@ -96,17 +98,42 @@ default:
       # - "**/*.log"
   # using the variables for each job
   script:
-    - docker pull ${CI_REGISTRY_IMAGE}:${target}-${CI_COMMIT_SHA}
+    - docker pull ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG}
     # TODO: with make -j4 several of the tests were failing, for example shadowfile-tests, but passed without it
-    - docker run -i --rm -e EMACS_EMBA_CI=${EMACS_EMBA_CI} ${CI_REGISTRY_IMAGE}:${target}-${CI_COMMIT_SHA} make ${make_params}
+    - docker run -i --rm -e EMACS_EMBA_CI=${EMACS_EMBA_CI} ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} make ${make_params}
 
 .build-template:
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "web"'
+      when: always
+    - changes:
+        - "**/Makefile.in"
+        - .gitlab-ci.yml
+        - aclocal.m4
+        - autogen.sh
+        - configure.ac
+        - lib/*.{h,c}
+        - lisp/emacs-lisp/*.el
+        - src/*.{h,c}
+        - test/infra/*
+    - changes:
+        # gfilemonitor, kqueue
+        - src/gfilenotify.c
+        - src/kqueue.c
+        # MS Windows
+        - "**/w32*"
+        # GNUstep
+        - lisp/term/ns-win.el
+        - src/ns*.{h,m}
+        - src/macfont.{h,m}
+      when: never
   script:
-    - docker build --pull --target ${target} -t ${CI_REGISTRY_IMAGE}:${target}-${CI_COMMIT_SHA} -f test/infra/Dockerfile.emba .
-    - docker push ${CI_REGISTRY_IMAGE}:${target}-${CI_COMMIT_SHA}
+    - docker build --pull --target ${target} -t ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} -f test/infra/Dockerfile.emba .
+    - docker push ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG}
 
 .gnustep-template:
   rules:
+    - if: '$CI_PIPELINE_SOURCE == "web"'
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
       changes:
         - "**/Makefile.in"
@@ -120,6 +147,7 @@ default:
 
 .filenotify-gio-template:
   rules:
+    - if: '$CI_PIPELINE_SOURCE == "web"'
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
       changes:
         - "**/Makefile.in"
@@ -208,6 +236,7 @@ test-all-inotify:
   extends: [.job-template]
   rules:
     # note there's no "changes" section, so this always runs on a schedule
+    - if: '$CI_PIPELINE_SOURCE == "web"'
     - if: '$CI_PIPELINE_SOURCE == "schedule"'
   variables:
     target: emacs-inotify