diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b3eb48a0..1190a37c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 @@ -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