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 8F9EB26B79 for ; Fri, 23 Aug 2019 02:08:45 -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 Z3ijWQJhWAEF for ; Fri, 23 Aug 2019 02:08:45 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 92AD726B6F for ; Fri, 23 Aug 2019 02:08:44 -0400 (EDT) From: "Alexander V. Tikhonov" Subject: [tarantool-patches] [PATCH v1] gitlab-ci: clean up .gitlab-ci.yml Date: Fri, 23 Aug 2019 09:08:40 +0300 Message-Id: <72e11c07b32e8d68702754390dd0a7adcbe6101d.1566540453.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, 69 insertions(+), 184 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f160c276b..49047105a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,29 +6,63 @@ 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 + stage: test + tags: + - deploy script: - - ${GITLAB_MAKE} test_coverage_debian_no_deps + - ${GITLAB_MAKE} package -release_clang: - image: ${IMAGE_TEST} +.deploy_test_template: &deploy_test_definition + <<: *release_only_definition 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 +70,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 +88,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 +125,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 +137,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