-
Notifications
You must be signed in to change notification settings - Fork 4
109 lines (96 loc) · 2.86 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
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
name: Continuous Integration
on: [push]
jobs:
format:
name: Format check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install black
run: cat tools/requirements_dev.txt | grep black | xargs pip install
- name: Format
run: tools/format.sh --checkonly
lint:
name: Lint check
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install pylint
run: cat tools/requirements_dev.txt | grep "pylint\|astroid" | xargs pip install
- name: Check
run: |
tools/lint.sh --version
tools/lint.sh
mypy:
name: mypy check
runs-on: macos-11
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install mypy
run: cat tools/requirements_dev.txt | grep "mypy\|torch" | xargs pip install
- name: Check
run: |
rm bluefoglite/common/tcp/message_pb2.py
tools/mypy.sh --version
tools/mypy.sh
ubuntu-unit-test:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bluefoglite
- name: Install BlueFogLite
run: |
conda install pip
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install .
cat tools/requirements_dev.txt | grep pytest | xargs pip install
- name: Unit Test
run: |
timeout 3m pytest -s -vv bluefoglite test
timeout 3m bflrun -np 4 pytest -s -vv test/allreduce_broadcast.py
macos-unit-test:
runs-on: macos-11
strategy:
matrix:
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v4
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: bluefoglite
- name: Install brew coreutils
run: brew install coreutils # for timeout command
- name: Install BlueFogLite
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install .
cat tools/requirements_dev.txt | grep pytest | xargs pip install
- name: Unit Test
run: |
timeout 3m pytest -s -vv bluefoglite test
timeout 3m bflrun -np 4 pytest -s -vv test/allreduce_broadcast.py