[gjs: 1/5] CI: change tests schema
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/5] CI: change tests schema
- Date: Thu, 5 Jul 2018 07:54:50 +0000 (UTC)
commit 7ff96348b0b3d52580eaf1db394500067459fc93
Author: Claudio André <claudioandre br gmail com>
Date: Sat Jun 30 22:23:23 2018 -0300
CI: change tests schema
Some tests will run for "every push". Others, will be scheduled.
.gitlab-ci.yml | 269 +++++++++++++++++++++++++++++++++-----------------------
test/test-ci.sh | 13 +--
2 files changed, 168 insertions(+), 114 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f71c5f10..eff7ad06 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -87,117 +87,58 @@ stages:
- *CI_footer
#############################################
-# Run a test despite of any Docker image change
-# SpiderMonkey was configured with --enable-debug
+# Regular tests
#############################################
+# Test despite any changes in the Docker image
+# SpiderMonkey has been configured with --enable-debug
fedora:
<<: *build
stage: source_check
image: claudioandre/spidermonkey:job-485.9_SM52-debug-gcc.fedora-dev # pinned on purpose
variables:
+ TASK_ID: "fedora-x86_64-gcc-debug-default-check"
TEST: "check"
WARNINGS: "count"
-#############################################
-# Regular tests
-#############################################
-fedora_clang:
- <<: *build
- stage: test
- image: claudioandre/spidermonkey:new-342.4 # temporarily pinned to old tag
- variables:
- CC: clang
- TEST: "distcheck"
-
sanitizer_gcc:
<<: *build
- stage: thorough_tests
+ stage: test
image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
variables:
- TEST: "check"
+ TASK_ID: "fedora-x86_64-gcc-default-ubsan_asan-check"
BUILD_OPTS: "--enable-asan --enable-ubsan"
+ TEST: "check"
# There are a lot of debug log statements that are ifdef'd out in normal usage.
# These sometimes get invalid expressions in them, leading to annoyance the
# next time you try to use debug logging.
with_logging:
<<: *build
- stage: thorough_tests
- image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
+ stage: test
+ image: claudioandre/spidermonkey:new-342.4 # temporarily pinned to old tag
variables:
+ TASK_ID: "fedora-x86_64-clang-default-logging-check"
+ CC: clang
BUILD_OPTS: CPPFLAGS='-DGJS_VERBOSE_ENABLE_PROPS=1 -DGJS_VERBOSE_ENABLE_MARSHAL=1
-DGJS_VERBOSE_ENABLE_LIFECYCLE=1 -DGJS_VERBOSE_ENABLE_GI_USAGE=1 -DGJS_VERBOSE_ENABLE_CLOSURE=1
-DGJS_VERBOSE_ENABLE_GSIGNAL=1'
+ TEST: "check"
-# Generates
-# The Code Coverage Report
-coverage:
- <<: *build
- <<: *coverage
- stage: thorough_tests
- image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
- variables:
- BUILD_OPTS: "--enable-code-coverage"
- coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
- except:
- - /^wip\/.*/
-
-# Publish
-# The Coverage Report generated above
-pages:
- stage: delivery
- dependencies:
- - coverage
- script:
- - mv $(pwd)/coverage/ public/
- artifacts:
- paths:
- - public
- only:
- - master@GNOME/gjs
-
-ubuntu_gcc:
+no_graphics:
<<: *build
stage: test
- image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
+ image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
variables:
- TEST: "distcheck"
- only:
- - master@GNOME/gjs
+ TASK_ID: "fedora-x86_64-gcc-default-without_gtk-check"
+ TEST: "check"
+ BUILD_OPTS: "--without-cairo --without-gtk"
-ubuntu_clang:
+no_profiler:
<<: *build
stage: test
- image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
- variables:
- CC: clang
- TEST: "distcheck"
- only:
- - master@GNOME/gjs
-
-sanitizer_clang:
- <<: *build
- stage: thorough_tests
- image: claudioandre/spidermonkey:new-342.4 # temporarily pinned to old tag
+ image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
variables:
- CC: clang
+ TASK_ID: "fedora-x86_64-gcc-default-disable_profiler-check"
TEST: "check"
- BUILD_OPTS: "--enable-asan --enable-ubsan"
- only:
- - master@GNOME/gjs
-
-codequality:
- stage: thorough_tests
- image: docker:latest
- variables:
- DOCKER_DRIVER: overlay
- services:
- - docker:dind
- script:
- - docker pull codeclimate/codeclimate
- - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume
/var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json >
codeclimate.json
- artifacts:
- paths: [codeclimate.json]
- only:
- - master@GNOME/gjs
+ BUILD_OPTS: "--disable-profiler"
#############################################
# Static Analyzers
@@ -207,6 +148,7 @@ cppcheck:
stage: source_check
image: claudioandre/spidermonkey:fedora.static-analysis
variables:
+ TASK_ID: "cppcheck"
CODECHECK: "CPPCHECK"
cpplint:
@@ -214,6 +156,7 @@ cpplint:
stage: source_check
image: claudioandre/spidermonkey:fedora.static-analysis
variables:
+ TASK_ID: "cpplint"
CODECHECK: "CPPLINT"
eslint:
@@ -221,55 +164,134 @@ eslint:
stage: source_check
image: claudioandre/spidermonkey:fedora.static-analysis
variables:
+ TASK_ID: "eslint"
CODECHECK: "ESLINT"
+#############################################
+# Daily jobs / Frequent jobs
+#############################################
+codequality:
+ stage: source_check
+ image: docker:latest
+ variables:
+ TASK_ID: "codequality"
+ DOCKER_DRIVER: overlay
+ services:
+ - docker:dind
+ script:
+ - docker pull codeclimate/codeclimate
+ - docker run --env CODECLIMATE_CODE="$PWD" --volume "$PWD":/code --volume
/var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze -f json >
codeclimate.json
+ artifacts:
+ paths: [codeclimate.json]
+ only:
+ refs:
+ - master@GNOME/gjs
+ variables:
+ - $CRON_FREQUENCY == "Daily"
+
code_statistics:
<<: *build
stage: source_check
image: claudioandre/spidermonkey:fedora.static-analysis
variables:
+ TASK_ID: "code_statistics"
CODECHECK: "TOKEI"
only:
- - master@GNOME/gjs
+ variables:
+ - $CRON_FREQUENCY == "Daily"
-#############################################
-# Optional / Manual CI tests
-#############################################
-valgrind:
+# Generates
+# The Code Coverage Report
+coverage:
<<: *build
- stage: thorough_tests
- image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
+ <<: *coverage
+ stage: source_check
+ image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
variables:
- BUILD_OPTS: "--enable-valgrind --disable-valgrind-helgrind --prefix=/usr"
- allow_failure: true
- when: manual
+ TASK_ID: "coverage"
+ BUILD_OPTS: "--enable-code-coverage"
+ coverage: '/^Lines:.\d+.\d+.(\d+\.\d+\%)/'
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Daily"
-no_graphics:
+# Publish
+# The Coverage Report generated above
+pages:
+ stage: delivery
+ dependencies:
+ - coverage
+ script:
+ - mv $(pwd)/coverage/ public/
+ artifacts:
+ paths:
+ - public
+ only:
+ refs:
+ - master@GNOME/gjs
+ variables:
+ - $CRON_FREQUENCY == "Daily"
+
+sanitizer_clang:
<<: *build
stage: thorough_tests
- image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
+ image: claudioandre/spidermonkey:new-342.4 # temporarily pinned to old tag
variables:
+ TASK_ID: "fedora-x86_64-clang_ubsan_asan-default-default-check"
+ CC: clang
+ BUILD_OPTS: "--enable-asan --enable-ubsan"
TEST: "check"
- BUILD_OPTS: "--without-cairo --without-gtk"
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Daily"
-no_profiler:
+fedora_gcc:
<<: *build
stage: thorough_tests
image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
variables:
- TEST: "check"
- BUILD_OPTS: "--disable-profiler"
- when: manual
+ TASK_ID: "fedora-x86_64-gcc-default-default-distcheck"
+ TEST: "distcheck"
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Daily"
installed_tests:
<<: *build
stage: thorough_tests
+ image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
+ variables:
+ TASK_ID: "fedora-x86_64-gcc-default-default-installed_tests"
+ BUILD_OPTS: "--enable-installed-tests --prefix=/usr"
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Daily"
+
+#############################################
+# Weekly jobs / Non-Frequent jobs
+#############################################
+ubuntu_gcc:
+ <<: *build
+ stage: source_check
+ image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
+ variables:
+ TASK_ID: "ubuntu-x86_64-gcc-default-default-distcheck"
+ TEST: "distcheck"
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
+
+ubuntu_clang:
+ <<: *build
+ stage: source_check
image: claudioandre/spidermonkey:SM52-gcc.ubuntu-dev
variables:
+ TASK_ID: "ubuntu-x86_64-clang-default-default-distcheck"
CC: clang
- BUILD_OPTS: "--enable-installed-tests --prefix=/usr"
- when: manual
+ TEST: "distcheck"
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
lts:
<<: *build
@@ -277,9 +299,25 @@ lts:
stage: thorough_tests
image: claudioandre/spidermonkey:SM52-gcc.ubuntu-lts
variables:
+ TASK_ID: "ubuntu_lts-x86_64-gcc-default-default-check"
DEV: jhbuild
TEST: "check"
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
+
+valgrind:
+ <<: *build
+ stage: thorough_tests
+ image: claudioandre/spidermonkey:SM52-gcc.fedora-dev
+ variables:
+ TASK_ID: "fedora-x86_64-gcc-default-default-valgrind_check"
+ BUILD_OPTS: "--enable-valgrind --disable-valgrind-helgrind --prefix=/usr"
+ TEST: "check"
+ allow_failure: true
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
#############################################
# Flatpak packaging
@@ -290,6 +328,7 @@ packaging:
stage: delivery
image: registry.gitlab.gnome.org/gnome/gnome-nightly-oci/nightly:master
variables:
+ TASK_ID: "packaging"
CODECHECK: "FLATPAK"
APPID: "org.gnome.GjsDevel"
BUNDLE: "org.gnome.GjsDevel.flatpak"
@@ -299,7 +338,9 @@ packaging:
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
#############################################
# SpiderMonkey GC Tests
@@ -309,27 +350,36 @@ zeal_2:
stage: thorough_tests
image: claudioandre/spidermonkey:SM52-debug-gcc.fedora-dev
variables:
+ TASK_ID: "fedora-x86_64-gcc-debug-default-check_zeal2"
TEST: "check"
JS_GC_ZEAL: 2
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
zeal_4:
<<: *build
stage: thorough_tests
image: claudioandre/spidermonkey:SM52-debug-gcc.fedora-dev
variables:
+ TASK_ID: "fedora-x86_64-gcc-debug-default-check_zeal4"
TEST: "check"
JS_GC_ZEAL: 4
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
zeal_11:
<<: *build
stage: thorough_tests
image: claudioandre/spidermonkey:SM52-debug-gcc.fedora-dev
variables:
+ TASK_ID: "fedora-x86_64-gcc-debug-default-check_zeal11"
TEST: "check"
JS_GC_ZEAL: 11
- when: manual
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
#############################################
# Multiarch Tests
@@ -343,6 +393,9 @@ zeal_11:
image: docker:latest
services:
- docker:dind
+ only:
+ variables:
+ - $CRON_FREQUENCY == "Weekly"
script:
# CI starts here. Previous messages are from GitLab Runner setup.
@@ -353,7 +406,7 @@ zeal_11:
# Run the multiarch test job using QEMU
- 'docker run -v $(pwd):/cwd
- -e TEST=check $IMAGE
+ -e TEST=check -e TASK_ID=$TASK_ID $IMAGE
bash -e -c "cd /cwd && test/test-ci.sh GJS"
'
@@ -364,14 +417,14 @@ armv8:
<<: *multiarch
stage: thorough_tests
variables:
+ TASK_ID: "fedora-armv8-gcc-default-default-check"
DOCKER_DRIVER: overlay
IMAGE: "claudioandre/spidermonkey:SM52-gcc.fedora-dev.aarch64"
- when: manual
ppc64le:
<<: *multiarch
stage: thorough_tests
variables:
+ TASK_ID: "fedora-ppc64le-gcc-default-default-check"
DOCKER_DRIVER: overlay
IMAGE: "claudioandre/spidermonkey:SM52-gcc.fedora-dev.ppc64le"
- when: manual
diff --git a/test/test-ci.sh b/test/test-ci.sh
index 70bece2d..aa61e118 100755
--- a/test/test-ci.sh
+++ b/test/test-ci.sh
@@ -124,15 +124,16 @@ function do_Check_Warnings(){
}
# ----------- Run the Tests -----------
-if [[ -n "${BUILD_OPTS}" ]]; then
- extra_opts="($BUILD_OPTS)"
+if [[ -n "${TEST}" ]]; then
+ extra_opts="($TEST)"
fi
# Show some environment info
-echo
-echo '-- Environment --'
-echo "Running on: $BASE $OS $extra_opts"
-echo "Doing: $1"
+do_Print_Labels 'ENVIRONMENT'
+echo "Running on: $BASE $OS"
+echo "Job: $TASK_ID"
+echo "Build options: $BUILD_OPTS"
+echo "Doing: $1 $extra_opts"
source test/extra/do_environment.sh
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]