diff options
Diffstat (limited to 'test/infra')
-rw-r--r-- | test/infra/Dockerfile.emba | 28 | ||||
-rw-r--r-- | test/infra/gitlab-ci.yml | 127 |
2 files changed, 128 insertions, 27 deletions
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba index 421264db9c9..9f03482c3fd 100644 --- a/test/infra/Dockerfile.emba +++ b/test/infra/Dockerfile.emba @@ -28,7 +28,7 @@ FROM debian:stretch as emacs-base RUN apt-get update && \ apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ - libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev git \ + libc-dev gcc g++ make autoconf automake libncurses-dev gnutls-dev git texinfo \ && rm -rf /var/lib/apt/lists/* FROM emacs-base as emacs-inotify @@ -40,21 +40,22 @@ RUN apt-get update && \ COPY . /checkout WORKDIR /checkout RUN ./autogen.sh autoconf -RUN ./configure --without-makeinfo +RUN ./configure RUN make -j4 bootstrap RUN make -j4 FROM emacs-base as emacs-filenotify-gio RUN apt-get update && \ - apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 libglib2.0-dev libglib2.0-bin libglib2.0-0 \ + apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ + libglib2.0-dev libglib2.0-bin libglib2.0-0 \ && rm -rf /var/lib/apt/lists/* COPY . /checkout WORKDIR /checkout RUN ./autogen.sh autoconf -RUN ./configure --without-makeinfo --with-file-notification=gfile -RUN make bootstrap +RUN ./configure --with-file-notification=gfile +RUN make -j4 bootstrap RUN make -j4 FROM emacs-base as emacs-gnustep @@ -66,6 +67,21 @@ RUN apt-get update && \ COPY . /checkout WORKDIR /checkout RUN ./autogen.sh autoconf -RUN ./configure --without-makeinfo --with-ns +RUN ./configure --with-ns RUN make bootstrap RUN make -j4 + +FROM emacs-base as emacs-native-comp-speed0 + +RUN apt-get update && \ + apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 libgccjit-6-dev \ + && rm -rf /var/lib/apt/lists/* + +ARG make_bootstrap_params="" + +COPY . /checkout +WORKDIR /checkout +RUN ./autogen.sh autoconf +RUN ./configure --with-nativecomp +RUN make bootstrap -j2 NATIVE_FULL_AOT=1 BYTE_COMPILE_EXTRA_FLAGS='--eval "(setq comp-speed 0)"' +RUN make -j4 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: |