|
8 | 8 | fail-fast: false
|
9 | 9 | matrix:
|
10 | 10 | os: [ubuntu-latest]
|
11 |
| - gcc_v: [9] # Version of GFortran we want to use. |
12 |
| - python-version: [3.7] |
| 11 | + gcc_v: [10] # Version of GFortran we want to use. |
| 12 | + python-version: [3.9] |
13 | 13 | env:
|
14 | 14 | FC: gfortran-${{ matrix.gcc_v }}
|
15 | 15 | GCC_V: ${{ matrix.gcc_v }}
|
@@ -43,18 +43,31 @@ jobs:
|
43 | 43 | - name: Install GFortran Linux
|
44 | 44 | if: contains( matrix.os, 'ubuntu')
|
45 | 45 | run: |
|
46 |
| - sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
47 |
| - sudo apt-get update |
48 |
| - sudo apt-get install -y gcc-${GCC_V} gfortran-${GCC_V} |
49 |
| - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 100 \ |
50 |
| - --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${GCC_V} \ |
51 |
| - --slave /usr/bingcov gcov /usr/bin/gcov-${GCC_V} |
| 46 | + sudo apt-get install lcov |
| 47 | + sudo update-alternatives \ |
| 48 | + --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.gcc_v }} 100 \ |
| 49 | + --slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ matrix.gcc_v }} \ |
| 50 | + --slave /usr/bin/gcov gcov /usr/bin/gcov-${{ matrix.gcc_v }} |
52 | 51 |
|
53 |
| - - name: Compile |
54 |
| - run: fpm build --profile release |
| 52 | + # - name: Compile |
| 53 | + # run: fpm build --profile release |
55 | 54 |
|
56 |
| - - name: Run test |
57 |
| - run: fpm test |
| 55 | + - name: Run tests |
| 56 | + run: fpm test --profile debug --flag -coverage |
| 57 | + |
| 58 | + - name: Create coverage report |
| 59 | + run: | |
| 60 | + mkdir -p ${{ env.COV_DIR }} |
| 61 | + lcov --capture --initial --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.base |
| 62 | + lcov --capture --base-directory . --directory build/gfortran_*/ --output-file ${{ env.COV_DIR }}/coverage.capture |
| 63 | + lcov --add-tracefile ${{ env.COV_DIR }}/coverage.base --add-tracefile ${{ env.COV_DIR }}/coverage.capture --output-file ${{ env.COV_DIR }}/coverage.info |
| 64 | + env: |
| 65 | + COV_DIR: build/coverage |
| 66 | + |
| 67 | + - name: Upload coverage report |
| 68 | + uses: codecov/codecov-action@v2 |
| 69 | + with: |
| 70 | + files: build/coverage/coverage.info |
58 | 71 |
|
59 | 72 | - name: Build documentation
|
60 | 73 | run: ford ./pyplot-fortran.md
|
|
0 commit comments