Skip to content

Commit 20b2404

Browse files
committed
WIP: ci: use setup-tarantool action on Linux
It speed ups tarantool installation using GitHub's cache infrastructure. We have no support of Mac OS in the action at the moment, so left it as is for now.
1 parent 29dd581 commit 20b2404

File tree

1 file changed

+7
-41
lines changed

1 file changed

+7
-41
lines changed

.github/workflows/testing.yml

Lines changed: 7 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: testing
33
on: [push, pull_request]
44

55
# TODO: Run testing using luarocks installed module.
6-
# TODO: Use caching of fixed tarantool versions or improve
7-
# setup-tarantool to use it here.
86

97
jobs:
108
testing_linux:
@@ -63,52 +61,20 @@ jobs:
6361

6462
runs-on: ubuntu-latest
6563
steps:
66-
- name: Export T_* environment variables
64+
- name: Export T_VERSION environment variable
6765
run: |
68-
# Split ${{ matrix.tarantool }}.
66+
# Extract the part after '/'.
6967
T="${{ matrix.tarantool }}"
70-
T_KIND="${T%%/*}"
7168
T_VERSION="${T##*/}"
72-
if [ "${T_KIND}" = release ]; then
73-
T_SERIES="${T_VERSION%.*}"
74-
else
75-
T_SERIES="${T_VERSION}"
76-
fi
7769
78-
# Make the variables available for the next steps.
79-
printf '%s=%s\n' T_KIND "${T_KIND}" >> "${GITHUB_ENV}"
70+
# Make the variable available for the next steps.
8071
printf '%s=%s\n' T_VERSION "${T_VERSION}" >> "${GITHUB_ENV}"
81-
printf '%s=%s\n' T_SERIES "${T_SERIES}" >> "${GITHUB_ENV}"
82-
83-
- name: Setup tarantool ${{ env.T_SERIES }} repository
84-
run: |
85-
URL="https://tarantool.io/${T_KIND}/${T_SERIES}/installer.sh"
86-
curl -fsSL "${URL}" > installer.sh
87-
chmod a+x installer.sh
88-
sudo ./installer.sh
8972
9073
- name: Install tarantool ${{ matrix.tarantool }}
91-
run: |
92-
# Install tarantool.
93-
#
94-
# We don't use tarantool/setup-tarantool GitHub Action
95-
# at the moment due to several reasons:
96-
#
97-
# 1. No way to install a non-last tarantool version from
98-
# a repository:
99-
# https://github.com/tarantool/setup-tarantool/issues/15
100-
# 2. No way to install a live package:
101-
# https://github.com/tarantool/setup-tarantool/issues/9
102-
# 3. We likely will install tarantool in a container
103-
# job and it'll require support from the action side:
104-
# https://github.com/tarantool/setup-tarantool/issues/11
105-
sudo apt-get install -y "tarantool=${T_VERSION}*" "tarantool-dev=${T_VERSION}*"
106-
107-
- name: Verify tarantool version
108-
run: |
109-
# Workaround https://github.com/tarantool/tarantool/issues/4983
110-
# Workaround https://github.com/tarantool/tarantool/issues/5040
111-
tarantool -e "require('fiber').sleep(0) assert(_TARANTOOL:startswith('${T_VERSION}'), _TARANTOOL) os.exit()"
74+
uses: tarantool/setup-tarantool@b82932abca5bab03fd77b7b9f5de7ed17f1fd204
75+
with:
76+
tarantool-version: '${{ env.T_VERSION }}'
77+
nightly-build: ${{ startsWith(matrix.tarantool, 'live/') }}
11278

11379
- name: Install build dependencies for the module
11480
run: sudo apt-get install -y libcurl4-openssl-dev

0 commit comments

Comments
 (0)