-
Notifications
You must be signed in to change notification settings - Fork 13
36 lines (35 loc) · 1.07 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
name: Run Python Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
PMIP_CBC_LIBRARY: "/home/runner/build/dist/lib/libCbc.so"
steps:
- uses: actions/checkout@v3
- name: Install Python 3
uses: actions/setup-python@v4
with:
python-version: '3.9.x'
- name: Install dependencies
run: |
# python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Compile CBC binary
run : |
sudo apt-get install gcc g++ gfortran libgfortran-9-dev liblapack-dev libamd2 libcholmod3 libmetis-dev libsuitesparse-dev libnauty2-dev git
mkdir -p ~/build
cd ~/build
wget -nH https://raw.githubusercontent.com/coin-or/coinbrew/master/coinbrew
bash coinbrew fetch Cbc@master --no-prompt --skip-update
bash coinbrew build Cbc@stable/2.10 --no-prompt --tests=none
- name: Run tests with pytest
run: |
cd odtlearn/tests
pytest -v