diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 58435df4..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Integration -on: [push, pull_request] -jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-20.04, ubuntu-22.04, macos-12] - fail-fast: false - steps: - - uses: actions/checkout@v3 - - name: Install Ubuntu 20.04 dependencies - if: startsWith(matrix.os, 'ubuntu-20.04') - run: | - sudo apt update - sudo apt install -y build-essential cmake qtbase5-dev libblas-dev liblapack-dev - sudo apt install -y libopenblas-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev - sudo apt install -y libvtk7-dev openmpi-bin libopenmpi-dev - sudo apt install -y lcov - - name: Install Ubuntu 22.04 dependencies - if: startsWith(matrix.os, 'ubuntu-22.04') - run: | - sudo apt update - sudo apt install -y build-essential cmake qtbase5-dev libblas-dev liblapack-dev - sudo apt install -y libopenblas-dev mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev - sudo apt install -y openmpi-bin libopenmpi-dev - sudo apt install -y lcov - sudo apt install -y libxt-dev - wget https://www.vtk.org/files/release/9.3/VTK-9.3.0.tar.gz - tar -xvf VTK-9.3.0.tar.gz - cd VTK-9.3.0 - mkdir build - cd build - cmake .. - make -j2 - sudo make install - cd ../.. - - name: Install MacOS dependencies - if: startsWith(matrix.os, 'macos') - run: | - brew reinstall -v gcc - brew install -v cmake vtk openblas lapack mesa open-mpi qt - brew install lcov - sudo ln -s /usr/local/opt/qt5/mkspecs /usr/local/mkspecs - sudo ln -s /usr/local/opt/qt5/plugins /usr/local/plugins - - name: Build svFSIplus - run: | - mkdir build - cd build - cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. - make -j2 - - name: Install test dependencies - run: | - conda create -n svfsiplus python=3.9 - conda run -n svfsiplus pip install pytest pytest-cov pytest-mock numpy meshio pandas - - name: Run integration tests - run: | - git lfs pull - cd tests - conda run -n svfsiplus pytest -rPv --durations=0 - - name: Run unit tests - run: | - cd build/svFSI-build/Source/svFSI - ctest --verbose - - name: Generate code coverage - if: startsWith(matrix.os, 'ubuntu-22.04') - run: | - cd build/svFSI-build - make coverage - - name: Save coverage report - if: startsWith(matrix.os, 'ubuntu-22.04') - uses: actions/upload-artifact@v3 - with: - name: coverage_report - path: build/svFSI-build/coverage - - name: Upload coverage reports to Codecov - if: startsWith(matrix.os, 'ubuntu-22.04') - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml new file mode 100644 index 00000000..753ca16e --- /dev/null +++ b/.github/workflows/test_docker.yml @@ -0,0 +1,51 @@ +name: Integration +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-22.04 + container: msalvad/ubuntu22_vtk9:v1 + strategy: + matrix: + os: [ubuntu-22.04] + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: Look at Docker image for Ubuntu 22.04 + run: | + cat /etc/os-release + ls + - name: Build svFSIplus + run: | + mkdir build + cd build + cmake -DENABLE_COVERAGE=ON -DENABLE_ARRAY_INDEX_CHECKING=ON -DENABLE_UNIT_TEST=ON .. + make -j2 + - name: Install test dependencies + run: | + conda create -n svfsiplus python=3.9 + conda run -n svfsiplus pip install pytest pytest-cov pytest-mock numpy meshio pandas + - name: Run integration tests + run: | + git lfs pull + cd tests + conda run -n svfsiplus pytest -rPv --durations=0 + - name: Run unit tests + run: | + cd build/svFSI-build/Source/svFSI + ctest --verbose + - name: Generate code coverage + if: startsWith(matrix.os, 'ubuntu-22.04') + run: | + cd build/svFSI-build + make coverage + - name: Save coverage report + if: startsWith(matrix.os, 'ubuntu-22.04') + uses: actions/upload-artifact@v3 + with: + name: coverage_report + path: build/svFSI-build/coverage + - name: Upload coverage reports to Codecov + if: startsWith(matrix.os, 'ubuntu-22.04') + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file