forked from ERGO-Code/HiGHS
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.1 KB
/
test-c-example.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
# This tests the C example, and it uses a similar build script to the one used
# by JuMP when building HiGHS:
# https://github.com/JuliaPackaging/Yggdrasil/blob/master/H/HiGHS/build_tarballs.jl
name: test-c-example
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
run: |
mkdir build
mkdir install
- name: Build HiGHS library
shell: bash
working-directory: build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=ON \
-DFAST_BUILD=ON \
-DIPX=OFF \
$GITHUB_WORKSPACE
cmake --build . --config Release --parallel
make install
- name: Compile and test C example
shell: bash
run: |
g++ $GITHUB_WORKSPACE/examples/call_highs_from_c.c \
-o c_example \
-I install/include/highs \
-L install/lib -lhighs
LD_LIBRARY_PATH=install/lib ./c_example