Skip to content

Commit db609fc

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 9699003 commit db609fc

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:
@@ -38,13 +39,62 @@ jobs:
3839
metrics-version: '0.13.0'
3940
coveralls: true
4041

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

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

@@ -53,7 +103,7 @@ jobs:
53103
id: cache-rocks
54104
with:
55105
path: .rocks/
56-
key: "cache-rocks-${{ matrix.tarantool }}-\
106+
key: "cache-rocks-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}-\
57107
${{ matrix.cartridge-version }}-\
58108
${{ matrix.metrics-version }}"
59109

0 commit comments

Comments
 (0)