-
Notifications
You must be signed in to change notification settings - Fork 2
133 lines (131 loc) · 4.64 KB
/
test_with_simple_model.yaml
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: C++ Test Simple Model
on: [push, workflow_dispatch]
jobs:
Test_Simple_Model:
name: Build Ubuntu Simple Model
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
architecture: "x64"
- name: Install graphviz
run: |
sudo apt update
sudo apt-get install graphviz
sudo apt-get install -y gnuplot
- name: Install local registry
run: curl -fsSL https://data.scrc.uk/static/localregistry.sh | /bin/bash -s -- -b main
- name: Checkout C++ Simple Model
uses: actions/checkout@v2
with:
repository: FAIRDataPipeline/cppSimpleModel
path: cppSimpleModel
- name: Checkout C Simple Model
uses: actions/checkout@v2
with:
repository: PlasmaFAIR/cDataPipelineSimpleModel
path: cSimpleModel
- name: Move simpleModel
run: |
mv cppSimpleModel ../cppSimpleModel
mv cSimpleModel ../cSimpleModel
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install Dependencies
run: |
sudo apt install -y lcov curl libcurl4-openssl-dev libyaml-cpp-dev
- name: Build and run seirs example
run: |
cd ../cppSimpleModel
python3 -m venv venv
source venv/bin/activate
pip3 install fair-cli
cmake -Bbuild -DCPPDATAPIPELINEREF="heads/${GITHUB_REF/refs\/heads\//}"
cmake --build build
fair init --ci --local
fair pull --local data/seirs_config.yaml
fair run --local data/seirs_config.yaml
if: startsWith(github.ref, 'refs/tags/') != true
- name: Build and run seirs example on tagged release
run: |
cd ../cppSimpleModel
python3 -m venv venv
source venv/bin/activate
pip3 install fair-cli
cmake -Bbuild -DCPPDATAPIPELINEREF="tags/${GITHUB_REF/refs\/tags\//}"
cmake --build build
fair init --ci --local
fair pull --local data/seirs_config.yaml
fair run --local data/seirs_config.yaml
if: startsWith(github.ref, 'refs/tags/')
- name: Build and run seirs example using C API
run: |
cd ../cSimpleModel
python3 -m venv venv
source venv/bin/activate
pip3 install fair-cli
cmake -Bbuild -DCPPDATAPIPELINEREF="heads/${GITHUB_REF/refs\/heads\//}"
cmake --build build
fair init --ci --local
fair pull --local data/config.yaml
fair run --local data/config.yaml
if: startsWith(github.ref, 'refs/tags/') != true
- name: Build and run seirs example using C API on tagged release
run: |
cd ../cSimpleModel
python3 -m venv venv
source venv/bin/activate
pip3 install fair-cli
cmake -Bbuild -DCPPDATAPIPELINEREF="tags/${GITHUB_REF/refs\/tags\//}"
cmake --build build
fair init --ci --local
fair pull --local data/config.yaml
fair run --local data/config.yaml
if: startsWith(github.ref, 'refs/tags/')
Build_simple_model_from_install:
name: Build Ubuntu simple model from install
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Build
run: |
cmake -B build -DCMAKE_INSTALL_PREFIX=../install
cmake --build build --target install
- name: Install graphviz
run: |
sudo apt update
sudo apt-get install graphviz
sudo apt-get install -y gnuplot
- name: Checkout C++ SimpleModel
uses: actions/checkout@v3
with:
repository: FAIRDataPipeline/cppSimpleModel
path: cppSimpleModel
- name: Checkout C SimpleModel
uses: actions/checkout@v3
with:
repository: PlasmaFAIR/cDataPipelineSimpleModel
path: cSimpleModel
- name: Move Simple Model dirs
run: |
mv cppSimpleModel ../cppSimpleModel
mv cSimpleModel ../cSimpleModel
- name: Build cpp Simple Model
run: |
cd ../cppSimpleModel
cmake -B build -DCMAKE_INSTALL_PREFIX=../install -DFDPAPI_NO_FETCHCONTENT=ON
cmake --build build
- name: Build C Simple Model
run: |
cd ../cSimpleModel
cmake -B build -DCMAKE_INSTALL_PREFIX=../install -DFDPAPI_NO_FETCHCONTENT=ON
cmake --build build