-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 2.37 KB
/
auto_pr_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
name: auto_pr_test
# This action is triggered:
# 1. when someone creates a pull request for a merge to the main branch
# 2. when changes are merged into the main branch (via a pull request)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Below are jobs, each of which runs sequentially.
jobs:
# This job builds the box model and runs our test suite.
build:
runs-on: ${{ matrix.os }}
container: coherellc/tdycore-petsc:c5e9cb18
# A build matrix storing all desired configurations.
strategy:
matrix:
os: [ubuntu-latest] #, macos-latest]
build-type: [Debug] #, Release]
# Steps for building and running tests.
steps:
- name: Checking out repository
uses: actions/checkout@v2
- name: Building TDycore (${{ matrix.build-type }})
run: |
grep PETSC_VERSION_GIT $PETSC_DIR/include/petscconf.h | sed -e s/#define\ //g
make -j codecov=1 V=1 all-gmake
- name: Running tests (${{ matrix.build-type }})
#if: github.event.pull_request.draft == false # skip for draft PRs
run: |
set +e # disable "fast fail" (continue on test failures)
num_failures=0
make unit-tests
num_failures=$(( $num_failures + $? ))
cd demo/richards
make V=1 codecov=1
cd ../steady
make V=1 codecov=1
cd ../th
make V=1 codecov=1
cd ../transient
make V=1 codecov=1 transient transient_mpfaof90 transient_snes_mpfaof90
cd ../../regression_tests
make test-steady
num_failures=$(( $num_failures + $? ))
make test-transient-mpfaof90
num_failures=$(( $num_failures + $? ))
make test-transient-snes-mpfaof90
num_failures=$(( $num_failures + $? ))
#make test-richards
#num_failures=$(( $num_failures + $? ))
#make test-th
#num_failures=$(( $num_failures + $? ))
cd ..
cat regression_tests/*testlog
test $num_failures -eq 0
- name: Evaluating test coverage
#if: github.event.pull_request.draft == false # skip for draft PRs
run: |
lcov --capture --directory . --output-file coverage.info
lcov --list coverage.info # debug info
curl -s https://codecov.io/bash > .codecov
chmod +x .codecov
./.codecov
#bash <(curl -s https://codecov.io/bash -f coverage.info)