Skip to content

Commit

Permalink
Merge 16c2989 into a7a3d9c
Browse files Browse the repository at this point in the history
  • Loading branch information
bodono committed Jan 12, 2022
2 parents a7a3d9c + 16c2989 commit 5c23b5d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ jobs:
- run: sudo apt-get install libopenblas-dev liblapack-dev
- run: mkdir build
- run: |
export INSTALL_DIR=$PWD/out
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
cd build
mkdir out
cmake -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX:PATH=$PWD/out ..
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
Expand All @@ -26,10 +31,15 @@ jobs:
- run: mkdir cmake_out
- run: mkdir build
- run: |
export INSTALL_DIR=$PWD/out
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$INSTALL_DIR/lib
cd build
mkdir out
cmake -DBUILD_TESTING=ON -DCMAKE_INSTALL_PREFIX:PATH=$PWD/out ..
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
2 changes: 1 addition & 1 deletion docs/src/examples/c.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ compile the code (assuming the library was installed in

.. code::
gcc -I/usr/local/include/scs -L/usr/local/lib/ -lscsdir qp.c -o qp.out
gcc -I/usr/local/include/scs -L/usr/local/lib/ qp.c -o qp.out -lscsdir
.. ./qp.out > qp.c.out
Expand Down
2 changes: 1 addition & 1 deletion docs/src/examples/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ int main(int argc, char **argv) {
free(sol->s);
free(sol);

return exitflag;
return 0; /* returning exitflag will set bash exit code to 1 */
}

0 comments on commit 5c23b5d

Please sign in to comment.