Skip to content

Commit 16d16dc

Browse files
ci: use tt to install rocks and EE
tt is a modern cli to deal with various things, including rocks and Tarantool EE install.
1 parent 56214bf commit 16d16dc

File tree

5 files changed

+54
-29
lines changed

5 files changed

+54
-29
lines changed

.github/workflows/check_on_push.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,15 @@ jobs:
1818
with:
1919
tarantool-version: '2.10'
2020

21+
- name: Setup tt
22+
run: |
23+
curl -L https://tarantool.io/release/2/installer.sh | bash
24+
sudo apt-get update
25+
sudo apt-get install -y tt
26+
tt version
27+
2128
- name: Setup luacheck
22-
run: tarantoolctl rocks install luacheck 0.25.0
29+
run: tt rocks install luacheck 0.25.0
2330

2431
- run: cmake -S . -B build
2532

.github/workflows/test_on_push.yaml

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,21 @@ jobs:
4545
run: |
4646
sudo patch -p1 /usr/share/tarantool/luarocks/manif.lua luarocks.patch
4747
48+
- name: Setup tt
49+
run: |
50+
curl -L https://tarantool.io/release/2/installer.sh | bash
51+
sudo apt-get update
52+
sudo apt-get install -y tt
53+
tt version
54+
4855
- name: Install requirements for community
4956
run: |
5057
tarantool --version
5158
./deps.sh
5259
5360
- name: Install metrics
5461
if: matrix.metrics-version != ''
55-
run: tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
62+
run: tt rocks install metrics ${{ matrix.metrics-version }}
5663

5764
- name: Remove external merger if needed
5865
if: ${{ matrix.remove-merger }}
@@ -91,13 +98,20 @@ jobs:
9198
with:
9299
tarantool-version: ${{ matrix.tarantool-version }}
93100

101+
- name: Setup tt
102+
run: |
103+
curl -L https://tarantool.io/release/2/installer.sh | bash
104+
sudo apt-get update
105+
sudo apt-get install -y tt
106+
tt version
107+
94108
- name: Install requirements for community
95109
run: |
96110
tarantool --version
97111
./deps.sh
98112
99113
- name: Install metrics
100-
run: tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
114+
run: tt rocks install metrics ${{ matrix.metrics-version }}
101115

102116
# This server starts and listen on 8084 port that is used for tests
103117
- name: Stop Mono server
@@ -114,28 +128,32 @@ jobs:
114128
matrix:
115129
tarantool-version:
116130
- "1.10.13-48-ga3a42eec7-r508"
117-
- "2.10.2-0-gf4228cb7d-r508-linux-x86_64"
131+
- "2.10.2-0-gf4228cb7d-r508"
118132
metrics-version: ["", "0.12.0"]
119133
fail-fast: false
120134
runs-on: ubuntu-20.04
121135
steps:
122136
- uses: actions/checkout@master
123137

124-
- name: Install requirements for enterprise
138+
- name: Setup tt
125139
run: |
126-
curl -O -L https://tarantool:${{ secrets.DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/tarantool-enterprise-bundle-${{ matrix.tarantool-version }}.tar.gz
127-
tar -xzf tarantool-enterprise-bundle-${{ matrix.tarantool-version }}.tar.gz
128-
rm -f tarantool-enterprise-bundle-${{ matrix.tarantool-version }}.tar.gz
129-
sudo cp tarantool-enterprise/tarantool /usr/bin/tarantool
130-
source tarantool-enterprise/env.sh
140+
curl -L https://tarantool.io/release/2/installer.sh | bash
141+
sudo apt-get update
142+
sudo apt-get install -y tt
143+
tt version
144+
145+
- name: Install Tarantool EE
146+
run: |
147+
# Rework when https://github.com/tarantool/tt/issues/279 will be resolved
148+
echo "tarantool:${{ secrets.DOWNLOAD_TOKEN }}" > /tmp/creds
149+
sudo sed -i 's/ee: null/ee:/; s/# credential_path:.*/credential_path: \/tmp\/creds/' /etc/tarantool/tarantool.yaml
150+
sudo tt install tarantool-ee=${{ matrix.tarantool-version }}
131151
tarantool --version
132152
./deps.sh
133153
134154
- name: Install metrics
135155
if: matrix.metrics-version != ''
136-
run: |
137-
source tarantool-enterprise/env.sh
138-
tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
156+
run: tt rocks install metrics ${{ matrix.metrics-version }}
139157

140158
# This server starts and listen on 8084 port that is used for tests
141159
- name: Stop Mono server

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ install(
9393
# Don't include to rockspec as some Tarantool versions (e.g. 2.2 and 2.3)
9494
# don't have symbols required by "tuple-merger" and "tuple-keydef" modules.
9595
execute_process(
96-
COMMAND bash "-c" "tarantoolctl rocks install tuple-keydef 0.0.2"
96+
COMMAND bash "-c" "tt rocks install tuple-keydef 0.0.2"
9797
)
9898

9999
execute_process(
100-
COMMAND bash "-c" "tarantoolctl rocks install tuple-merger 0.0.2"
100+
COMMAND bash "-c" "tt rocks install tuple-merger 0.0.2"
101101
)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ project:
5454
```shell
5555
$ git clone https://github.com/tarantool/crud.git
5656
$ cd crud
57-
$ tarantoolctl rocks make
57+
$ tt rocks make
5858
$ ./doc/playground.lua
5959
tarantool> crud.select('customers', {{'<=', 'age', 35}}, {first = 10})
6060
tarantool> crud.select('developers', nil, {first = 6})
6161
```
6262
* Install crud into a current directory:
6363

6464
```shell
65-
$ tarantoolctl rocks install crud
65+
$ tt rocks install crud
6666
```
6767

6868
And add the [initialization code](#API) to storage and router instance files.

deps.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
set -e
55

66
# Test dependencies:
7-
tarantoolctl rocks install luatest 0.5.7
8-
tarantoolctl rocks install luacheck 0.25.0
9-
tarantoolctl rocks install luacov 0.13.0
7+
tt rocks install luatest 0.5.7
8+
tt rocks install luacheck 0.25.0
9+
tt rocks install luacov 0.13.0
1010

1111
# cluacov, luacov-coveralls and dependencies
12-
tarantoolctl rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec
13-
tarantoolctl rocks install https://raw.githubusercontent.com/LuaDist/dkjson/master/dkjson-2.5-2.rockspec
14-
tarantoolctl rocks install https://raw.githubusercontent.com/keplerproject/luafilesystem/master/luafilesystem-scm-1.rockspec
15-
tarantoolctl rocks install https://raw.githubusercontent.com/moteus/lua-path/master/rockspecs/lua-path-scm-0.rockspec
12+
tt rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec
13+
tt rocks install https://raw.githubusercontent.com/LuaDist/dkjson/master/dkjson-2.5-2.rockspec
14+
tt rocks install https://raw.githubusercontent.com/keplerproject/luafilesystem/master/luafilesystem-scm-1.rockspec
15+
tt rocks install https://raw.githubusercontent.com/moteus/lua-path/master/rockspecs/lua-path-scm-0.rockspec
1616

1717
# Most of this code is the workaround for
1818
# https://github.com/moteus/luacov-coveralls/pull/30
@@ -22,12 +22,12 @@ LUACOV_COVERALLS_ROCKSPEC_URL="https://raw.githubusercontent.com/moteus/luacov-c
2222
LUACOV_COVERALLS_ROCKSPEC_FILE="${TMPDIR}/luacov-coveralls-scm-0.rockspec"
2323
curl -fsSL "${LUACOV_COVERALLS_ROCKSPEC_URL}" > "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2424
sed -i -e 's@git://@git+https://@' "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
25-
tarantoolctl rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
25+
tt rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2626
rm "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2727
rmdir "${TMPDIR}"
2828

29-
tarantoolctl rocks install cartridge 2.7.4
30-
tarantoolctl rocks install ddl 1.6.2
31-
tarantoolctl rocks install migrations 0.4.2
29+
tt rocks install cartridge 2.7.4
30+
tt rocks install ddl 1.6.2
31+
tt rocks install migrations 0.4.2
3232

33-
tarantoolctl rocks make
33+
tt rocks make

0 commit comments

Comments
 (0)