From becf80fbc9aa2fd56340ff55d438580dea2be4b6 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 25 May 2025 14:04:09 +0200 Subject: [PATCH] Adapt Emba files * test/infra/Dockerfile.emba: * test/infra/gitlab-ci.yml: Add me as maintainer. Format. * test/infra/Makefile.in (tree-sitter-files): Format. (cherry picked from commit 300d7c1ad657d3631a42360bc746d52179075547) --- test/infra/Dockerfile.emba | 18 ++++++++------ test/infra/Makefile.in | 3 ++- test/infra/gitlab-ci.yml | 51 +++++++++++++++++++++++--------------- 3 files changed, 43 insertions(+), 29 deletions(-) diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 70bfb076c3c..8078dd77312 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -18,10 +18,10 @@ # GNU Emacs support for the GitLab-specific build of Docker images. # The presence of this file does not imply any FSF/GNU endorsement of -# Docker or any other particular tool. Also, it is intended for -# evaluation purposes, thus possibly temporary. +# Docker or any other particular tool. -# Maintainer: Ted Zlatanov +# Author: Ted Zlatanov +# Maintainer: Michael Albinus # URL: https://emba.gnu.org/emacs/emacs FROM debian:bookworm as emacs-base @@ -123,9 +123,10 @@ RUN make -j `nproc` bootstrap RUN mkdir -p /root/.emacs.d/tree-sitter RUN git config --global http.sslverify "false" # See https://github.com/emacs-tree-sitter/tree-sitter-langs/tree/master/repos -# The recommended versions are generated by 'treesit-admin-verify-major-mode-queries' -# at the beginning of every ts-mode file. Loading a ts-mode file adds its -# grammar source to 'treesit-language-source-alist'. +# The recommended versions are generated by +# 'treesit-admin-verify-major-mode-queries' at the beginning of every +# ts-mode file. Loading a ts-mode file adds its grammar source to +# 'treesit-language-source-alist'. RUN src/emacs -Q --batch \ --eval '(message "library ABI min version %d max version %d" \ (treesit-library-abi-version t) (treesit-library-abi-version))' \ @@ -141,7 +142,7 @@ RUN src/emacs -Q --batch \ --eval '(message "\ntreesit-language-source-alist")' \ --eval '(message "=============================")' \ --eval '(message "%s" (pp-to-string treesit-language-source-alist))' \ - --eval '(message "ABI versions\n===========")' \ + --eval '(message "ABI versions\n============")' \ --eval \ '(dolist (lang (sort (mapcar (quote car) treesit-language-source-alist))) \ (message "%s ABI version %d" lang (treesit-language-abi-version lang)))' \ @@ -193,7 +194,8 @@ COPY . /checkout WORKDIR /checkout RUN ./autogen.sh autoconf RUN ./configure --with-native-compilation -RUN make -j `nproc` bootstrap BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 1)"' +RUN make -j `nproc` bootstrap \ + BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 1)"' FROM emacs-native-comp as emacs-native-comp-speed2 diff --git a/test/infra/Makefile.in b/test/infra/Makefile.in index 8347df4e2bf..e92623ba56d 100644 --- a/test/infra/Makefile.in +++ b/test/infra/Makefile.in @@ -124,7 +124,8 @@ tree-sitter-files: @echo '.tree-sitter-files:' >>$(FILE) @echo ' variables:' >>$(FILE) @echo ' tree_sitter_files: >-' >>$(FILE) - @for name in $(TREE-SITTER-FILES) ; do echo " $${name}" >>$(FILE) ; done + @for name in $(TREE-SITTER-FILES) ; \ + do echo " $${name}" >>$(FILE) ; done $(FILE): $(AM_V_GEN) diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml index 6a23725f324..7ebabf6d0f8 100644 --- a/test/infra/gitlab-ci.yml +++ b/test/infra/gitlab-ci.yml @@ -18,10 +18,10 @@ # GNU Emacs support for the GitLab protocol for CI. # The presence of this file does not imply any FSF/GNU endorsement of -# any particular service that uses that protocol. Also, it is intended for -# evaluation purposes, thus possibly temporary. +# any particular service that uses that protocol. -# Maintainer: Ted Zlatanov +# Author: Ted Zlatanov +# Maintainer: Michael Albinus # URL: https://emba.gnu.org/emacs/emacs # Never run merge request pipelines, they usually duplicate push pipelines @@ -67,7 +67,8 @@ default: before_script: - docker info - echo "docker registry is ${CI_REGISTRY}" - - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY} + - 'docker login + -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}' .job-template: variables: @@ -93,7 +94,8 @@ default: -e http_proxy=${http_proxy} -e https_proxy=${https_proxy} -e no_proxy=${no_proxy} - --volumes-from $(docker ps -q -f "label=com.gitlab.gitlab-runner.job.id=${CI_JOB_ID}"):ro + --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 -xvc @@ -107,14 +109,20 @@ default: after_script: # - docker ps -a # - pwd; printenv - # - test -n "$(docker ps -aq -f name=${test_name})" && ( docker export ${test_name} | tar -tvf - ) # Prepare test artifacts. - - 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 cp ${test_name}:checkout/configure.log ${test_name} || true - - test -n "$(docker ps -aq -f name=${test_name})" && docker rm ${test_name} - - find ${test_name} ! \( -name "*.log" -o -name ${EMACS_TEST_JUNIT_REPORT} -o -name compatibility-report.html \) -type f -delete + - '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 cp ${test_name}:checkout/configure.log ${test_name} || true' + - 'test -n "$(docker ps -aq -f name=${test_name})" && + docker cp ${test_name}:checkout/compatibility-report.html ${test_name} || + true' + - 'test -n "$(docker ps -aq -f name=${test_name})" && docker rm ${test_name}' + - 'find ${test_name} + ! \( -name "*.log" -o -name ${EMACS_TEST_JUNIT_REPORT} -o + -name compatibility-report.html \) -type f -delete' # BusyBox find does not know -empty. - - find ${test_name} -type d -depth -exec rmdir {} + 2>/dev/null + - 'find ${test_name} -type d -depth -exec rmdir {} + 2>/dev/null' .build-template: needs: [] @@ -146,8 +154,10 @@ default: - src/macfont.{h,m} when: never script: - - 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} + - '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: cache: @@ -292,8 +302,8 @@ test-filenotify-gio: # This is needed in order to get a JUnit test report. make_params: >- check-expensive - TEST_HOME=/root - LOGFILES="lisp/autorevert-tests.log lisp/filenotify-tests.log" + TEST_HOME=/root + LOGFILES="lisp/autorevert-tests.log lisp/filenotify-tests.log" build-image-eglot: stage: platform-images @@ -311,10 +321,10 @@ test-eglot: target: emacs-eglot # This is needed in order to get a JUnit test report. make_params: >- - check-expensive - TEST_HOME=/root LOGFILES="lisp/progmodes/eglot-tests.log" - # EMACS_EXTRAOPT="--eval \(use-package\ company\ :ensure\ t\) - # --eval \(use-package\ yasnippet\ :ensure\ t\)" + check-expensive TEST_HOME=/root LOGFILES="lisp/progmodes/eglot-tests.log" + + # EMACS_EXTRAOPT="--eval \(use-package\ company\ :ensure\ t\) + # --eval \(use-package\ yasnippet\ :ensure\ t\)" build-image-tree-sitter: stage: platform-images @@ -324,7 +334,8 @@ build-image-tree-sitter: test-tree-sitter: stage: platforms - extends: [.job-template, .test-template, .tree-sitter-template, .tree-sitter-files] + extends: >- + [.job-template, .test-template, .tree-sitter-template, .tree-sitter-files] needs: - job: build-image-tree-sitter optional: true -- 2.39.5