Skip to content

Commit

Permalink
Merge branch 'release-draft' into issue#258patch
Browse files Browse the repository at this point in the history
  • Loading branch information
kibaekkim committed Feb 19, 2023
2 parents f57fd84 + 9360074 commit 98f0b4b
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-18.04]
os: [ubuntu-latest]
compiler: [gcc, clang]
fail-fast: false

steps:
- name: Install extra libraries
run: |
if [ ${{ matrix.os }} == ubuntu-18.04 ] && [ ${{ matrix.compiler }} == gcc ]
sudo apt-get update -y
sudo apt-get install -y libtbb-dev libtbb2
if [ ${{ matrix.compiler }} == gcc ]
then
sudo apt-get update -y
sudo apt-get install -y lcov
fi
- name: Set my secrets
Expand All @@ -43,42 +44,47 @@ jobs:
- name: Checkout DSPThirdPartyLibs
run: |
mkdir -p ~/.ssh
ssh-keyscan xgitlab.cels.anl.gov >> ~/.ssh/known_hosts
git clone git@xgitlab.cels.anl.gov:kimk/DSPThirdPartyLibs.git
- name: Run cmake, build, and test
ssh-keyscan git.cels.anl.gov >> ~/.ssh/known_hosts
git clone git@git.cels.anl.gov:kimk/DSPThirdPartyLibs.git
- name: Run cmake and build
env:
MYOS: ${{ matrix.os }}
CC: ${{ matrix.compiler }}
FC: gfortran-9
FC: gfortran-12
run: |
cd DSPThirdPartyLibs
./github.sh
if [ ${{ matrix.os }} == ubuntu-18.04 ]
then
export LD_LIBRARY_PATH=$PWD/lib:$(dirname `$FC --print-file-name libgfortran.so`):$LD_LIBRARY_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
fi
if [ ${{ matrix.os }} == macos-latest ]
then
export DYLD_LIBRARY_PATH=$PWD/lib:$(dirname `$FC --print-file-name libgfortran.dylib`):$DYLD_LIBRARY_PATH
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
fi
export MA27LIB_DIR=$PWD/ma27/build/lib
export SCIPOPT_INC_DIR=$PWD/include
export SCIPOPT_LIB_DIR=$PWD/lib
export CPLEX_INC_DIR=$PWD/cplex/ilcplex
export CPLEX_LIB_DIR=$PWD/cplex/lib
echo "Checking the environment variables:"
echo $MA27LIB_DIR
echo $SCIPOPT_INC_DIR
echo $SCIPOPT_LIB_DIR
echo $CPLEX_INC_DIR
echo $CPLEX_LIB_DIR
export LD_LIBRARY_PATH=$SCIPOPT_LIB_DIR:$(dirname `$FC --print-file-name libgfortran.so`):$LD_LIBRARY_PATH
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
cd ..
mkdir build
cd build
if [ ${{ matrix.compiler }} == gcc ]; then export CXX=g++; fi
if [ ${{ matrix.compiler }} == clang ]; then export CXX=clang++; fi
cmake .. -DUNIT_TESTING=ON -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=DEBUG
cmake .. -DUNIT_TESTING=OFF -DCODE_COVERAGE=ON -DCMAKE_BUILD_TYPE=DEBUG
make -j
make install
- name: Run test
run: |
if [ ${{ matrix.os }} == ubuntu-18.04 ]; then export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}; fi
if [ ${{ matrix.os }} == macos-latest ]; then export DYLD_LIBRARY_PATH=${{ env.DYLD_LIBRARY_PATH }}; fi
export LD_LIBRARY_PATH=${{ env.LD_LIBRARY_PATH }}
cd build
./src/test/UnitTests
ctest
if [ ${{ matrix.os }} == ubuntu-18.04 ] && [ ${{ matrix.compiler }} == gcc ]
if [ ${{ matrix.compiler }} == gcc ]
then
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
Expand Down

0 comments on commit 98f0b4b

Please sign in to comment.