-
Notifications
You must be signed in to change notification settings - Fork 136
44 lines (40 loc) · 1.25 KB
/
cmake.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
---
name: CMake
on: [push, pull_request]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sudo apt-get install libopenblas-dev liblapack-dev
mkdir out
export INSTALL_DIR=$PWD/out
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
mkdir build
cd build
cmake -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR ..
make
make install
ctest --output-on-failure
cd ../docs/src/examples/
gcc -I$INSTALL_DIR/include/scs -L$INSTALL_DIR/lib/ qp.c -o qp.out -lscsdir
./qp.out
mac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- run: |
brew install openblas lapack
mkdir out
export INSTALL_DIR=$PWD/out
export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:$INSTALL_DIR/lib
mkdir build
cd build
cmake -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX:PATH=$INSTALL_DIR ..
make
make install
ctest --output-on-failure
cd ../docs/src/examples/
gcc -I$INSTALL_DIR/include/scs -L$INSTALL_DIR/lib/ qp.c -o qp.out -lscsdir
./qp.out