test #4003
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: [push] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up CMake | |
uses: actions/setup-cmake@v2 | |
with: | |
cmake-version: '3.21.1' # Specify the CMake version | |
- name: Set up dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo apt-get install -y libopenmpi-dev # Or other dependencies | |
- name: Cache CMake build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cache/CMake | |
./hiop/build | |
key: ${{ runner.os }}-cmake-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-cmake- | |
- name: Configure CMake | |
run: | | |
mkdir -p ${{ runner.workspace }}/hiop/build | |
cd ${{ runner.workspace }}/hiop/build | |
cmake ${{ runner.workspace }}/hiop \ | |
-DHIOP_USE_RAJA=OFF \ | |
-DHIOP_USE_MPI=OFF \ | |
-DCMAKE_BUILD_TYPE=Debug \ | |
-DHIOP_BUILD_SHARED=ON \ | |
-DHIOP_BUILD_STATIC=ON \ | |
-DCMAKE_INSTALL_PREFIX=.. \ | |
-DHIOP_WITH_KRON_REDUCTION=OFF \ | |
-DHIOP_SPARSE=OFF | |
- name: Build hiop | |
run: | | |
cd ${{ runner.workspace }}/hiop/build | |
make -j4 | |
- name: Install hiop | |
run: | | |
cd ${{ runner.workspace }}/hiop/build | |
make install | |
- name: Run Tests | |
run: | | |
cd ${{ runner.workspace }}/hiop/build | |
make test | |