From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4FB6E26F98 for ; Thu, 22 Aug 2019 04:23:46 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TgFn5DyG20ir for ; Thu, 22 Aug 2019 04:23:46 -0400 (EDT) Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 865DB26B3A for ; Thu, 22 Aug 2019 04:23:45 -0400 (EDT) From: "Alexander V. Tikhonov" Subject: [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml Date: Thu, 22 Aug 2019 11:23:42 +0300 Message-Id: <2b6d5aa2cbe764e84419016789b0be8c62641449.1566462163.git.avtikhon@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: Alexander Turenko Cc: "Alexander V. Tikhonov" , tarantool-patches@freelists.org Cleaned up the .gitlab-ci.yml file from duplicating code - added templates that storres the needed configuration values for different jobs. Also moved the static_build from 'deploy' tag to 'deploy_test' tag to be sure that tests will not be run under high load. --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/check-full-ci .gitlab-ci.yml | 253 ++++++++++++++----------------------------------- 1 file changed, 70 insertions(+), 183 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f160c276b..10246ad09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,29 +6,65 @@ variables: IMAGE_TEST_LTO: "${CI_REGISTRY}/${CI_PROJECT_PATH}/testing/debian-buster:latest" GITLAB_MAKE: "make -f .gitlab.mk" -# Tests +# Jobs templates -release: +.release_only_template: &release_only_definition + only: + refs: + - master + - /^.*-full-ci$/ + +.docker_test_template: &docker_test_definition image: ${IMAGE_TEST} stage: test tags: - docker_test - script: - - ${GITLAB_MAKE} test_debian_no_deps -debug: - image: ${IMAGE_TEST} +.docker_test_lto_template: &docker_test_lto_definition + image: ${IMAGE_TEST_LTO} stage: test tags: - docker_test + +.deploy_template: &deploy_definition + <<: *release_only_definition + image: ${IMAGE_TEST} + stage: test + tags: + - deploy script: - - ${GITLAB_MAKE} test_coverage_debian_no_deps + - ${GITLAB_MAKE} package -release_clang: +.deploy_test_template: &deploy_test_definition + <<: *release_only_definition image: ${IMAGE_TEST} stage: test tags: - - docker_test + - deploy_test + script: + - ${GITLAB_MAKE} package + +.vbox_template: &vbox_definition + stage: test + before_script: + - ${GITLAB_MAKE} vms_start + after_script: + - ${GITLAB_MAKE} vms_shutdown + +# Tests + +release: + <<: *docker_test_definition + script: + - ${GITLAB_MAKE} test_debian_no_deps + +debug: + <<: *docker_test_definition + script: + - ${GITLAB_MAKE} test_coverage_debian_no_deps + +release_clang: + <<: *docker_test_definition variables: CC: clang CXX: clang++ @@ -36,28 +72,16 @@ release_clang: - ${GITLAB_MAKE} test_debian_no_deps release_lto: - only: - refs: - - master - - /^.*-full-ci$/ - image: ${IMAGE_TEST_LTO} - stage: test - tags: - - docker_test + <<: *release_only_definition + <<: *docker_test_lto_definition variables: CMAKE_EXTRA_PARAMS: -DENABLE_LTO=ON script: - ${GITLAB_MAKE} test_debian_no_deps release_lto_clang8: - only: - refs: - - master - - /^.*-full-ci$/ - image: ${IMAGE_TEST_LTO} - stage: test - tags: - - docker_test + <<: *release_only_definition + <<: *docker_test_lto_definition variables: CC: clang-8 CXX: clang++-8 @@ -66,53 +90,36 @@ release_lto_clang8: - ${GITLAB_MAKE} test_debian_no_deps release_asan_clang8: - image: ${IMAGE_TEST_LTO} - stage: test - tags: - - docker_test + <<: *docker_test_lto_definition script: - ${GITLAB_MAKE} test_asan_debian_no_deps osx_13_release: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test + <<: *release_only_definition + <<: *vbox_definition tags: - vms_osx_13 variables: VMS_NAME: 'osx_13' VMS_USER: 'tarantool' VMS_PORT: '2212' - before_script: - - ${GITLAB_MAKE} vms_start script: - ${GITLAB_MAKE} vms_test_osx - after_script: - - ${GITLAB_MAKE} vms_shutdown osx_14_release: - stage: test + <<: *vbox_definition tags: - vms_osx_14 variables: VMS_NAME: 'osx_14' VMS_USER: 'tarantool' VMS_PORT: '2222' - before_script: - - ${GITLAB_MAKE} vms_start script: - ${GITLAB_MAKE} vms_test_osx - after_script: - - ${GITLAB_MAKE} vms_shutdown osx_14_release_lto: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test + <<: *release_only_definition + <<: *vbox_definition tags: - vms_osx_14 variables: @@ -120,15 +127,11 @@ osx_14_release_lto: VMS_NAME: 'osx_14' VMS_USER: 'tarantool' VMS_PORT: '2222' - before_script: - - ${GITLAB_MAKE} vms_start script: - ${GITLAB_MAKE} vms_test_osx - after_script: - - ${GITLAB_MAKE} vms_shutdown freebsd_12_release: - stage: test + <<: *vbox_definition tags: - vms_freebsd_12 variables: @@ -136,206 +139,90 @@ freebsd_12_release: VMS_USER: 'vagrant' VMS_PORT: '2232' MAKE: 'gmake' - before_script: - - ${GITLAB_MAKE} vms_start script: - ${GITLAB_MAKE} vms_test_freebsd - after_script: - - ${GITLAB_MAKE} vms_shutdown # Packs centos_6: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'el' DIST: '6' - script: - - ${GITLAB_MAKE} package centos_7: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy_test + <<: *deploy_test_definition variables: OS: 'el' DIST: '7' - script: - - ${GITLAB_MAKE} package fedora_28: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy_test + <<: *deploy_test_definition variables: OS: 'fedora' DIST: '28' - script: - - ${GITLAB_MAKE} package fedora_29: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy_test + <<: *deploy_test_definition variables: OS: 'fedora' DIST: '29' - script: - - ${GITLAB_MAKE} package fedora_30: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy_test + <<: *deploy_test_definition variables: OS: 'fedora' DIST: '30' - script: - - ${GITLAB_MAKE} package ubuntu_14_04: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'ubuntu' DIST: 'trusty' - script: - - ${GITLAB_MAKE} package ubuntu_16_04: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'ubuntu' DIST: 'xenial' - script: - - ${GITLAB_MAKE} package ubuntu_18_04: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'ubuntu' DIST: 'bionic' - script: - - ${GITLAB_MAKE} package ubuntu_18_10: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'ubuntu' DIST: 'cosmic' - script: - - ${GITLAB_MAKE} package ubuntu_19_04: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'ubuntu' DIST: 'disco' - script: - - ${GITLAB_MAKE} package debian_8: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'debian' DIST: 'jessie' - script: - - ${GITLAB_MAKE} package debian_9: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'debian' DIST: 'stretch' - script: - - ${GITLAB_MAKE} package debian_10: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_definition variables: OS: 'debian' DIST: 'buster' - script: - - ${GITLAB_MAKE} package static_build: - only: - refs: - - master - - /^.*-full-ci$/ - stage: test - tags: - - deploy + <<: *deploy_test_definition variables: RUN_TESTS: 'ON' - script: - - ${GITLAB_MAKE} static_build -- 2.17.1