-
Notifications
You must be signed in to change notification settings - Fork 12
88 lines (86 loc) · 2.41 KB
/
benchmark-build.yml
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
name: Build and Test All
on:
push:
branches: [ main, test-ready, "*-bugfix" ]
pull_request:
branches: [ main, test-ready, "*-bugfix" ]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
ev-lib: [libev, libuv, libevent]
env:
LIBYAML_VERSION: 0.2.5
LIBCHECK_VERSION: 0.15.2
steps:
- name: Install event libs
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install -y libevent-dev libev-dev libuv1-dev libyaml-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
brew update
brew install libuv libev libevent automake
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: install lcov
run: |
wget "https://github.com/linux-test-project/lcov/archive/refs/tags/v1.16.zip"
unzip v1.16.zip
cd lcov-1.16
sudo make install
- name: Download libcheck
uses: actions/checkout@v3
with:
repository: libcheck/check
submodules: recursive
ref: ${{ env.LIBCHECK_VERSION }}
path: check-${{ env.LIBCHECK_VERSION }}
- name: Cache libcheck
id: cache-libcheck
uses: actions/cache@v3
env:
cache-name: libcheck
with:
path: check-${{ env.LIBCHECK_VERSION }}
key: check-${{ env.LIBCHECK_VERSION }}-v2-${{ runner.os }}
- name: Build libcheck
id: build-libcheck
if: steps.cache-libcheck.outputs.cache-hit != 'true'
run: |
cd check-${{ env.LIBCHECK_VERSION }}
autoreconf -i
./configure
make
make check
- name: install libcheck
run: |
cd check-${{ env.LIBCHECK_VERSION }}
sudo make install
sudo ldconfig
- name: Checkout asbench
uses: actions/checkout@v3
with:
path: main
submodules: recursive
- name: Info
run: make info
working-directory: main
- name: Build asbench
run: make EVENT_LIB=${{ matrix.ev-lib }}
working-directory: main
- name: Test
run: make coverage-all EVENT_LIB=${{ matrix.ev-lib }}
working-directory: main
- name: clear temp directories
run: |
rm -rf client
rm -rf main/target
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
verbose: false
directory: main/test_target
files: main/test_target/aerospike-benchmark-all.info