-
Notifications
You must be signed in to change notification settings - Fork 26
52 lines (52 loc) · 1.8 KB
/
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
name: Integration
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-12]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Ubuntu dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y build-essential cmake qtbase5-dev libblas-dev liblapack-dev
sudo apt install -y libopenblas-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev
sudo apt install -y libvtk7-dev openmpi-bin libopenmpi-dev
sudo apt install -y lcov
- name: Install MacOS dependencies
if: startsWith(matrix.os, 'macos')
run: |
brew install cmake vtk openblas lapack mesa open-mpi qt
brew install lcov
sudo ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs
sudo ln -s /usr/local/opt/qt5/plugins /usr/local/plugins
- name: Build svFSIplus
run: |
mkdir build
cd build
cmake -DENABLE_COVERAGE=ON ..
make -j2
- name: Install test dependencies
run: |
conda create -n svfsiplus python=3.9
conda run -n svfsiplus pip install pytest pytest-cov pytest-mock numpy meshio pandas
- name: Run integration tests
run: |
git lfs pull
cd tests
conda run -n svfsiplus pytest -v --durations=0
- name: Generate code coverage
if: startsWith(matrix.os, 'ubuntu-22.04')
run: |
cd build/svFSI-build
make coverage
- name: Save coverage report
if: startsWith(matrix.os, 'ubuntu-22.04')
uses: actions/upload-artifact@v3
with:
name: coverage_report
path: build/svFSI-build/coverage