Skip to content

Commit 0e77f88

Browse files
authored
Only test ubuntu-latest (#344)
* only test ubuntu-latest * run ubuntu-latest on ubuntu-22.04 container * fix container name
1 parent c3fac1e commit 0e77f88

File tree

2 files changed

+62
-75
lines changed

2 files changed

+62
-75
lines changed

.github/workflows/test_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: macOS
1+
name: macos-latest
22
on: [push, pull_request]
33
jobs:
44
test:

.github/workflows/test_ubuntu.yml

Lines changed: 61 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,66 @@
1-
name: test Ubuntu
1+
name: ubuntu-latest
22
on: [push, pull_request]
33
jobs:
4-
test:
5-
strategy:
6-
matrix:
7-
name: [Ubuntu-20.04, Ubuntu-22.04]
8-
include:
9-
- name: Ubuntu-20.04
10-
version: ubuntu-20.04
11-
image: ubuntu20
12-
- name: Ubuntu-22.04
13-
version: ubuntu-22.04
14-
image: ubuntu22
15-
runs-on: ${{ matrix.version }}
16-
container: simvascular/libraries:${{ matrix.image }}
17-
steps:
18-
- uses: actions/checkout@v4
19-
- name: Build svZeroDSolver
20-
shell: bash
21-
run: |
22-
conda init
23-
source /conda/etc/profile.d/conda.sh
24-
conda activate svmultiphysics
25-
git clone https://github.com/SimVascular/svZeroDSolver.git
26-
cd svZeroDSolver
27-
mkdir build
28-
cd build
29-
cmake ..
30-
make -j2
31-
- name: Build svMultiPhysics
32-
run: |
33-
if [ -d "build" ]; then
34-
rm -rf "build"
35-
fi
36-
mkdir build
37-
cd build
38-
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_USE_TRILINOS:BOOL=ON ..
39-
make -j2
40-
cd ..
41-
- name: Build svMultiPhysics (PETSc)
42-
run: |
43-
if [ -d "build-petsc" ]; then
44-
rm -rf "build-petsc"
45-
fi
46-
mkdir build-petsc
47-
cd build-petsc
48-
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_PETSC_DIR:STRING=/petsc ..
49-
make -j2
50-
cd ..
51-
- name: Run integration tests
52-
run: |
53-
git config --global --add safe.directory /__w/svMultiPhysics/svMultiPhysics
54-
git lfs pull
55-
cd tests
56-
conda run -n svmultiphysics pytest -rPv --durations=0
57-
- name: Run unit tests
58-
run: |
59-
cd build/svMultiPhysics-build/Source/solver
60-
ctest --verbose
61-
- name: Generate code coverage
62-
if: ${{ matrix.version == 'ubuntu-22.04' }}
63-
run: |
64-
cd build/svMultiPhysics-build
65-
make coverage
66-
- name: Save coverage report
67-
if: ${{ matrix.version == 'ubuntu-22.04' }}
68-
uses: actions/upload-artifact@v4
69-
with:
70-
name: coverage_report
71-
path: build/svMultiPhysics-build/coverage
72-
- name: Upload coverage reports to Codecov
73-
if: ${{ matrix.version == 'ubuntu-22.04' }}
74-
uses: codecov/codecov-action@v5
75-
env:
76-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4+
test:
5+
runs-on: ubuntu-latest
6+
container: simvascular/libraries:ubuntu22
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Build svZeroDSolver
10+
shell: bash
11+
run: |
12+
conda init
13+
source /conda/etc/profile.d/conda.sh
14+
conda activate svmultiphysics
15+
git clone https://github.com/SimVascular/svZeroDSolver.git
16+
cd svZeroDSolver
17+
mkdir build
18+
cd build
19+
cmake ..
20+
make -j2
21+
- name: Build svMultiPhysics
22+
run: |
23+
if [ -d "build" ]; then
24+
rm -rf "build"
25+
fi
26+
mkdir build
27+
cd build
28+
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_USE_TRILINOS:BOOL=ON ..
29+
make -j2
30+
cd ..
31+
- name: Build svMultiPhysics (PETSc)
32+
run: |
33+
if [ -d "build-petsc" ]; then
34+
rm -rf "build-petsc"
35+
fi
36+
mkdir build-petsc
37+
cd build-petsc
38+
cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON -DSV_PETSC_DIR:STRING=/petsc ..
39+
make -j2
40+
cd ..
41+
- name: Run integration tests
42+
run: |
43+
git config --global --add safe.directory /__w/svMultiPhysics/svMultiPhysics
44+
git lfs pull
45+
cd tests
46+
conda run -n svmultiphysics pytest -rPv --durations=0
47+
- name: Run unit tests
48+
run: |
49+
cd build/svMultiPhysics-build/Source/solver
50+
ctest --verbose
51+
- name: Generate code coverage
52+
run: |
53+
cd build/svMultiPhysics-build
54+
make coverage
55+
- name: Save coverage report
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: coverage_report
59+
path: build/svMultiPhysics-build/coverage
60+
- name: Upload coverage reports to Codecov
61+
uses: codecov/codecov-action@v5
62+
env:
63+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7764

7865

7966

0 commit comments

Comments
 (0)