-
Notifications
You must be signed in to change notification settings - Fork 6
149 lines (143 loc) · 5.55 KB
/
buildtest.yml
File metadata and controls
149 lines (143 loc) · 5.55 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Build Test
# Builds and tests
on:
push:
branches:
- master
schedule:
# run weekly
- cron: '0 10 * * 4'
# needed to trigger the workflow manually
workflow_dispatch:
pull_request:
env:
# GitHub runners currently have 4 cores
NR_JOBS: "4"
jobs:
linux_tests:
name: Linux tests (${{ matrix.config.name }})
runs-on: ubuntu-latest
strategy:
matrix:
config:
- {name: "CI, intree, Debug",
base_image: "movesrwth/storm:ci-debug",
build_type: "Debug",
never_fetch_storm: "ON"
}
- {name: "CI, intree, Release",
base_image: "movesrwth/storm:ci",
build_type: "Release",
never_fetch_storm: "ON"
}
- {name: "Stable, intree, Debug",
base_image: "movesrwth/storm:stable-debug",
build_type: "Debug",
never_fetch_storm: "ON"
}
- {name: "Stable, intree, Release",
base_image: "movesrwth/storm:stable",
build_type: "Release",
never_fetch_storm: "ON"
}
- {name: "Debian 12, fetch, intree, Release",
base_image: "movesrwth/storm-basesystem:debian-12",
build_type: "Release",
never_fetch_storm: "OFF"
}
- {name: "Ubuntu 24.04, fetch, intree, Release",
base_image: "movesrwth/storm-basesystem:ubuntu-24.04",
build_type: "Release",
never_fetch_storm: "OFF"
}
steps:
- name: Git clone
uses: actions/checkout@v5
- name: Build project from Dockerfile
run: |
docker build -t movesrwth/storm-starter . \
--build-arg BASE_IMAGE=${{ matrix.config.base_image }} \
--build-arg build_type="${{ matrix.config.build_type }}" \
--build-arg never_fetch_storm="${{ matrix.config.never_fetch_storm }}" \
--build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/storm-starter
- name: Run and check output of example commands
run: |
docker exec ci bash -c "/opt/storm-project-starter-cpp/build/bin/starter-project /opt/storm-project-starter-cpp/examples/die.pm /opt/storm-project-starter-cpp/examples/die.pctl | grep 'no'"
docker exec ci bash -c "/opt/storm-project-starter-cpp/build/bin/starter-project /opt/storm-project-starter-cpp/examples/die.pm /opt/storm-project-starter-cpp/examples/die2.pctl | grep 'yes'"
mac_tests:
name: macOS Tests (${{ matrix.config.name }})
strategy:
matrix:
config:
- {name: "XCode Latest, Intel, fetch, intree, Release",
distro: "macos-15-intel",
xcode: "latest-stable",
build_type: "Release",
never_fetch_storm: "OFF"
}
- {name: "XCode 15.4, ARM, fetch, intree, Release",
distro: "macos-14",
xcode: "15.4",
build_type: "Release",
never_fetch_storm: "OFF"
}
- {name: "XCode Latest, ARM, fetch, intree, Debug",
distro: "macos-15",
xcode: "latest-stable",
build_type: "Debug",
never_fetch_storm: "OFF"
}
- {name: "XCode Latest, ARM, fetch, intree, Release",
distro: "macos-15",
xcode: "latest-stable",
build_type: "Release",
never_fetch_storm: "OFF"
}
runs-on: ${{ matrix.config.distro }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ matrix.config.xcode }}
- name: Git clone
uses: actions/checkout@v5
- name: Install dependencies
# cmake and gmp are already installed
run: |
brew update
brew install automake boost cln ginac glpk hwloc xerces-c z3
- name: Configure starter-project
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE="${{ matrix.config.build_type }}" -DNEVER_FETCH_STORM="${{ matrix.config.never_fetch_storm }}" ..
- name: Build starter-project
working-directory: ./build
run: make -j ${NR_JOBS}
- name: Run and check output of example commands
run: |
/bin/bash -c "./build/bin/starter-project examples/die.pm examples/die.pctl | grep 'no'"
/bin/bash -c "./build/bin/starter-project examples/die.pm examples/die2.pctl | grep 'yes'"
notify:
name: Email notification
runs-on: ubuntu-latest
needs: [linux_tests, mac_tests]
# Only run in main repo and even if previous step failed
if: github.repository_owner == 'moves-rwth' && always()
steps:
- uses: technote-space/workflow-conclusion-action@v3
- uses: dawidd6/action-send-mail@v6
with:
server_address: ${{ secrets.STORM_CI_MAIL_SERVER }}
server_port: 587
username: ${{ secrets.STORM_CI_MAIL_USERNAME }}
password: ${{ secrets.STORM_CI_MAIL_PASSWORD }}
subject: "[You broke it] CI run failed for ${{ github.repository }}"
body:
"CI job of ${{ github.repository }} has failed for commit ${{ github.sha }}.\n\
The error type is: ${{ env.WORKFLOW_CONCLUSION }}.\n\n\
For more information, see https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
to: ${{ secrets.STORM_CI_MAIL_RECIPIENTS }}
from: Github Actions <you-broke-it@stormchecker.org>
if: env.WORKFLOW_CONCLUSION != 'success' # notify only if failure