Skip to content

Commit

Permalink
gitlab-ci: add out-of-source build
Browse files Browse the repository at this point in the history
Added out of source build make targets and added test job to gitlab-ci.

Closes #4874
  • Loading branch information
avtikhon committed Oct 15, 2020
1 parent 2b1a40d commit 6481a3d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .gitlab-ci.yml
Expand Up @@ -181,6 +181,13 @@ luacheck:

# Tests

out_of_source:
stage: test
tags:
- deploy_test
script:
- ${GITLAB_MAKE} test_oos_build

release:
<<: *docker_test_definition
script:
Expand Down
26 changes: 25 additions & 1 deletion .travis.mk
Expand Up @@ -7,7 +7,9 @@ DOCKER_IMAGE_TARANTOOL="registry.gitlab.com/tarantool/tarantool/testing/debian-s
TEST_RUN_EXTRA_PARAMS?=
MAX_FILES?=65534
MAX_PROC?=2500
OOS_SRC_PATH="/source"
OOS_SRC_PATH?="/source"
OOS_BUILD_PATH?="/rw_bins"
OOS_BUILD_RULE?=test_oos_no_deps
BIN_DIR=/usr/local/bin
OSX_VARDIR?=/tmp/tnt

Expand Down Expand Up @@ -207,6 +209,28 @@ test_debian_install_luacheck:
test_debian_luacheck: test_debian_install_luacheck configure_debian
make luacheck

# Out-Of-Source build

build_oos:
mkdir ${OOS_BUILD_PATH} 2>/dev/null || : ; \
cd ${OOS_BUILD_PATH} && \
cmake ${OOS_SRC_PATH} ${CMAKE_EXTRA_PARAMS} && \
make -j

test_oos_no_deps: build_oos
cd ${OOS_BUILD_PATH}/test && \
${OOS_SRC_PATH}/test/test-run.py \
--builddir ${OOS_BUILD_PATH} \
--vardir ${OOS_BUILD_PATH}/test/var --force

test_oos: deps_debian test_oos_no_deps

test_oos_build:
docker run --network=host -w ${OOS_SRC_PATH} \
--mount type=bind,source="${PWD}",target=${OOS_SRC_PATH},readonly,bind-propagation=rslave \
-i ${DOCKER_IMAGE_TARANTOOL} \
make -f .travis.mk ${OOS_BUILD_RULE}

#######
# OSX #
#######
Expand Down

0 comments on commit 6481a3d

Please sign in to comment.