-
Notifications
You must be signed in to change notification settings - Fork 13
145 lines (125 loc) · 4.42 KB
/
fast_testing.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: fast_testing
on:
push:
pull_request:
workflow_dispatch:
jobs:
linux:
# We want to run on external PRs, but not on our own internal
# PRs as they'll be run by the push to the branch.
#
# The main trick is described here:
# https://github.com/Dart-Code/Dart-Code/pull/2375
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix:
tarantool:
- '1.10'
- '2.4'
- '2.5'
- '2.6'
- '2.7'
- '2.8'
- '2.10'
cartridge-version:
- ''
- '2.7.4'
metrics-version:
- ''
- '0.10.0'
- '0.11.0'
- '0.13.0'
coveralls: [false]
include:
- tarantool: '2.10'
cartridge-version: '2.7.4'
metrics-version: '0.13.0'
coveralls: true
- tarantool: 'debug-master'
cartridge-version: ''
metrics-version: '0.13.0'
coveralls: false
env:
TNT_DEBUG_PATH: /home/runner/tnt-debug
runs-on: ubuntu-20.04
steps:
- name: Install tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') != true
uses: tarantool/setup-tarantool@v1
with:
tarantool-version: ${{ matrix.tarantool }}
- name: Create variables for Tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug')
run: |
branch=$(echo ${{ matrix.tarantool }} | cut -d- -f2)
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch ${branch} | head -c 8)
echo "TNT_BRANCH=${branch}" >> $GITHUB_ENV
echo "VERSION_POSTFIX=-${commit_hash}" >> $GITHUB_ENV
shell: bash
- name: Cache tarantool build
if: startsWith(matrix.tarantool, 'debug')
id: cache-tnt-debug
uses: actions/cache@v3
with:
path: ${{ env.TNT_DEBUG_PATH }}
key: cache-tnt-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}
- name: Clone tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: tarantool/tarantool
ref: ${{ env.TNT_BRANCH }}
path: tarantool
fetch-depth: 0
submodules: true
- name: Build tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug') && steps.cache-tnt-debug.outputs.cache-hit != 'true'
run: |
sudo apt-get -y install git build-essential cmake make zlib1g-dev \
libreadline-dev libncurses5-dev libssl-dev \
libunwind-dev libicu-dev python3 python3-yaml \
python3-six python3-gevent
cd ${GITHUB_WORKSPACE}/tarantool
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_DIST=ON
make
make DESTDIR=${TNT_DEBUG_PATH} install
- name: Install tarantool ${{ matrix.tarantool }}
if: startsWith(matrix.tarantool, 'debug')
run: |
sudo cp -rvP ${TNT_DEBUG_PATH}/usr/local/* /usr/local/
- name: Clone the module
uses: actions/checkout@v3
- name: Cache rocks
uses: actions/cache@v3
id: cache-rocks
with:
path: .rocks/
key: "cache-rocks-${{ matrix.tarantool }}${{ env.VERSION_POSTFIX }}-\
${{ matrix.cartridge-version }}-\
${{ matrix.metrics-version }}"
- name: Setup tt
run: |
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
sudo apt install -y tt
tt version
- name: Install requirements
run: make deps
if: steps.cache-rocks.outputs.cache-hit != 'true'
- name: Install metrics
if: matrix.metrics-version != ''
run: |
tt rocks install metrics ${{ matrix.metrics-version }}
- name: Install cartridge
if: matrix.cartridge-version != ''
run: |
tt rocks install cartridge ${{ matrix.cartridge-version }}
- run: echo $PWD/.rocks/bin >> $GITHUB_PATH
- run: make check
- run: make coverage
- name: Send code coverage to coveralls.io
run: make coveralls
if: ${{ matrix.coveralls }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}