Skip to content

Commit 58fe0fc

Browse files
avtikhonkyukhin
authored andcommitted
github-ci: avoid of use container tags in actions
Changed the following workflows: luacheck debug_coverage release* static_build static_build_cmake_linux It was changed the OS in which the test run from debian to ubuntu. Also changed the way how this OS was booted - before the change it was booted as docker container using Github Actions tag from inside the worklfows. And it caused all the workflow steps to be run inside it. After the change no container run anymore on the running host. Github Actions host uses for now with its native OS set in 'runs' tag. It was decided to use the latest one OS `ubuntu-20.04` which is already the default for 'ubuntu-latest' tag. This change gave us the abilities to: - Remove extra container step in workflow. - Switch off swap using 'swapoff' command. - Use the same OS as Github Actions uses by default. - Setup our local hosts using Github Actions image snapshot. - Enable use of actions/[email protected] which is better than v1. - Light bootstrap of packages in local .*.mk makefile for: build: libreadline-dev libunwind-dev tests: pip install -r test-run/requirements.txt Closes tarantool/tarantool-qa#101
1 parent 33254d9 commit 58fe0fc

10 files changed

+71
-117
lines changed

.github/workflows/debug_coverage.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,19 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
37-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3831
- uses: ./.github/actions/environment
3932
- name: test
40-
run: ${CI_MAKE} test_coverage_debian_no_deps
33+
run: ${CI_MAKE} coverage_ubuntu_ghactions
4134
env:
4235
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
4336
- name: call action to send Telegram message on failure

.github/workflows/luacheck.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,16 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
options: '--init'
33-
3426
steps:
35-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3631
- name: test
3732
run: ${CI_MAKE} test_debian_luacheck
3833
- name: call action to send Telegram message on failure

.github/workflows/release.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,19 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
37-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3831
- uses: ./.github/actions/environment
3932
- name: test
40-
run: ${CI_MAKE} test_debian_no_deps
33+
run: ${CI_MAKE} test_ubuntu_ghactions
4134
- name: call action to send Telegram message on failure
4235
env:
4336
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}

.github/workflows/release_asan_clang11.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,19 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-buster
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
3727
- uses: actions/[email protected]
3828
with:
3929
fetch-depth: 0
4030
submodules: recursive
4131
- uses: ./.github/actions/environment
4232
- name: test
43-
run: ${CI_MAKE} test_asan_debian_no_deps
33+
run: ${CI_MAKE} test_asan_ubuntu_ghactions
4434
- name: call action to send Telegram message on failure
4535
env:
4636
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}

.github/workflows/release_clang.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,22 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
37-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3831
- uses: ./.github/actions/environment
3932
- name: test
4033
env:
4134
CC: clang
4235
CXX: clang++
43-
run: ${CI_MAKE} test_debian_no_deps
36+
run: ${CI_MAKE} test_ubuntu_ghactions
4437
- name: call action to send Telegram message on failure
4538
env:
4639
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}

.github/workflows/release_lto.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,11 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-buster
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
3727
- uses: actions/[email protected]
3828
with:
@@ -42,7 +32,7 @@ jobs:
4232
- name: test
4333
env:
4434
CMAKE_EXTRA_PARAMS: -DENABLE_LTO=ON
45-
run: ${CI_MAKE} test_debian_no_deps
35+
run: ${CI_MAKE} test_ubuntu_ghactions
4636
- name: call action to send Telegram message on failure
4737
env:
4838
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}

.github/workflows/release_lto_clang11.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,11 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-buster
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
3727
- uses: actions/[email protected]
3828
with:
@@ -44,7 +34,7 @@ jobs:
4434
CC: clang-11
4535
CXX: clang++-11
4636
CMAKE_EXTRA_PARAMS: -DENABLE_LTO=ON
47-
run: ${CI_MAKE} test_debian_no_deps
37+
run: ${CI_MAKE} test_ubuntu_ghactions
4838
- name: call action to send Telegram message on failure
4939
env:
5040
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_CORE_TOKEN }}

.github/workflows/static_build.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,16 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
37-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3831
- uses: ./.github/actions/environment
3932
- name: test
4033
run: ${CI_MAKE} test_static_build

.github/workflows/static_build_cmake_linux.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,16 @@ jobs:
1818
github.event.pull_request.head.repo.full_name != github.repository ) &&
1919
! endsWith(github.ref, '-notest')
2020

21-
runs-on: ubuntu-18.04
21+
runs-on: ubuntu-20.04
2222

2323
strategy:
2424
fail-fast: false
2525

26-
# image built by .gitlab.mk instructions and targets from .travis.mk
27-
container:
28-
image: docker.io/tarantool/testing:debian-stretch
29-
# Our testing expects that the init process (PID 1) will
30-
# reap orphan processes. At least the following test leans
31-
# on it: app-tap/gh-4983-tnt-e-assert-false-hangs.test.lua.
32-
# Memory size hard coding will be removed within resolving issue
33-
# http://github.com/tarantool/tarantool-qa/issues/101
34-
options: '--init --memory=7G --memory-swap=7G'
35-
3626
steps:
37-
- uses: actions/checkout@v1
27+
- uses: actions/[email protected]
28+
with:
29+
fetch-depth: 0
30+
submodules: recursive
3831
- uses: ./.github/actions/environment
3932
- name: test
4033
run: ${CI_MAKE} test_static_build_cmake_linux

.travis.mk

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,24 @@ docker_%:
8282
# commit, so the build requires old dependencies to be installed.
8383
# See ce623a23416eb192ce70116fd14992e84e7ccbbe ('Enable GitLab CI
8484
# testing') for more information.
85-
deps_debian:
85+
86+
deps_tests:
87+
pip install -r test-run/requirements.txt
88+
89+
deps_ubuntu_ghactions: deps_tests
90+
sudo apt-get update ${APT_EXTRA_FLAGS} && \
91+
sudo apt-get install -y -f libreadline-dev libunwind-dev
92+
93+
deps_coverage_ubuntu_ghactions: deps_ubuntu_ghactions
94+
sudo apt-get install -y -f lcov
95+
sudo gem install coveralls-lcov
96+
# Link src/lib/uri/src to local src dircetory to avoid of issue:
97+
# /var/lib/gems/2.7.0/gems/coveralls-lcov-1.7.0/lib/coveralls/lcov/converter.rb:64:in
98+
# `initialize': No such file or directory @ rb_sysopen -
99+
# /home/runner/work/tarantool/tarantool/src/lib/uri/src/lib/uri/uri.c (Errno::ENOENT)
100+
ln -s ${PWD}/src src/lib/uri/src
101+
102+
deps_debian_packages:
86103
apt-get update ${APT_EXTRA_FLAGS} && apt-get install -y -f \
87104
build-essential cmake coreutils sed \
88105
libreadline-dev libncurses5-dev libyaml-dev libssl-dev \
@@ -92,6 +109,8 @@ deps_debian:
92109
python3 python3-gevent python3-six python3-yaml \
93110
lcov ruby clang llvm llvm-dev zlib1g-dev autoconf automake libtool
94111

112+
deps_debian: deps_debian_packages deps_tests
113+
95114
deps_buster_clang_8: deps_debian
96115
echo "deb http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" > /etc/apt/sources.list.d/clang_8.list
97116
echo "deb-src http://apt.llvm.org/buster/ llvm-toolchain-buster-8 main" >> /etc/apt/sources.list.d/clang_8.list
@@ -139,6 +158,8 @@ test_debian_no_deps: build_debian
139158

140159
test_debian: deps_debian test_debian_no_deps
141160

161+
test_ubuntu_ghactions: deps_ubuntu_ghactions test_debian_no_deps
162+
142163
test_debian_clang11: deps_debian deps_buster_clang_11 test_debian_no_deps
143164

144165
# Debug with coverage
@@ -159,7 +180,6 @@ test_coverage_debian_no_deps: build_coverage_debian
159180
# coveralls API: https://docs.coveralls.io/api-reference
160181
@if [ -n "$(COVERALLS_TOKEN)" ]; then \
161182
echo "Exporting code coverage information to coveralls.io"; \
162-
gem install coveralls-lcov; \
163183
echo coveralls-lcov --service-name github-ci --service-job-id $(GITHUB_RUN_ID) \
164184
--repo-token [FILTERED] coverage.info; \
165185
coveralls-lcov --service-name github-ci --service-job-id $(GITHUB_RUN_ID) \
@@ -168,6 +188,8 @@ test_coverage_debian_no_deps: build_coverage_debian
168188

169189
coverage_debian: deps_debian test_coverage_debian_no_deps
170190

191+
coverage_ubuntu_ghactions: deps_coverage_ubuntu_ghactions test_coverage_debian_no_deps
192+
171193
# Coverity
172194

173195
build_coverity_debian: configure_debian
@@ -223,23 +245,25 @@ test_asan_debian_no_deps: build_asan_debian
223245

224246
test_asan_debian: deps_debian deps_buster_clang_11 test_asan_debian_no_deps
225247

248+
test_asan_ubuntu_ghactions: deps_ubuntu_ghactions test_asan_debian_no_deps
249+
226250
# Static build
227251

228-
deps_debian_static:
252+
deps_debian_static: deps_tests
229253
# Found that in Debian OS libunwind library built with dependencies to
230254
# liblzma library, but there is no liblzma static library installed,
231255
# while liblzma dynamic library exists. So the build dynamicaly has no
232256
# issues, while static build fails. To fix it we need to install
233257
# liblzma-dev package with static library only for static build.
234-
apt-get install -y -f liblzma-dev
258+
sudo apt-get install -y -f liblzma-dev
235259

236260
test_static_build: deps_debian_static
237261
CMAKE_EXTRA_PARAMS=-DBUILD_STATIC=ON make -f .travis.mk test_debian_no_deps
238262

239263
# New static build
240264
# builddir used in this target - is a default build path from cmake
241265
# ExternalProject_Add()
242-
test_static_build_cmake_linux:
266+
test_static_build_cmake_linux: deps_tests
243267
cd static-build && cmake -DCMAKE_TARANTOOL_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo;-DENABLE_WERROR=ON" . && \
244268
make -j && ctest -V
245269
make -C ${PWD}/static-build/tarantool-prefix/src/tarantool-build LuaJIT-test
@@ -262,9 +286,9 @@ test_debian_docker_luacheck:
262286
make -f .travis.mk test_debian_luacheck
263287

264288
test_debian_install_luacheck:
265-
apt update -y
266-
apt install -y lua5.1 luarocks
267-
luarocks install luacheck
289+
sudo apt update -y
290+
sudo apt install -y lua5.1 luarocks
291+
sudo luarocks install luacheck
268292

269293
test_debian_luacheck: test_debian_install_luacheck configure_debian
270294
make luacheck

0 commit comments

Comments
 (0)