Skip to content

Merge branch 'latest' into mip-dual-bound #1

Merge branch 'latest' into mip-dual-bound

Merge branch 'latest' into mip-dual-bound #1

# 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 installs
- name: Build HiGHS library
shell: bash
working-directory: build
run: |
cmake \
-DCMAKE_INSTALL_PREFIX=../installs/highs \
-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 installs/highs/include/highs \
-L installs/highs/lib -lhighs
LD_LIBRARY_PATH=installs/highs/lib ./c_example