|
| 1 | +name: CI |
| 2 | +on: |
| 3 | + pull_request: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + - stable |
| 7 | + |
| 8 | +jobs: |
| 9 | + CI: |
| 10 | + continue-on-error: ${{ matrix.distro == 'ubuntu_devel' || matrix.distro == 'fedora_rawhide' || matrix.continue-on-error == true }} |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + distro: [latest, fedora_rawhide, opensuse, ubuntu, ubuntu_devel, ubuntu_rolling, ubuntu_18.04] |
| 14 | + toolchain: [gnu] |
| 15 | + cmake_build_type: [Release] |
| 16 | + minimal: [false] |
| 17 | + own_gmx: [false] |
| 18 | + module_build: [false] |
| 19 | + coverage: [false] |
| 20 | + no_regression_testing: [true] |
| 21 | + include: |
| 22 | + - distro: latest |
| 23 | + toolchain: gnu |
| 24 | + cmake_build_type: Release |
| 25 | + module_build: true |
| 26 | + no_regression_testing: true |
| 27 | + runs-on: ubuntu-latest |
| 28 | + container: votca/buildenv:${{ matrix.distro }} |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v2.2.0 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + - name: Run Votca Setup |
| 34 | + id: setup |
| 35 | + uses: votca/actions/setup@master |
| 36 | + with: |
| 37 | + distro: ${{ matrix.distro }} |
| 38 | + toolchain: ${{ matrix.toolchain }} |
| 39 | + minimal: ${{ matrix.minimal == true }} |
| 40 | + module: ${{ matrix.module_build == true }} |
| 41 | + own_gmx: ${{ matrix.own_gmx == true }} |
| 42 | + regression_testing: ${{ matrix.no_regression_testing != true }} |
| 43 | + coverage: ${{ matrix.coverage }} |
| 44 | + cmake_build_type: ${{ matrix.cmake_build_type }} |
| 45 | + ctest_args: ${{ matrix.ctest_args }} |
| 46 | + cmake_args: ${{ matrix.cmake_args }} |
| 47 | + - uses: actions/cache@v2 |
| 48 | + with: |
| 49 | + path: ~/.ccache |
| 50 | + key: ${{ steps.setup.outputs.cache_key }} |
| 51 | + restore-keys: ${{ steps.setup.outputs.cache_restore_key }} |
| 52 | + - name: CMake |
| 53 | + run: mkdir builddir && cd builddir && cmake ${{ steps.setup.outputs.cmake_args }} ../votca |
| 54 | + - name: Build |
| 55 | + run: | |
| 56 | + ccache -z |
| 57 | + cmake --build builddir -- -j ${{ steps.setup.outputs.jobs }} |
| 58 | + ccache -s |
| 59 | + - name: Tests |
| 60 | + run: ctest --output-on-failure ${{ steps.setup.outputs.ctest_args }} |
| 61 | + working-directory: builddir |
| 62 | + - name: Build Sphinx |
| 63 | + if: ${{ steps.setup.outputs.build_sphinx == 'true' }} |
| 64 | + run: cmake --build builddir --target doc |
| 65 | + - name: Test DESTDIR Install |
| 66 | + if: ${{ ! matrix.module_build }} |
| 67 | + run: DESTDIR=${PWD}/install cmake --build builddir --target install && rm -rf ${PWD}/install/usr && rmdir ${PWD}/install |
| 68 | + - name: Install |
| 69 | + run: sudo cmake --build builddir --target install |
| 70 | + - name: Check for untracked files |
| 71 | + run: git status --porcelain && git status --porcelain | sed Q1 |
| 72 | + working-directory: votca/${{ steps.setup.outputs.module }} |
0 commit comments