You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/ci.yml
+65-40
Original file line number
Diff line number
Diff line change
@@ -4,61 +4,86 @@ on:
4
4
push:
5
5
branches:
6
6
- master
7
-
8
7
pull_request:
9
8
10
9
jobs:
11
-
12
-
# try to build SIPNET on Ubuntu & MacOS
10
+
# Build and Integration Test
13
11
build:
14
12
strategy:
15
13
fail-fast: false
16
14
matrix:
17
-
OS:
15
+
OS:
18
16
- macos-latest
19
17
- ubuntu-latest
20
18
- ubuntu-20.04
21
-
22
19
runs-on: ${{ matrix.OS }}
23
20
24
21
steps:
25
-
# checkout source code
26
-
- uses: actions/checkout@v2
22
+
# checkout source code
23
+
- uses: actions/checkout@v2
27
24
28
-
# install doxygen
29
-
- name: Install Doxygen
30
-
run: |
31
-
if [[ "$RUNNER_OS" == "Linux" ]]; then
32
-
sudo apt-get install doxygen -y
33
-
elif [[ "$RUNNER_OS" == "macOS" ]]; then
34
-
brew install --formula doxygen
35
-
fi
25
+
# install doxygen
26
+
- name: Install Doxygen
27
+
run: |
28
+
if [[ "$RUNNER_OS" == "Linux" ]]; then
29
+
sudo apt-get install doxygen -y
30
+
elif [[ "$RUNNER_OS" == "macOS" ]]; then
31
+
brew install --formula doxygen
32
+
fi
36
33
37
-
# compile SIPNET
38
-
- name: compile sipnet
39
-
run: make
34
+
# compile SIPNET
35
+
- name: compile sipnet
36
+
run: make
37
+
38
+
# remove existing test output file
39
+
- name: Remove Niwout Output File
40
+
run: rm Sites/Niwot/niwot.out
41
+
42
+
# run single sipnet run
43
+
- name: Run SIPNET on Sites/Niwot/niwot
44
+
run: ./sipnet
45
+
46
+
# check for correct output of Niwot run
47
+
- name: Check if niwot.out is generated
48
+
shell: bash
49
+
run: |
50
+
if [ ! -f Sites/Niwot/niwot.out ]; then
51
+
echo "::error title={No Output}::Test run for Niwot site failed to produce output"
52
+
exit 1
53
+
fi
54
+
55
+
# Check if niwot.out has changed
56
+
- name: Check whether niwot.out has changed
57
+
shell: bash
58
+
run: |
59
+
if git diff --exit-code Sites/Niwot/niwot.out; then
60
+
echo "Success: Niwot.out created and has not changed"
61
+
else
62
+
echo "::error title={Output Changed}::The test file niwot.out has changed. This is expected to fail with some changes to SIPNET. When this happens, assess correctness and then update the reference niwot.out."
0 commit comments