Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Alexander Turenko <alexander.turenko@tarantool.org>
Cc: "Alexander V. Tikhonov" <avtikhon@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] [PATCH v1] gitlab-ci: add static build
Date: Tue, 20 Aug 2019 12:32:32 +0300	[thread overview]
Message-ID: <adeca83a27bdced81c7e7fefe6f3dd9e1ad545bd.1566293538.git.avtikhon@tarantool.org> (raw)

Added static build using Dockerfile on Centos 7 for release
commit criteria only. Added the cleanup for cmake generating
CMakeCache.txt files and CMakeFiles directories to avoid of
cmake localy created setup failing inside the docker after
the whole tarantool path was copied into it. Added testing
into the static build, running only when RUN_TESTS environment
variable set to non empty value, used in gitlab-ci job to run
the testing after the build.

Closes #3668
---

Github: https://github.com/tarantool/tarantool/tree/avtikhon/gh-3668-static-build-full-ci
Issue: https://github.com/tarantool/tarantool/issues/3668

 .gitlab-ci.yml         | 13 +++++++++++++
 .gitlab.mk             |  7 +++++++
 Dockerfile.staticbuild | 12 ++++++++++++
 3 files changed, 32 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a7b2b3804..f160c276b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -326,3 +326,16 @@ debian_10:
     DIST: 'buster'
   script:
     - ${GITLAB_MAKE} package
+
+static_build:
+  only:
+    refs:
+      - master
+      - /^.*-full-ci$/
+  stage: test
+  tags:
+    - deploy
+  variables:
+    RUN_TESTS: 'ON'
+  script:
+    - ${GITLAB_MAKE} static_build
diff --git a/.gitlab.mk b/.gitlab.mk
index 7199adf94..cb66df4c2 100644
--- a/.gitlab.mk
+++ b/.gitlab.mk
@@ -105,3 +105,10 @@ vms_shutdown:
 package: git_submodule_update
 	git clone https://github.com/packpack/packpack.git packpack
 	PACKPACK_EXTRA_DOCKER_RUN_PARAMS='--network=host' ./packpack/packpack
+
+# ############
+# Static build
+# ############
+
+static_build:
+	docker build --network=host -f Dockerfile.staticbuild .
diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
index 6a784990b..679cce560 100644
--- a/Dockerfile.staticbuild
+++ b/Dockerfile.staticbuild
@@ -78,6 +78,12 @@ RUN set -x && \
     git submodule init && \
     git submodule update
 
+WORKDIR /tarantool
+
+RUN set -x && \
+    find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
+    find . -name 'CMakeCache.txt' -type f -delete
+
 RUN pip install -r /tarantool/test-run/requirements.txt
 
 RUN set -x \
@@ -91,4 +97,10 @@ RUN set -x \
 
 RUN cd /tarantool && make install
 
+ARG RUN_TESTS
+RUN [ -n ${RUN_TESTS} ] && \
+    set -x && \
+    cd test && \
+    /usr/bin/python test-run.py --force
+
 ENTRYPOINT /bin/bash
-- 
2.17.1

             reply	other threads:[~2019-08-20  9:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20  9:32 Alexander V. Tikhonov [this message]
2019-08-20 22:02 ` [tarantool-patches] " Alexander Turenko
2019-08-21 11:07   ` Alexander Turenko
  -- strict thread matches above, loose matches on Subject: below --
2019-08-20  8:58 [tarantool-patches] " Alexander V. Tikhonov
2019-08-16  9:55 Alexander V. Tikhonov
2019-08-09  4:32 Alexander V. Tikhonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adeca83a27bdced81c7e7fefe6f3dd9e1ad545bd.1566293538.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='Re: [tarantool-patches] [PATCH v1] gitlab-ci: add static build' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox