-
Notifications
You must be signed in to change notification settings - Fork 76
68 lines (63 loc) · 1.92 KB
/
python.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
name: Python
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"]
compiler: ["gcc", "clang"]
build_type: ["Debug", "Release"]
steps:
- uses: actions/checkout@v2
- name: Setup system dependencies
run: |
sudo apt-get update
sudo apt-get -y install valgrind memcached g++
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyver }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools future pytest greenify gevent numpy
- name: Start memcached servers
run: ./misc/memcached_server startall
- name: Run unittest
run: |
if [[ ${{ matrix.compiler }} = "gcc" ]]; then export CC=gcc CXX=g++; fi
if [[ ${{ matrix.compiler }} = "clang" ]]; then export CC=clang CXX=clang++; fi
./misc/travis/unittest.sh
- name: Stop memcached servers
run: ./misc/memcached_server stopall
benchmark:
runs-on: ubuntu-latest
strategy:
matrix:
pyver: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v2
- name: Setup system dependencies
run: |
sudo apt-get update
sudo apt-get -y install memcached libmemcached-dev g++
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pyver }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools future python-memcached pylibmc
- name: Start memcached servers
run: ./misc/memcached_server start
- name: Run benchmark
run: |
./misc/travis/benchmark.sh
- name: Stop memcached servers
run: ./misc/memcached_server stop