|
13 | 13 | MYCI_CONAN_USER: cppfw
|
14 | 14 | MYCI_CONAN_PASSWORD: ${{ secrets.MYCI_CONAN_PASSWORD }}
|
15 | 15 | jobs:
|
| 16 | +##### coverage ##### |
| 17 | + coverage: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + container: debian:bookworm |
| 20 | + name: coverage - measure |
| 21 | + env: |
| 22 | + linux_distro: debian |
| 23 | + linux_release: bookworm |
| 24 | + steps: |
| 25 | + - name: add cppfw deb repo |
| 26 | + uses: myci-actions/add-deb-repo@main |
| 27 | + with: |
| 28 | + repo: deb https://gagis.hopto.org/repo/cppfw/${{ env.linux_distro }} ${{ env.linux_release }} main |
| 29 | + repo-name: cppfw |
| 30 | + keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg |
| 31 | + install: myci locales git pipx |
| 32 | + - name: add llvm repo (for clang-format) |
| 33 | + uses: myci-actions/add-deb-repo@main |
| 34 | + with: |
| 35 | + repo: deb http://apt.llvm.org/${{ env.linux_release }} llvm-toolchain-${{ env.linux_release }} main |
| 36 | + repo-name: llvm |
| 37 | + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key |
| 38 | + - name: git clone |
| 39 | + uses: myci-actions/checkout@main |
| 40 | + - name: prepare debian package |
| 41 | + run: myci-deb-prepare.sh |
| 42 | + - name: install deps |
| 43 | + run: myci-deb-install-build-deps.sh |
| 44 | + - name: add DE locale |
| 45 | + # needed for testing that locale with "," as decimal delimiter does not break the parsing with string_parser |
| 46 | + run: | |
| 47 | + echo "de_DE.UTF-8 UTF-8" >> /etc/locale.gen |
| 48 | + locale-gen |
| 49 | + - name: build |
| 50 | + run: make config=gcov |
| 51 | + - name: test |
| 52 | + run: make config=gcov test |
| 53 | + - name: generate coverage report |
| 54 | + # due to some bug in gcov, we need to use --gcov-ignore-parse-errors=negative_hits.warn |
| 55 | + run: pipx run gcovr --gcov-ignore-parse-errors=negative_hits.warn --exclude-throw-branches --filter src/ --cobertura > cobertura.xml |
| 56 | + - name: upload coverage report to artifacts |
| 57 | + uses: actions/upload-artifact@v4 |
| 58 | + with: |
| 59 | + name: cobertura.xml |
| 60 | + path: cobertura.xml |
| 61 | + - name: upload coverage data to codecov.io |
| 62 | + uses: codecov/codecov-action@v5 |
| 63 | + if: always() # even if previous steps fail, this one needs to be run |
| 64 | + with: |
| 65 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 66 | + # do not search for coverage files automatically, upload only specified files |
| 67 | + disable_search: true |
| 68 | + files: cobertura.xml |
| 69 | + # flags: unittests # optional |
| 70 | + name: codecov-umbrella # optional |
| 71 | + fail_ci_if_error: true # optional (default = false) |
| 72 | + verbose: true # optional (default = false) |
| 73 | + - name: upload test report to codecov.io |
| 74 | + if: always() # even if previous steps fail, this one needs to be run |
| 75 | + uses: codecov/test-results-action@v1 |
| 76 | + with: |
| 77 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 78 | + # do not search for coverage files automatically, upload only specified files |
| 79 | + disable_search: true |
| 80 | + files: tests/unit/out/gcov/junit.xml |
| 81 | + name: codecov-umbrella # optional |
| 82 | + fail_ci_if_error: true # optional (default = false) |
| 83 | + verbose: true # optional (default = false) |
| 84 | +##### sanitizer ##### |
| 85 | + sanitizer: |
| 86 | + strategy: |
| 87 | + fail-fast: false |
| 88 | + matrix: |
| 89 | + include: |
| 90 | + - {os: debian, codename: bookworm, image_owner: } |
| 91 | + - {os: debian, codename: bookworm, image_owner: arm32v7/, labels: [ubuntu-24.04-arm]} |
| 92 | + - {os: debian, codename: bookworm, image_owner: arm64v8/, labels: [ubuntu-24.04-arm]} |
| 93 | + runs-on: ${{ (matrix.labels == '' && 'ubuntu-latest') || matrix.labels }} |
| 94 | + container: ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} |
| 95 | + name: sanitizer - ${{ matrix.image_owner }}${{ matrix.os }}:${{ matrix.codename }} |
| 96 | + steps: |
| 97 | + - name: add cppfw deb repo |
| 98 | + uses: myci-actions/add-deb-repo@main |
| 99 | + with: |
| 100 | + repo: deb https://gagis.hopto.org/repo/cppfw/${{ matrix.os }} ${{ matrix.codename }} main |
| 101 | + repo-name: cppfw |
| 102 | + keys-asc: https://gagis.hopto.org/repo/cppfw/pubkey.gpg |
| 103 | + install: myci git |
| 104 | + - name: add llvm repo (for clang-format) |
| 105 | + uses: myci-actions/add-deb-repo@main |
| 106 | + with: |
| 107 | + repo: deb http://apt.llvm.org/${{ matrix.codename }} llvm-toolchain-${{ matrix.codename }} main |
| 108 | + repo-name: llvm |
| 109 | + keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key |
| 110 | + - name: install ci tools |
| 111 | + run: | |
| 112 | + apt install --assume-yes devscripts equivs |
| 113 | + - name: git clone |
| 114 | + uses: myci-actions/checkout@main |
| 115 | + - name: prepare debian package |
| 116 | + run: myci-deb-prepare.sh |
| 117 | + - name: install deps |
| 118 | + run: myci-deb-install-build-deps.sh |
| 119 | + - name: build |
| 120 | + run: make config=asan |
| 121 | + - name: test |
| 122 | + run: make config=asan test |
16 | 123 | ##### deb linux #####
|
17 | 124 | deb:
|
18 | 125 | strategy:
|
|
0 commit comments