-
-
Notifications
You must be signed in to change notification settings - Fork 16
71 lines (57 loc) · 1.61 KB
/
ci.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
name: bitproto ci
env:
TZ: Asia/Shanghai
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04]
python: [3.7, 3.8, "3.10", "3.11"]
go: ["1.19", "1.16"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- uses: actions/checkout@v2
- name: Set up Golang ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Install bitproto compiler
run: |
pip install -e ./compiler
- name: Install bitproto python lib
run: |
pip install -e ./lib/py
- name: Install dev requirements
run: |
pip install -r compiler/requirements_dev.txt
pip install -r lib/py/requirements_dev.txt
if: "matrix.python == '3.11'"
- name: Install tests requirements
run: |
pip install -r tests/requirements_tests.txt
- name: Install clang-format 11.0
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
sudo apt update
sudo apt-get install clang-format-11 -y
if: "matrix.python == '3.11'"
- name: Run lints
run: |
make lint CLANG_FORMAT=clang-format-11
if: "matrix.python == '3.11'"
- name: Run tests
run: |
make test --no-print-directory -s