summaryrefslogtreecommitdiff
path: root/test/infra/gitlab-ci.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/infra/gitlab-ci.yml')
-rw-r--r--test/infra/gitlab-ci.yml127
1 files changed, 106 insertions, 21 deletions
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml
index 5a0ab54e4b9..6876a8b11d8 100644
--- a/test/infra/gitlab-ci.yml
+++ b/test/infra/gitlab-ci.yml
@@ -44,6 +44,7 @@ workflow:
variables:
GIT_STRATEGY: fetch
EMACS_EMBA_CI: 1
+ EMACS_TEST_VERBOSE: 1
# # Use TLS https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#tls-enabled
# DOCKER_HOST: tcp://docker:2376
# DOCKER_TLS_CERTDIR: "/certs"
@@ -61,6 +62,8 @@ default:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
.job-template:
+ variables:
+ test_name: ${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}
rules:
- changes:
- "**/Makefile.in"
@@ -95,14 +98,18 @@ default:
artifacts:
expire_in: 24 hrs
paths: []
- # - "test/**/*.log"
- # - "**/*.log"
# using the variables for each job
script:
- 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
- 'export PWD=$(pwd)'
- - 'docker run -i --rm -e EMACS_EMBA_CI=${EMACS_EMBA_CI} --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -c "git fetch ${PWD} HEAD && echo checking out these updated files && git diff --name-only FETCH_HEAD && ( git diff --name-only FETCH_HEAD | xargs git checkout -f FETCH_HEAD ) && make -j4 && make ${make_params}"'
+ - 'docker run -i -e EMACS_EMBA_CI=${EMACS_EMBA_CI} --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro --name ${test_name} ${CI_REGISTRY_IMAGE}:${target}-${BUILD_TAG} /bin/bash -c "git fetch ${PWD} HEAD && echo checking out these updated files && git diff --name-only FETCH_HEAD && ( git diff --name-only FETCH_HEAD | xargs git checkout -f FETCH_HEAD ) && make -j4 && make ${make_params}"'
+ after_script:
+ # - docker ps -a
+ # - printenv
+ # - test -n "$(docker ps -aq -f name=${test_name})" && ( docker export ${test_name} | tar -tvf - )
+ - test -n "$(docker ps -aq -f name=${test_name})" && docker cp ${test_name}:checkout/test ${test_name}
+ - test -n "$(docker ps -aq -f name=${test_name})" && docker rm ${test_name}
.build-template:
rules:
@@ -133,6 +140,19 @@ default:
- 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}
+.test-template:
+ # Do not run fast and normal test jobs when scheduled
+ rules:
+ - if: '$CI_JOB_STAGE =~ "fast|normal" && $CI_PIPELINE_SOURCE == "schedule"'
+ when: never
+ - when: always
+ artifacts:
+ name: ${test_name}
+ public: true
+ expire_in: 1 week
+ paths:
+ - "${test_name}/**/*.log"
+
.gnustep-template:
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
@@ -162,6 +182,21 @@ default:
- test/lisp/autorevert-tests.el
- test/lisp/filenotify-tests.el
+.native-comp-template:
+ rules:
+ - if: '$CI_PIPELINE_SOURCE == "web"'
+ - if: '$CI_PIPELINE_SOURCE == "schedule"'
+ changes:
+ - "**/Makefile.in"
+ - .gitlab-ci.yml
+ - lisp/emacs-lisp/comp.el
+ - lisp/emacs-lisp/comp-cstr.el
+ - src/comp.{h,m}
+ - test/infra/*
+ - test/src/comp-resources/*.el
+ - test/src/comp-tests.el
+ timeout: 8 hours
+
stages:
- prep-images
- build-images
@@ -169,6 +204,8 @@ stages:
- normal
- platform-images
- platforms
+ - native-comp-images
+ - native-comp
- slow
prep-image-base:
@@ -180,62 +217,106 @@ prep-image-base:
build-image-inotify:
stage: build-images
extends: [.job-template, .build-template]
+ needs: [prep-image-base]
variables:
target: emacs-inotify
test-fast-inotify:
stage: fast
- extends: [.job-template]
+ extends: [.job-template, .test-template]
variables:
target: emacs-inotify
make_params: "-C test check"
-build-image-filenotify-gio:
- stage: platform-images
- extends: [.job-template, .build-template, .filenotify-gio-template]
- variables:
- target: emacs-filenotify-gio
-
-build-image-gnustep:
- stage: platform-images
- extends: [.job-template, .build-template, .gnustep-template]
- variables:
- target: emacs-gnustep
-
test-lisp-inotify:
stage: normal
- extends: [.job-template]
+ extends: [.job-template, .test-template]
variables:
target: emacs-inotify
make_params: "-C test check-lisp"
test-lisp-net-inotify:
stage: normal
- extends: [.job-template]
+ extends: [.job-template, .test-template]
variables:
target: emacs-inotify
make_params: "-C test check-lisp-net"
+build-image-filenotify-gio:
+ stage: platform-images
+ extends: [.job-template, .build-template, .filenotify-gio-template]
+ needs: [prep-image-base]
+ variables:
+ target: emacs-filenotify-gio
+
+build-image-gnustep:
+ stage: platform-images
+ extends: [.job-template, .build-template, .gnustep-template]
+ needs: [prep-image-base]
+ variables:
+ target: emacs-gnustep
+
test-filenotify-gio:
# This tests file monitor libraries gfilemonitor and gio.
stage: platforms
- extends: [.job-template, .filenotify-gio-template]
+ needs: [build-image-filenotify-gio]
+ extends: [.job-template, .test-template, .filenotify-gio-template]
variables:
target: emacs-filenotify-gio
- make_params: "-k -C test autorevert-tests filenotify-tests"
+ make_params: "-k -C test autorevert-tests.log filenotify-tests.log"
test-gnustep:
# This tests the GNUstep build process
stage: platforms
+ needs: [build-image-gnustep]
extends: [.job-template, .gnustep-template]
variables:
target: emacs-gnustep
make_params: install
+build-native-bootstrap-speed0:
+ stage: native-comp-images
+ extends: [.job-template, .build-template, .native-comp-template]
+ needs: [prep-image-base]
+ variables:
+ target: emacs-native-comp-speed0
+
+# build-native-bootstrap-speed0:
+# # Test a full native bootstrap
+# # Run for now only speed 0 to limit memory usage and compilation time.
+# stage: native-comp-images
+# # Uncomment the following to run it only when scheduled.
+# # only:
+# # - schedules
+# script:
+# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
+# - ./autogen.sh autoconf
+# - ./configure --with-nativecomp
+# - make bootstrap NATIVE_FULL_AOT=1 BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 0)"' -j2
+# timeout: 8 hours
+
+# build-native-bootstrap-speed1:
+# stage: native-comp-images
+# script:
+# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
+# - ./autogen.sh autoconf
+# - ./configure --with-nativecomp
+# - make bootstrap BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 1)"'
+# timeout: 8 hours
+
+# build-native-bootstrap-speed2:
+# stage: native-comp-images
+# script:
+# - DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends -y -qq -o=Dpkg::Use-Pty=0 libgccjit-6-dev
+# - ./autogen.sh autoconf
+# - ./configure --with-nativecomp
+# - make bootstrap
+# timeout: 8 hours
+
test-all-inotify:
# This tests also file monitor libraries inotify and inotifywatch.
stage: slow
- extends: [.job-template]
+ extends: [.job-template, .test-template]
rules:
# note there's no "changes" section, so this always runs on a schedule
- if: '$CI_PIPELINE_SOURCE == "web"'
@@ -243,3 +324,7 @@ test-all-inotify:
variables:
target: emacs-inotify
make_params: check-expensive
+
+# Local Variables:
+# add-log-current-defun-header-regexp: "^\\([-_.[:alnum:]]+\\)[ \t]*:"
+# End: