aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: 63aa95d1bcabccfc4e8fc943b916f75cd6c06451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Test

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-24.04
    strategy:
      matrix:
        CC: [gcc, clang]
    env:
      CC: ${{ matrix.CC }}
    steps:
      - uses: actions/checkout@v4
        with:
          submodules: true
      - name: Setup pari
        run: |
          sudo apt-get update
          sudo apt-get install -y libpari-dev pari-gp pari-seadata meson ninja-build
      - name: Build
        run: |
          make
          make clean
          make STATIC=1
          make clean
          make DEBUG=1
          make clean
      - name: Test
        run: |
          TEST=1 make unittest
      - name: Code coverage
        if: ${{ matrix.CC == 'gcc' }}
        run: |
          cd src && find . -name "*.gcda" -exec gcov -pb "{}" +;
      - name: Code coverage upload
        uses: codecov/codecov-action@v4
        if: ${{ matrix.CC == 'gcc' }}
        with:
          env_vars: CC
          token: ${{ secrets.CODECOV_TOKEN }}