|
| 1 | +name: Unit tests |
| 2 | +on: [push, pull_request] |
| 3 | + |
| 4 | +env: |
| 5 | + SCOREP_TIMER: clock_gettime # tsc causes warnings |
| 6 | + |
| 7 | +jobs: |
| 8 | + build: |
| 9 | + runs-on: ubuntu-18.04 |
| 10 | + strategy: |
| 11 | + matrix: |
| 12 | + python: [2.7, 3.5, 3.6, 3.7, 3.8] |
| 13 | + fail-fast: false |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v2 |
| 17 | + - uses: actions/cache@v1 |
| 18 | + with: |
| 19 | + path: ~/.cache/pip |
| 20 | + key: ${{ runner.os }}-pip |
| 21 | + - id: cache |
| 22 | + uses: actions/cache@v1 |
| 23 | + with: |
| 24 | + path: ~/scorep |
| 25 | + key: scorep |
| 26 | + |
| 27 | + - name: Install system dependencies |
| 28 | + run: sudo apt install gcc-7-plugin-dev libopenmpi-dev openmpi-bin |
| 29 | + - name: Install dependencies |
| 30 | + if: steps.cache.outputs.cache-hit != 'true' |
| 31 | + run: | |
| 32 | + mkdir /tmp/buildScorep && cd /tmp/buildScorep |
| 33 | + wget https://www.vi-hps.org/cms/upload/packages/scorep/scorep-6.0.tar.gz |
| 34 | + tar xf scorep-6.0.tar.gz |
| 35 | + cd scorep-6.0 |
| 36 | + mkdir build && cd build |
| 37 | + ../configure --enable-shared --prefix=$HOME/scorep |
| 38 | + make -j3 && make install |
| 39 | +
|
| 40 | + - name: Setup environment |
| 41 | + run: echo "::add-path::$HOME/scorep/bin" |
| 42 | + - name: set up Python |
| 43 | + uses: actions/setup-python@v2 |
| 44 | + with: |
| 45 | + python-version: ${{matrix.python}} |
| 46 | + architecture: x64 |
| 47 | + - name: Install Python packages |
| 48 | + run: | |
| 49 | + pip install --upgrade pip |
| 50 | + pip install numpy mpi4py |
| 51 | +
|
| 52 | + - name: Build python bindings |
| 53 | + run: pip install . |
| 54 | + - name: Run tests |
| 55 | + working-directory: test |
| 56 | + run: ./test.py |
0 commit comments