-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (46 loc) · 1.27 KB
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
# try to build SIPNET on Windows, Ubuntu, MacOS
build:
strategy:
fail-fast: false
matrix:
OS:
- macos-latest
- ubuntu-latest
- ubuntu-20.04
- windows-latest
runs-on: ${{ matrix.OS }}
steps:
# checkout source code
- uses: actions/checkout@v2
# compile sipnet
- name: compile sipnet
run: make
# remove existing test output file
- name: Remove Niwout Output File
run: rm Sites/Niwot/niwot.out
# run single sipnet run
- name: sipnet on Sites/Niwot/niwot
run: ./sipnet
# check output of test
- name: fail if no niwot output exists
if: ${{ hashFiles('Sites/Niwot/niwot.out') == '' }}
run: |
echo "::error title={No Output}::Test run for Niwot site failed to produce output"
exit 1
# check whether niwot.out has changed
- name: Check whether niwot.out has changed
shell: bash
run: |
if git diff --exit-code Sites/Niwot/niwot.out; then
echo "Success: Niwot.out created and has not changed"
else
echo "::error title={Output Changed}::The test file niwot.out has changed"
exit 1
fi