Skip to content

Commit 28ff5c7

Browse files
ci: use tt to install rocks
1 parent e33147d commit 28ff5c7

File tree

4 files changed

+62
-19
lines changed

4 files changed

+62
-19
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/reusable_test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,18 @@ jobs:
3131
sudo dpkg -i tarantool_*.deb tarantool-common_*.deb tarantool-dev_*.deb
3232
tarantool --version
3333
34+
- name: Setup tt
35+
run: |
36+
curl -L https://tarantool.io/release/2/installer.sh | bash
37+
sudo apt-get update
38+
sudo apt-get install -y tt
39+
tt version
40+
3441
- name: Install requirements
3542
run: ./deps.sh
3643

3744
- name: Install metrics
38-
run: tarantoolctl rocks install metrics 0.12.0
45+
run: tt rocks install metrics 0.12.0
3946

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

.github/workflows/test_on_push.yaml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ jobs:
5353
run: |
5454
sudo patch -p1 /usr/share/tarantool/luarocks/manif.lua luarocks.patch
5555
56+
- name: Setup tt
57+
run: |
58+
curl -L https://tarantool.io/release/2/installer.sh | bash
59+
sudo apt-get update
60+
sudo apt-get install -y tt
61+
tt version
62+
5663
- name: Install requirements for community
5764
run: |
5865
tarantool --version
@@ -62,7 +69,7 @@ jobs:
6269

6370
- name: Install metrics
6471
if: matrix.metrics-version != ''
65-
run: tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
72+
run: tt rocks install metrics ${{ matrix.metrics-version }}
6673

6774
- name: Remove external merger if needed
6875
if: ${{ matrix.remove-merger }}
@@ -106,8 +113,15 @@ jobs:
106113
tarantool --version
107114
./deps.sh
108115
116+
- name: Setup tt
117+
run: |
118+
curl -L https://tarantool.io/release/2/installer.sh | bash
119+
sudo apt-get update
120+
sudo apt-get install -y tt
121+
tt version
122+
109123
- name: Install metrics
110-
run: tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
124+
run: tt rocks install metrics ${{ matrix.metrics-version }}
111125

112126
# This server starts and listen on 8084 port that is used for tests
113127
- name: Stop Mono server
@@ -133,6 +147,13 @@ jobs:
133147
steps:
134148
- uses: actions/checkout@master
135149

150+
- name: Setup tt
151+
run: |
152+
curl -L https://tarantool.io/release/2/installer.sh | bash
153+
sudo apt-get update
154+
sudo apt-get install -y tt
155+
tt version
156+
136157
- name: Install requirements for enterprise
137158
run: |
138159
curl -O -L https://tarantool:${{ secrets.DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/release/linux/x86_64/${{ matrix.tarantool-version.folder }}/${{ matrix.tarantool-version.bundle }}.tar.gz
@@ -145,9 +166,7 @@ jobs:
145166
146167
- name: Install metrics
147168
if: matrix.metrics-version != ''
148-
run: |
149-
source tarantool-enterprise/env.sh
150-
tarantoolctl rocks install metrics ${{ matrix.metrics-version }}
169+
run: tt rocks install metrics ${{ matrix.metrics-version }}
151170

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

deps.sh

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,26 @@
33

44
set -e
55

6+
TTCTL=""
7+
if command -v tt; then
8+
TTCTL=tt
9+
elif command -v "$TTCTL"; then
10+
TTCTL="$TTCTL"
11+
else
12+
printf "tt or "$TTCTL" is required" 1>&2
13+
exit 1
14+
fi
15+
616
# 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
17+
"$TTCTL" rocks install luatest 0.5.7
18+
"$TTCTL" rocks install luacheck 0.25.0
19+
"$TTCTL" rocks install luacov 0.13.0
1020

1121
# 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
22+
"$TTCTL" rocks install https://raw.githubusercontent.com/mpeterv/cluacov/master/cluacov-scm-1.rockspec
23+
"$TTCTL" rocks install https://raw.githubusercontent.com/LuaDist/dkjson/master/dkjson-2.5-2.rockspec
24+
"$TTCTL" rocks install https://raw.githubusercontent.com/keplerproject/luafilesystem/master/luafilesystem-scm-1.rockspec
25+
"$TTCTL" rocks install https://raw.githubusercontent.com/moteus/lua-path/master/rockspecs/lua-path-scm-0.rockspec
1626

1727
# Most of this code is the workaround for
1828
# https://github.com/moteus/luacov-coveralls/pull/30
@@ -22,14 +32,14 @@ LUACOV_COVERALLS_ROCKSPEC_URL="https://raw.githubusercontent.com/moteus/luacov-c
2232
LUACOV_COVERALLS_ROCKSPEC_FILE="${TMPDIR}/luacov-coveralls-scm-0.rockspec"
2333
curl -fsSL "${LUACOV_COVERALLS_ROCKSPEC_URL}" > "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2434
sed -i -e 's@git://@git+https://@' "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
25-
tarantoolctl rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
35+
"$TTCTL" rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2636
rm "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2737
rmdir "${TMPDIR}"
2838

2939
CARTRIDGE_VERSION="${CARTRIDGE_VERSION:-2.7.8}"
3040

31-
tarantoolctl rocks install cartridge "$CARTRIDGE_VERSION"
32-
tarantoolctl rocks install ddl 1.6.2
33-
tarantoolctl rocks install migrations 0.4.2
41+
"$TTCTL" rocks install cartridge "$CARTRIDGE_VERSION"
42+
"$TTCTL" rocks install ddl 1.6.2
43+
"$TTCTL" rocks install migrations 0.4.2
3444

35-
tarantoolctl rocks make
45+
"$TTCTL" rocks make

0 commit comments

Comments
 (0)