aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
blob: a151a87845ea5d37e31a3e0d8205a1c7b81c12d2 (plain)
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
name: Test

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    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
      - 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 }}