-
Notifications
You must be signed in to change notification settings - Fork 17
103 lines (82 loc) · 2.4 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
# Workflow for continuous integration and testing
name: Continuous Integration
on:
push:
branches: [ '*' ]
pull_request:
branches: [ '*' ]
jobs:
ci:
runs-on: ${{ matrix.os }}
if: github.repository == 'ml4ai/delphi'
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Continuous Integration
env:
DELPHI_DB: /tmp/delphi.db
run: |
sudo apt-get update
sudo apt-get install -y\
libboost-all-dev\
pkg-config\
cmake\
curl\
git\
tar\
wget\
python3-dev\
python3-venv\
graphviz\
libgraphviz-dev\
libsqlite3-dev\
libeigen3-dev\
pybind11-dev\
libfmt-dev\
librange-v3-dev\
nlohmann-json3-dev
echo "### Checking whether we have OpenMP support"
echo |cpp -fopenmp -dM |grep -i open
pwd
echo "### Building Served from source"
curl -LO https://github.com/meltwater/served/archive/refs/tags/v1.6.0.tar.gz
tar -xzf v1.6.0.tar.gz
pushd served-1.6.0
mkdir build
cd build
cmake ..
sudo make -j `nproc` install
popd
# Download delphi.db
mkdir -p data && curl http://vanga.sista.arizona.edu/delphi_data/delphi.db -o $DELPHI_DB
echo "DELPHI_DB = $DELPHI_DB"
# Create a virtual environment
python3 -m venv delphi_venv
# Activate the virtual environment
source delphi_venv/bin/activate
# Install wheel
pip install wheel
# Install a version of pyparsing to fix a CI bug
pip install pyparsing==2.4.7
# Install delphi in editable mode
pip install -e .[test]
# Run the Python WM test suite
make test_wm
pwd
echo "### Building and running Python tests"
pwd
echo "### Building the Delphi REST API"
# Build the Delphi REST API server program
pushd build
cmake ..
make -j `nproc` delphi_rest_api
echo "### Running the Delphi REST API"
# Run the api as a background process
./delphi_rest_api &
popd
# Test the Delphi with Bash scripts
pushd tests/wm/scripts
./get_system_status
popd