|
1 | 1 | name: Build Binaries |
2 | 2 |
|
3 | | - |
4 | | -# Authors: |
| 3 | +# Authors: |
5 | 4 | # Mark Turner |
6 | | -# Mohammed Ghannam |
| 5 | +# Mohammed Ghannam |
7 | 6 | # Stefan Vigerske |
8 | 7 | # Franziska Schloesser |
9 | 8 | # Julian Manns |
10 | 9 | # Michael Winkler |
| 10 | +# Andrea Nardi-Dei |
11 | 11 | # |
12 | 12 | # This is the base workflow script for generating SCIP libraries. |
13 | | -# These libraries intended purpose is to be shipped with the various |
| 13 | +# These libraries intended purpose is to be shipped with the various |
14 | 14 | # SCIP interfaces for different programming languages (e.g. Python and Rust). |
15 | 15 | # These libraries enable users of those interfaces to not have to install SCIP themselves outside of |
16 | 16 | # the traditional package managers of their preferred programming languages. |
|
77 | 77 | description: Run tests |
78 | 78 | default: true |
79 | 79 | # static: |
80 | | - # type: boolean |
81 | | - # description: Build static libraries |
82 | | - # default: false |
| 80 | + # type: boolean |
| 81 | + # description: Build static libraries |
| 82 | + # default: false |
83 | 83 | use_cached_dependencies: |
84 | 84 | type: boolean |
85 | 85 | description: Use cached dependencies |
86 | 86 | default: true |
87 | 87 |
|
88 | 88 | jobs: |
89 | 89 | print-inputs: |
90 | | - runs-on: ubuntu-latest |
91 | | - steps: |
92 | | - - name: Print inputs |
93 | | - run: | |
94 | | - echo "SCIP version: ${{github.event.inputs.scip_version}}" |
95 | | - echo "GCG version: ${{github.event.inputs.gcg_version}}" |
96 | | - echo "Soplex version: ${{github.event.inputs.soplex_version}}" |
97 | | - echo "IPOPT version: ${{github.event.inputs.ipopt_version}}" |
98 | | - echo "Debug?: ${{github.event.inputs.debug}}" |
99 | | - echo "Static?: ${{github.event.inputs.static}}" |
100 | | - echo "Use cached dependncies?: ${{github.event.inputs.use_cached_dependencies}}" |
101 | | -
|
102 | | - macos-arm-build-binaries: |
103 | | - runs-on: macos-14 |
104 | | - if: github.event.inputs.macos == 'true' |
105 | | - steps: |
106 | | - - uses: actions/checkout@v4 |
107 | | - - name: Build and install SCIP |
108 | | - run: | |
109 | | - export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
110 | | - export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
111 | | - export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
112 | | - export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
113 | | - export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
114 | | - export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
115 | | - export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
116 | | - if [ "${{github.event.inputs.debug}}" = "true" ]; then |
117 | | - export BUILD_MODE=Debug |
118 | | - else |
119 | | - export BUILD_MODE=Release |
120 | | - fi |
121 | | - if [ "${{github.event.inputs.static}}" = "true" ]; then |
122 | | - export SHARED=OFF |
123 | | - else |
124 | | - export SHARED=ON |
125 | | - fi |
126 | | - |
127 | | - if [ "${{github.event.inputs.tests}}" = "true" ]; then |
128 | | - export TESTS=ON |
129 | | - fi |
130 | | -
|
131 | | - if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
132 | | - export USE_CACHED_DEPENDENCIES=OFF |
133 | | - else |
134 | | - export USE_CACHED_DEPENDENCIES=ON |
135 | | - fi |
136 | | -
|
137 | | - tar -xvf .github/workflows/metis-dependency/metis-5.1.0.tar.gz -C $GITHUB_WORKSPACE |
138 | | - bash -x .github/workflows/scripts/macos_arm.bash |
139 | | -
|
140 | | - - uses: actions/upload-artifact@v4 |
141 | | - with: |
142 | | - name: macos-arm |
143 | | - path: ${{ github.workspace }}/libscip-macos-arm.zip |
144 | | - |
145 | | - macos-intel-build-binaries: |
146 | | - runs-on: macos-15-intel |
147 | | - if: github.event.inputs.macos == 'true' |
148 | | - steps: |
149 | | - - uses: actions/checkout@v4 |
150 | | - - uses: fortran-lang/setup-fortran@v1 |
151 | | - id: setup-fortran |
152 | | - with: |
153 | | - compiler: gcc |
154 | | - version: 13 |
155 | | - - name: Build and install SCIP |
156 | | - run: | |
157 | | - export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
158 | | - export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
159 | | - export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
160 | | - export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
161 | | - export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
162 | | - export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
163 | | - export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
164 | | - if [ "${{github.event.inputs.debug}}" = "true" ]; then |
165 | | - export BUILD_MODE=Debug |
166 | | - else |
167 | | - export BUILD_MODE=Release |
168 | | - fi |
169 | | - if [ "${{github.event.inputs.static}}" = "true" ]; then |
170 | | - export SHARED=OFF |
171 | | - else |
172 | | - export SHARED=ON |
173 | | - fi |
174 | | - |
175 | | - if [ "${{github.event.inputs.tests}}" = "true" ]; then |
176 | | - export TESTS=ON |
177 | | - fi |
178 | | -
|
179 | | - if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
180 | | - export USE_CACHED_DEPENDENCIES=OFF |
181 | | - else |
182 | | - export USE_CACHED_DEPENDENCIES=ON |
183 | | - fi |
184 | | - |
185 | | -
|
186 | | - tar -xvf .github/workflows/metis-dependency/metis-5.1.0.tar.gz -C $GITHUB_WORKSPACE |
187 | | - bash -x .github/workflows/scripts/macos.bash |
188 | | -
|
189 | | - - uses: actions/upload-artifact@v4 |
190 | | - with: |
191 | | - name: macos-intel |
192 | | - path: ${{ github.workspace }}/libscip-macos-intel.zip |
193 | | - |
194 | | - linux-build-binaries: |
195 | 90 | runs-on: ubuntu-latest |
196 | | - if: github.event.inputs.linux == 'true' |
197 | | - container: quay.io/pypa/manylinux_2_28_x86_64 |
198 | 91 | steps: |
199 | | - - uses: actions/checkout@v4 |
200 | | - - name: Build and install SCIP |
| 92 | + - name: Print inputs |
201 | 93 | run: | |
202 | | - export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
203 | | - export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
204 | | - export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
205 | | - export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
206 | | - export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
207 | | - export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
208 | | - export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
209 | | - if [ "${{github.event.inputs.debug}}" = "true" ]; then |
210 | | - export BUILD_MODE=Debug |
211 | | - else |
212 | | - export BUILD_MODE=Release |
213 | | - fi |
214 | | - if [ "${{github.event.inputs.static}}" = "true" ]; then |
215 | | - export SHARED=OFF |
216 | | - else |
217 | | - export SHARED=ON |
218 | | - fi |
219 | | -
|
220 | | - if [ "${{github.event.inputs.tests}}" = "true" ]; then |
221 | | - export TESTS=ON |
222 | | - fi |
223 | | -
|
224 | | - if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
225 | | - export USE_CACHED_DEPENDENCIES=OFF |
226 | | - else |
227 | | - export USE_CACHED_DEPENDENCIES=ON |
228 | | - fi |
229 | | -
|
230 | | - export ARM=OFF |
231 | | -
|
232 | | - bash -x .github/workflows/scripts/linux.bash |
233 | | - - uses: actions/upload-artifact@v4 |
234 | | - with: |
235 | | - name: linux |
236 | | - path: ${{ github.workspace }}/libscip-linux.zip |
237 | | - |
238 | | - linux-arm-build-binaries: |
239 | | - runs-on: ubuntu-24.04-arm |
240 | | - if: github.event.inputs.linux == 'true' |
241 | | - container: quay.io/pypa/manylinux_2_28_aarch64 |
| 94 | + echo "SCIP version: ${{github.event.inputs.scip_version}}" |
| 95 | + echo "GCG version: ${{github.event.inputs.gcg_version}}" |
| 96 | + echo "Soplex version: ${{github.event.inputs.soplex_version}}" |
| 97 | + echo "IPOPT version: ${{github.event.inputs.ipopt_version}}" |
| 98 | + echo "Debug?: ${{github.event.inputs.debug}}" |
| 99 | + echo "Static?: ${{github.event.inputs.static}}" |
| 100 | + echo "Use cached dependncies?: ${{github.event.inputs.use_cached_dependencies}}" |
| 101 | +
|
| 102 | + build: |
| 103 | + strategy: |
| 104 | + matrix: |
| 105 | + os: ["macos", "linux", "windows"] |
| 106 | + architecture: ["x86_64", "arm"] |
| 107 | + gmp: [true] |
| 108 | + exclude: |
| 109 | + - os: windows |
| 110 | + architecture: arm |
| 111 | + |
| 112 | + runs-on: | |
| 113 | + ${{ fromJson('{ "macos": { "arm": "macos-14", "x86_64": "macos-15-intel" }, "linux": { "arm": "ubuntu-24.04-arm", "x86_64": "ubuntu-latest" }, "windows": { "x86_64": "windows-latest" } }')[matrix.os][matrix.architecture] }} |
| 114 | + container: |
| 115 | + image: | |
| 116 | + ${{ fromJson('{ "macos": { "arm": null, "x86_64": null }, "linux": { "arm": "quay.io/pypa/manylinux_2_28_aarch64", "x86_64": "quay.io/pypa/manylinux_2_28_x86_64" }, "windows": { "x86_64": null } }')[matrix.os][matrix.architecture] }} |
| 117 | + defaults: |
| 118 | + run: |
| 119 | + shell: | |
| 120 | + ${{ fromJson('{ "macos": "bash", "linux": "bash", "windows": "msys2 {0}" }')[matrix.os] }} |
242 | 121 | steps: |
243 | 122 | - uses: actions/checkout@v4 |
| 123 | + - uses: msys2/setup-msys2@v2 |
| 124 | + if: matrix.os == 'windows' |
244 | 125 | - name: Build and install SCIP |
245 | 126 | run: | |
246 | | - export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
247 | | - export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
248 | | - export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
249 | | - export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
250 | | - export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
251 | | - export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
252 | | - export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
253 | | - if [ "${{github.event.inputs.debug}}" = "true" ]; then |
254 | | - export BUILD_MODE=Debug |
255 | | - else |
256 | | - export BUILD_MODE=Release |
257 | | - fi |
258 | | - if [ "${{github.event.inputs.static}}" = "true" ]; then |
259 | | - export SHARED=OFF |
260 | | - else |
261 | | - export SHARED=ON |
262 | | - fi |
| 127 | + export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
| 128 | + export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
| 129 | + export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
| 130 | + export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
| 131 | + export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
| 132 | + export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
| 133 | + export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
| 134 | +
|
| 135 | + export OS="${{matrix.os}}" |
| 136 | + export ARCHITECTURE="${{matrix.architecture}}" |
| 137 | + export GMP="${{matrix.gmp}}" |
| 138 | +
|
| 139 | + export FILENAME=libscip-$OS-$ARCHITECTURE-$GMP.zip |
| 140 | +
|
| 141 | + if [ "${{github.event.inputs.debug}}" = "true" ]; then |
| 142 | + export BUILD_MODE=Debug |
| 143 | + else |
| 144 | + export BUILD_MODE=Release |
| 145 | + fi |
| 146 | + if [ "${{github.event.inputs.static}}" = "true" ]; then |
| 147 | + export SHARED=OFF |
| 148 | + else |
| 149 | + export SHARED=ON |
| 150 | + fi |
| 151 | +
|
| 152 | + if [ "${{github.event.inputs.tests}}" = "true" ]; then |
| 153 | + export TESTS=ON |
| 154 | + fi |
| 155 | +
|
| 156 | + if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
| 157 | + export USE_CACHED_DEPENDENCIES=OFF |
| 158 | + else |
| 159 | + export USE_CACHED_DEPENDENCIES=ON |
| 160 | + fi |
| 161 | +
|
| 162 | + bash -x .github/workflows/scripts/${{ fromJson('{ "macos": { "arm": "macos_arm.bash", "x86_64": "macos.bash" }, "linux": { "arm": "linux.bash", "x86_64": "linux.bash" }, "windows": { "x86_64": "windows.bash" } }')[matrix.os][matrix.architecture] }} |
263 | 163 |
|
264 | | - if [ "${{github.event.inputs.tests}}" = "true" ]; then |
265 | | - export TESTS=ON |
266 | | - fi |
267 | | -
|
268 | | - if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
269 | | - export USE_CACHED_DEPENDENCIES=OFF |
270 | | - else |
271 | | - export USE_CACHED_DEPENDENCIES=ON |
272 | | - fi |
273 | | -
|
274 | | - export ARM=ON |
275 | | - bash -x .github/workflows/scripts/linux.bash |
276 | 164 | - uses: actions/upload-artifact@v4 |
277 | 165 | with: |
278 | | - name: linux-arm |
279 | | - path: ${{ github.workspace }}/libscip-linux-arm.zip |
280 | | - |
281 | | - windows-build-binaries: |
282 | | - runs-on: windows-latest |
283 | | - if: github.event.inputs.windows == 'true' |
284 | | - steps: |
285 | | - - uses: actions/checkout@v4 |
286 | | - - uses: msys2/setup-msys2@v2 |
287 | | - |
288 | | - - name: Build and install SCIP |
289 | | - run: | |
290 | | - export SCIP_VERSION=$(echo "${{github.event.inputs.scip_version}}" | tr -d '.') |
291 | | - export SCIP_VERSION_FULL="${{ github.event.inputs.scip_version }}" |
292 | | - export GCG_VERSION=$(echo "${{github.event.inputs.gcg_version}}" | tr -d '.') |
293 | | - export GCG_VERSION_FULL="${{ github.event.inputs.gcg_version }}" |
294 | | - export SOPLEX_VERSION=$(echo "${{github.event.inputs.soplex_version}}" | tr -d '.') |
295 | | - export SOPLEX_VERSION_FULL="${{ github.event.inputs.soplex_version }}" |
296 | | - export IPOPT_VERSION=${{ github.event.inputs.ipopt_version }} |
297 | | - if [ "${{github.event.inputs.debug}}" = "true" ]; then |
298 | | - export BUILD_MODE=Debug |
299 | | - else |
300 | | - export BUILD_MODE=Release |
301 | | - fi |
302 | | - if [ "${{github.event.inputs.static}}" = "true" ]; then |
303 | | - export SHARED=OFF |
304 | | - else |
305 | | - export SHARED=ON |
306 | | - fi |
307 | | -
|
308 | | - if [ "${{github.event.inputs.tests}}" = "true" ]; then |
309 | | - export TESTS=ON |
310 | | - fi |
311 | | -
|
312 | | - if [ "${{github.event.inputs.use_cached_dependencies}}" = "true" ]; then |
313 | | - export USE_CACHED_DEPENDENCIES=OFF |
314 | | - else |
315 | | - export USE_CACHED_DEPENDENCIES=ON |
316 | | - fi |
317 | | - |
318 | | - bash -x .github/workflows/scripts/windows.bash |
319 | | - shell: msys2 {0} |
320 | | - |
321 | | - - uses: actions/upload-artifact@v4 |
322 | | - with: |
323 | | - name: windows |
324 | | - path: ${{ github.workspace }}/libscip-windows.zip |
| 166 | + name: ${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.gmp }} #TODO change |
| 167 | + path: ${{ github.workspace }}/libscip-${{ matrix.os }}-${{ matrix.architecture }}-${{ matrix.gmp }}.zip #TODO change |
325 | 168 |
|
326 | | - merge_artifacts: |
327 | | - name: Merge Artifacts |
328 | | - needs: [ windows-build-binaries, linux-build-binaries, linux-arm-build-binaries, macos-intel-build-binaries, macos-arm-build-binaries ] |
329 | | - runs-on: ubuntu-latest |
330 | | - steps: |
331 | | - - name: Merge Artifacts |
332 | | - uses: actions/upload-artifact/merge@v4 |
0 commit comments