Skip to content

Commit 4790d98

Browse files
committed
ci: add a debug Tarantool build
The patch adds a Tarantool debug build from the last commit of the master branch to GitHub Actions workflow. It uses an official build instruction for Tarantool [1] and the cache action [2] to cache build outputs. 1. https://www.tarantool.io/ru/doc/latest/dev_guide/building_from_source/ 2. https://github.com/actions/cache Closes #102
1 parent bf830ef commit 4790d98

File tree

1 file changed

+51
-1
lines changed

1 file changed

+51
-1
lines changed

.github/workflows/fast_testing.yaml

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
- '2.7'
2626
- '2.8'
2727
- '2.10'
28+
- 'debug-master'
2829
cartridge-version:
2930
- '2.7.4'
3031
metrics-version:
@@ -39,13 +40,62 @@ jobs:
3940
metrics-version: '0.13.0'
4041
coveralls: true
4142

43+
env:
44+
TNT_DEBUG_PATH: /home/runner/tnt-debug
45+
4246
runs-on: ubuntu-latest
4347
steps:
4448
- name: Install tarantool ${{ matrix.tarantool }}
49+
if: startsWith(matrix.tarantool, 'debug') != true
4550
uses: tarantool/setup-tarantool@v1
4651
with:
4752
tarantool-version: ${{ matrix.tarantool }}
4853

54+
- name: Create variables for Tarantool ${{ matrix.tarantool }}
55+
if: startsWith(matrix.tarantool, 'debug')
56+
run: |
57+
branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2)
58+
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch ${branch} | head -c 8)
59+
echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV
60+
echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV
61+
shell: bash
62+
63+
- name: Cache tarantool build
64+
if: startsWith(matrix.tarantool, 'debug')
65+
id: cache-tnt-debug
66+
uses: actions/cache@v3
67+
with:
68+
path: ${{ env.TNT_DEBUG_PATH }}
69+
key: cache-tnt-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}
70+
71+
- name: Clone tarantool ${{ matrix.tarantool }}
72+
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
73+
uses: actions/checkout@v3
74+
with:
75+
repository: tarantool/tarantool
76+
ref: ${{ env.TNT_BRANCH }}
77+
path: tarantool
78+
fetch-depth: 0
79+
submodules: true
80+
81+
- name: Build tarantool ${{ matrix.tarantool }}
82+
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
83+
run: |
84+
sudo apt-get -y install git build-essential cmake make zlib1g-dev \
85+
libreadline-dev libncurses5-dev libssl-dev \
86+
libunwind-dev libicu-dev python3 python3-yaml \
87+
python3-six python3-gevent
88+
cd ${GITHUB_WORKSPACE}/tarantool
89+
mkdir build && cd build
90+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_DIST=ON
91+
make
92+
make DESTDIR=${TNT_DEBUG_PATH} install
93+
94+
- name: Install tarantool ${{ matrix.tarantool }}
95+
if: startsWith(matrix.tarantool, 'debug')
96+
run: |
97+
sudo cp -rvP ${TNT_DEBUG_PATH}/usr/local/* /usr/local/
98+
4999
- name: Clone the module
50100
uses: actions/checkout@v3
51101

@@ -54,7 +104,7 @@ jobs:
54104
id: cache-rocks
55105
with:
56106
path: .rocks/
57-
key: "cache-rocks-${{ matrix.tarantool }}-\
107+
key: "cache-rocks-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}-\
58108
${{ matrix.cartridge-version }}-\
59109
${{ matrix.metrics-version }}"
60110

0 commit comments

Comments
 (0)