-
-
Notifications
You must be signed in to change notification settings - Fork 0
199 lines (153 loc) · 5.96 KB
/
tests.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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
name: Tests
on:
push:
branches: [ "*", "!gh-pages" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
modeling:
name: "Modeling Interface"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Eigen
run: wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
- name: Install Eigen
run: tar -xvf eigen*.tar.bz2 && rm eigen*.tar.bz2 && find . -depth -type d -name eigen-* -execdir mv {} ${{github.workspace}}/Eigen \;
- name: Install lcov
run: sudo apt-get install lcov
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTS=YES -DWITH_TEST_COVERAGE=YES -DUSE_EIGEN=YES -DEIGEN_DIR=${{github.workspace}}/Eigen
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build/tests
run: ./modeling/test_modeling_interface
- name: Build coverage report
run: lcov --directory . --capture --output-file coverage__$(uuidgen).info
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage__*.info
Mosek:
name: "Mosek Wrapper"
runs-on: ubuntu-latest
strategy:
matrix:
test:
- "branch-and-bound/test_bab_knapsack_Mosek"
- "branch-and-bound/test_bab_location_Mosek"
- "branch-and-price/test_bap_assignment_Mosek"
steps:
- uses: actions/checkout@v4
- name: Download Eigen
run: wget https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.bz2
- name: Install Eigen
run: tar -xvf eigen*.tar.bz2 && rm eigen*.tar.bz2 && find . -depth -type d -name eigen-* -execdir mv {} ${{github.workspace}}/Eigen \;
- name: Download Mosek
run: wget https://download.mosek.com/stable/10.0.47/mosektoolslinux64x86.tar.bz2
- name: Install Mosek
run: tar -xvf mosektoolslinux64x86.tar.bz2 -C ${{github.workspace}} && (cd ${{github.workspace}}/mosek/10.0/tools/platform/linux64x86/src/fusion_cxx && make install)
- name: Install Mosek license
run: 'echo "${MOSEK_LICENSE}" | base64 --decode > ${{github.workspace}}/mosek/mosek.lic'
env:
MOSEK_LICENSE: ${{secrets.MOSEK_LICENSE}}
- name: Install lcov
run: sudo apt-get install lcov
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTS=YES -DWITH_TEST_COVERAGE=YES -DUSE_EIGEN=YES -DEIGEN_DIR=${{github.workspace}}/Eigen -DUSE_MOSEK=YES -DUSE_EIGEN=YES -DMOSEK_DIR=${{github.workspace}}/mosek/10.0/tools/platform/linux64x86
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build/tests
run: ./${{ matrix.test }}
env:
MOSEKLM_LICENSE_FILE: ${{github.workspace}}/mosek/mosek.lic
- name: Build coverage report
run: lcov --directory . --capture --output-file coverage__$(uuidgen).info
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage_*.info
GLPK:
name: "GLPK Wrapper"
runs-on: ubuntu-latest
strategy:
matrix:
test:
- "branch-and-bound/test_bab_knapsack_GLPK"
- "branch-and-bound/test_bab_location_GLPK"
- "branch-and-price/test_bap_assignment_GLPK"
steps:
- uses: actions/checkout@v4
- name: Install lcov
run: sudo apt-get install lcov
- name: Update apt-get
run: sudo apt-get update
- name: Install GLPK
run: sudo apt-get install glpk-utils libglpk-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTS=YES -DWITH_TEST_COVERAGE=YES -DUSE_GLPK=YES
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build/tests
run: ./${{ matrix.test }}
- name: Build coverage report
run: lcov --directory . --capture --output-file coverage__$(uuidgen).info
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage_*.info
HiGHS:
name: "HiGHS Wrapper"
runs-on: ubuntu-latest
strategy:
matrix:
test:
- "branch-and-bound/test_bab_knapsack_HiGHS"
- "branch-and-bound/test_bab_location_HiGHS"
- "branch-and-price/test_bap_assignment_HiGHS"
steps:
- uses: actions/checkout@v3
- name: Install lcov
run: sudo apt-get install lcov
- name: Download HiGHS
run: git clone --depth 1 --branch v1.7.1 https://github.com/ERGO-Code/HiGHS.git
- name: Install HiGHS
run: mkdir HiGHS/build && cd HiGHS/build && cmake .. && make && sudo make install
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DBUILD_TESTS=YES -DWITH_TEST_COVERAGE=YES -DUSE_HIGHS=YES
- name: Build
run: cmake --build ${{github.workspace}}/build
- name: Test
working-directory: ${{github.workspace}}/build/tests
run: ./${{ matrix.test }}
- name: Build coverage report
run: lcov --directory . --capture --output-file coverage__$(uuidgen).info
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coverage_*.info
Coverage:
name: "Coverage Report"
runs-on: ubuntu-latest
needs: [GLPK, Mosek, HiGHS, modeling]
steps:
- uses: actions/checkout@v3
- name: Download a single artifact
uses: actions/download-artifact@v3
with:
name: coverage
- name: Install lcov
run: sudo apt-get install lcov
- name: Merge all reports
run: ./scripts/merge_coverage.sh
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
file: coverage.info
flags: default