-
Notifications
You must be signed in to change notification settings - Fork 29
171 lines (151 loc) · 4.95 KB
/
ci-build.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
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: CI testing
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux-build:
name: 'Linux ${{matrix.cc.cc}}-${{ matrix.cc.v}} ${{matrix.build_type}}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type:
- Release
- Debug
sylvan_stats:
- ON
- OFF
cc:
- { cc: gcc, v: 9, cxx: g++}
- { cc: gcc, v: 12, cxx: g++}
- { cc: clang, v: 11, cxx: clang++ }
- { cc: clang, v: 15, cxx: clang++ }
env:
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}}
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}}
steps:
- uses: actions/checkout@v3
- name: Install packages
run: |
sudo apt update
sudo apt install cmake cmake-data build-essential
sudo apt install libgmp-dev
- name: Install CLang
if: matrix.cc.cc == 'clang'
run: |
sudo apt install clang-${{matrix.cc.v}}
- name: Install GCC
if: matrix.cc.cc == 'gcc'
run: |
sudo apt install gcc-${{matrix.cc.v}} g++-${{matrix.cc.v}}
- name: CMake Build
run: |
export CC=${{env.cc}}
export CXX=${{env.cxx}}
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSYLVAN_STATS=${{matrix.sylvan_stats}} -DSYLVAN_BUILD_EXAMPLES=ON
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: |
ctest -C ${{ matrix.build_type }} -VV --timeout 30
examples/simple
examples/nqueens -w 2 9 | tee /dev/fd/2 | grep -q "352 solutions"
examples/bddmc ../models/schedule_world.2.bdd -w 2 | tee /dev/fd/2 | grep -q "1570340"
examples/lddmc ../models/blocks.2.ldd -w 2 | tee /dev/fd/2 | grep -q "7057 states"
macos-build:
name: 'OSX ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}} ${{matrix.build_type}}'
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
build_type:
- Release
- Debug
sylvan_stats:
- ON
- OFF
cc:
- { cc: gcc, v: 11, cxx: g++, xcode: latest }
- { cc: clang, cxx: clang++, xcode: 12.5 }
- { cc: clang, cxx: clang++, xcode: 13.4 }
env:
cc: ${{matrix.cc.cc}}-${{matrix.cc.v}}
cxx: ${{matrix.cc.cxx}}-${{matrix.cc.v}}
steps:
- uses: actions/checkout@v3
- name: Install packages
run: |
brew update
if ["${{matrix.cc.cc}}" == "gcc"];
then
brew install ${{matrix.cc.cc}}@${{matrix.cc.v}}
fi
brew install gawk
brew install argp-standalone
- name: CMake Build
run: |
if [ "${{ matrix.cc.cc }}" == "gcc" ] ;
then
export CC=/usr/bin/${{matrix.cc.cc}}
export CXX=/usr/bin/${{matrix.cc.cxx}}
else
export CC=${{matrix.cc.cc}}
export CXX=${{matrix.cc.cxx}}
fi
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DSYLVAN_STATS=${{matrix.sylvan_stats}} -DSYLVAN_BUILD_EXAMPLES=ON
cmake --build ${{github.workspace}}/build --config ${{matrix.build_type}}
- name: Test
working-directory: ${{github.workspace}}/build
run: |
ctest -C ${{ matrix.build_type }} -VV --timeout 30
examples/simple
examples/nqueens -w 2 9 | tee /dev/fd/2 | grep -q "352 solutions"
examples/bddmc ../models/schedule_world.2.bdd -w 2 | tee /dev/fd/2 | grep -q "1570340"
examples/lddmc ../models/blocks.2.ldd -w 2 | tee /dev/fd/2 | grep -q "7057 states"
windows-build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
# - { icon: '⬛', sys: mingw32 }
- { icon: '🟦', sys: mingw64 }
- { icon: '🟨', sys: ucrt64 }
- { icon: '🟧', sys: clang64 }
name: 🚧${{ matrix.icon }} ${{ matrix.sys }}
defaults:
run:
shell: msys2 {0}
steps:
- name: '🧰 Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: '${{ matrix.icon }} Setup MSYS2'
uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
make
gmp
libargp-devel
pacboy: >-
toolchain:p
cmake:p
ninja:p
- name: '🚧 Build TOOL'
run: |
cmake -G Ninja -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Test
working-directory: ${{github.workspace}}/build
run: |
ctest -C ${{ matrix.build_type }} -VV --timeout 30
examples/simple
examples/nqueens -w 2 9 | tee >(cat 1>&2) | grep -q "352 solutions"
examples/bddmc ../models/schedule_world.2.bdd -w 2 | tee >(cat 1>&2) | grep -q "1570340"
examples/lddmc ../models/blocks.2.ldd -w 2 | tee >(cat 1>&2) | grep -q "7057 states"