Skip to content

Commit fa442ec

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 7f105f5 commit fa442ec

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

.github/workflows/fast_testing.yaml

Lines changed: 41 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
metrics-version:
2930
- ''
3031
- '0.10.0'
@@ -39,10 +40,49 @@ jobs:
3940
runs-on: ubuntu-latest
4041
steps:
4142
- name: Install tarantool ${{ matrix.tarantool }}
43+
if: startsWith(matrix.tarantool, 'debug') != true
4244
uses: tarantool/setup-tarantool@v1
4345
with:
4446
tarantool-version: ${{ matrix.tarantool }}
4547

48+
- name: Create version postfix for Tarantool
49+
if: startsWith(matrix.tarantool, 'debug')
50+
run: |
51+
branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2)
52+
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch ${branch} | head -c 8)
53+
echo "version_postfix=-${commit_hash}" >> $GITHUB_ENV
54+
shell: bash
55+
56+
- name: Cache tarantool build
57+
if: startsWith(matrix.tarantool, 'debug')
58+
id: cache-tnt-debug
59+
uses: actions/cache@v3
60+
with:
61+
path: ~/tnt-debug/
62+
key: cache-tnt-${{ matrix.tarantool }}${{ env.version_postfix }}
63+
64+
- name: Build tarantool ${{ matrix.tarantool }}
65+
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
66+
run: |
67+
sudo apt-get -y install git build-essential cmake make zlib1g-dev \
68+
libreadline-dev libncurses5-dev libssl-dev \
69+
libunwind-dev libicu-dev python3 python3-yaml \
70+
python3-six python3-gevent
71+
branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2)
72+
git clone --branch ${branch} --single-branch --recursive \
73+
https://github.com/tarantool/tarantool.git
74+
cd tarantool
75+
git submodule update --init --recursive
76+
mkdir build && cd build
77+
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_DIST=ON
78+
make
79+
make DESTDIR=~/tnt-debug/ install
80+
81+
- name: Install tarantool ${{ matrix.tarantool }}
82+
if: startsWith(matrix.tarantool, 'debug')
83+
run: |
84+
sudo cp -rvP ~/tnt-debug/* /usr/local/
85+
4686
- name: Clone the module
4787
uses: actions/checkout@v2
4888

@@ -51,7 +91,7 @@ jobs:
5191
id: cache-rocks
5292
with:
5393
path: .rocks/
54-
key: cache-rocks-${{ matrix.tarantool }}-${{ matrix.metrics-version }}-01
94+
key: cache-rocks-${{ matrix.tarantool }}${{ env.version_postfix }}-${{ matrix.metrics-version }}
5595

5696
- name: Install requirements
5797
run: make deps

0 commit comments

Comments
 (0)