-
-
Notifications
You must be signed in to change notification settings - Fork 14
167 lines (161 loc) · 5.84 KB
/
build-and-test.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build and Test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
setup_for_spack:
name: Run setup.py phases needed by spack
needs: [setup_test]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install & upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup.py phases needed by spack
run: |
python3 setup.py install_lib
python3 setup.py build_ext
setup_install:
name: Run setup install
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup install
run: python3 setup.py install --user
- name: Test install
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
python3 -c "import precice"
setup_install_single_version_externally_managed:
name: Run setup install --single-version-externally-managed (for spack)
needs: [setup_install]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
su root
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Install dependencies
run: |
pip3 install --user toml
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup install --single-version-externally-managed
run: python3 setup.py install --single-version-externally-managed --root=/
setup_test:
name: Run setup test
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Install OpenMPI, CMake, Boost library, Eigen and pkg-config
run: |
sudo apt-get -yy update
sudo apt-get install -y libopenmpi-dev cmake libboost-all-dev libeigen3-dev pkg-config
sudo rm -rf /var/lib/apt/lists/*
- uses: BSFishy/pip-action@v1
with:
packages: toml
- name: Checkout precice and make required files discoverable
run: |
git clone --branch develop https://github.com/precice/precice.git precice-core
mkdir -p precice
cp precice-core/src/precice/Participant.hpp precice/Participant.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.hpp
cp precice-core/src/precice/Tooling.hpp precice/Tooling.cpp
cd precice-core
mkdir build && cd build
cmake .. -DPRECICE_FEATURE_MPI_COMMUNICATION=OFF -DPRECICE_FEATURE_PETSC_MAPPING=OFF -DPRECICE_FEATURE_PYTHON_ACTIONS=OFF -DBUILD_TESTING=OFF
- name: Install dependencies
run: |
python3 -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | pip3 install -r /dev/stdin
- name: Run setup test
env:
PKG_CONFIG_PATH: "precice-core/build"
PKG_CONFIG_SYSTEM_INCLUDE_PATH: 1
run: |
export CFLAGS=-I$GITHUB_WORKSPACE
python3 setup.py test
pip_install:
name: Run pip install
needs: [setup_test]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Run pip install
run: pip3 install --user .
- name: Run pip install
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
python3 -c "import precice"
solverdummy_test:
name: Run solverdummy
needs: [setup_install, setup_test]
runs-on: ubuntu-latest
container:
image: precice/precice:develop
options: --user root
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Install pip3, pkgconfig and upgrade pip3
run: |
apt-get -yy update
apt-get install -y python3-pip pkg-config
rm -rf /var/lib/apt/lists/*
pip3 install --upgrade --user pip
- name: Run pip install
run: pip3 install --user .
- name: Run solverdummy
run: |
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
cd examples/solverdummy/
python3 solverdummy.py precice-config.xml SolverOne MeshOne & python3 solverdummy.py precice-config.xml SolverTwo MeshTwo