|
6 | 6 | jobs: |
7 | 7 | coverage: |
8 | 8 | :: setup-job('coverage' 'coverage') |
9 | | - name: coverage/c++${{matrix.std}}${{matrix.namesfx}} |
10 | | - runs-on: ${{matrix.os}} |
| 9 | + name: cov/c++${{matrix.std}}/${{matrix.namesfx}} |
| 10 | + runs-on: ubuntu-24.04 |
11 | 11 | strategy: |
12 | 12 | fail-fast: false |
13 | 13 | matrix: |
14 | | - item =: \({:std %1, :cxx 'g++-9', :bt 'Coverage', :os 'ubuntu-20.04'}) |
15 | 14 | include: |
16 | | - - ! item(11) |
17 | | - - ! item(17) |
18 | 15 | # test also with the debug code enabled |
19 | | - - ! item(11) + {:cmk '-DRYML_DBG=ON', :namesfx '/dbg'} |
20 | | - - ! item(17) + {:cmk '-DRYML_DBG=ON', :namesfx '/dbg'} |
21 | | - env: !:merge* |
22 | | - - ! load('share/env.yaml') |
23 | | - - CMAKE_FLAGS: ${{matrix.cmk}} |
| 16 | + - {std: 11, namesfx: 64bit , cmk: "-DCMAKE_CXX_FLAGS=-m64"} |
| 17 | + - {std: 11, namesfx: 64bit_dbg, cmk: "-DCMAKE_CXX_FLAGS=-m64 -DRYML_DBG=ON"} |
| 18 | + - {std: 17, namesfx: 64bit , cmk: "-DCMAKE_CXX_FLAGS=-m64"} |
| 19 | + - {std: 17, namesfx: 64bit_dbg, cmk: "-DCMAKE_CXX_FLAGS=-m64 -DRYML_DBG=ON"} |
| 20 | + - {std: 11, namesfx: 32bit , cmk: "-DCMAKE_CXX_FLAGS=-m32"} |
| 21 | + - {std: 11, namesfx: 32bit_dbg, cmk: "-DCMAKE_CXX_FLAGS=-m32 -DRYML_DBG=ON"} |
| 22 | + - {std: 17, namesfx: 32bit , cmk: "-DCMAKE_CXX_FLAGS=-m32"} |
| 23 | + - {std: 17, namesfx: 32bit_dbg, cmk: "-DCMAKE_CXX_FLAGS=-m32 -DRYML_DBG=ON"} |
| 24 | + env: |
| 25 | + GCC_VERSION: 13 # the default compiler |
| 26 | + LCOV_ARGS: -v --ignore-errors mismatch,mismatch --ignore-errors unused,unused |
| 27 | + BUILD_ID: cpp${{matrix.std}}_${{matrix.namesfx}} |
24 | 28 | CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} |
25 | | - COVERALLS_REPO_TOKEN: ${{secrets.COVERALLS_REPO_TOKEN}} |
26 | | - # coveralls disabled: |
27 | | - # https://github.com/lemurheavy/coveralls-public/issues/1665 |
28 | | - # https://docs.coveralls.io/parallel-build-webhook |
29 | | - # COVERALLS_PARALLEL: true |
30 | 29 | steps: |
31 | 30 | - :: checkout-action |
32 | | - - name: install requirements |
33 | | - run: source .github/reqs.sh && c4_install_test_requirements $OS |
| 31 | + - name: install compiler |
| 32 | + run: | |
| 33 | + sudo dpkg --add-architecture i386 |
| 34 | + sudo apt-get update |
| 35 | + sudo apt-get install -y \ |
| 36 | + build-essential \ |
| 37 | + cmake \ |
| 38 | + git \ |
| 39 | + lcov \ |
| 40 | + linux-libc-dev:i386 \ |
| 41 | + libc6:i386 \ |
| 42 | + libc6-dev:i386 \ |
| 43 | + libc6-dbg:i386 \ |
| 44 | + g++-$GCC_VERSION \ |
| 45 | + g++-$GCC_VERSION-multilib |
34 | 46 | - name: show info |
35 | 47 | run: source .github/setenv.sh && c4_show_info |
36 | | - - name: static64-configure------------------------------------------------- |
37 | | - run: source .github/setenv.sh && c4_cfg_test static64 |
38 | | - - name: static64-build |
39 | | - run: source .github/setenv.sh && c4_build_test static64 |
40 | | - - name: static64-run |
41 | | - run: source .github/setenv.sh && c4_build_target static64 ryml-coverage |
42 | | - - name: static64-coverage-artifacts |
| 48 | + - name: configure |
| 49 | + run: | |
| 50 | + cmake -B build/$BUILD_ID \ |
| 51 | + -DCMAKE_BUILD_TYPE=Coverage \ |
| 52 | + -DRYML_BUILD_TESTS=ON \ |
| 53 | + -DRYML_COVERAGE_LCOV_ARGS=" $LCOV_ARGS " \ |
| 54 | + -DRYML_COVERAGE_CODECOV=ON \ |
| 55 | + ${{matrix.cmk}} |
| 56 | + - name: build |
| 57 | + run: | |
| 58 | + cmake --build build/$BUILD_ID --verbose --target ryml-test-build --parallel |
| 59 | + - name: run |
| 60 | + run: | |
| 61 | + cmake --build build/$BUILD_ID --verbose --target ryml-coverage |
| 62 | + - name: upload artifacts |
43 | 63 | uses: actions/upload-artifact@v4 |
44 | 64 | with: |
45 | | - name: coverage-static64-${{strategy.job-index}} |
| 65 | + name: coverage-${{env.BUILD_ID}} |
46 | 66 | path: | |
47 | | - build/static64/lcov |
48 | | - build/static64/coverage3-final_filtered.lcov |
49 | | - - name: static64-submit-codecov |
50 | | - run: source .github/setenv.sh && c4_submit_coverage static64 codecov |
51 | | - # Coveralls disabled: |
52 | | - # https://github.com/lemurheavy/coveralls-public/issues/1665 |
53 | | - #- name: static64-submit-coveralls |
54 | | - # run: if [ ${{matrix.std}} == 17 ] ; |
55 | | - # then ( source .github/setenv.sh && |
56 | | - # c4_submit_coverage static64 coveralls ) ; fi |
57 | | - - name: static32-configure------------------------------------------------- |
58 | | - run: source .github/setenv.sh && c4_cfg_test static32 |
59 | | - - name: static32-build |
60 | | - run: source .github/setenv.sh && c4_build_test static32 |
61 | | - - name: static32-run |
62 | | - run: source .github/setenv.sh && c4_build_target static32 ryml-coverage |
63 | | - - name: static32-coverage-artifacts |
64 | | - uses: actions/upload-artifact@v4 |
| 67 | + build/$BUILD_ID/lcov |
| 68 | + build/$BUILD_ID/coverage3-final_filtered.lcov |
| 69 | + - name: upload codecov |
| 70 | + run: | |
| 71 | + cmake --build build/$BUILD_ID --target ryml-coverage-submit-codecov --verbose |
| 72 | + # https://docs.coveralls.io/parallel-builds |
| 73 | + - name: upload coveralls |
| 74 | + uses: coverallsapp/github-action@v2 |
65 | 75 | with: |
66 | | - name: coverage-static32-cxx${{matrix.std}}-${{strategy.job-index}} |
67 | | - path: | |
68 | | - build/static32/lcov |
69 | | - build/static32/coverage3-final_filtered.lcov |
70 | | - - name: static32-submit-codecov |
71 | | - run: source .github/setenv.sh && c4_submit_coverage static32 codecov |
72 | | - # Coveralls disabled: |
73 | | - # https://github.com/lemurheavy/coveralls-public/issues/1665 |
74 | | - #- name: static32-submit-coveralls |
75 | | - # run: source .github/setenv.sh && c4_submit_coverage static32 coveralls |
| 76 | + github-token: ${{secrets.COVERALLS_REPO_TOKEN}} |
| 77 | + parallel: true |
| 78 | + files: build/${{env.BUILD_ID}}/coverage3-final_filtered.lcov |
76 | 79 |
|
77 | | - # coveralls disabled: |
78 | | - # https://github.com/lemurheavy/coveralls-public/issues/1665 |
79 | | - # https://github.com/lemurheavy/coveralls-public/issues/1665 |
80 | | - #coveralls_finish: |
81 | | - # needs: [coverage] |
82 | | - # runs-on: ubuntu-latest |
83 | | - # |
84 | | - # steps: |
85 | | - # - name: coveralls-notify |
86 | | - # #continue-on-error: true |
87 | | - # uses: coverallsapp/github-action@master |
88 | | - # with: |
89 | | - # github-token: ${{ secrets.github_token }} |
90 | | - # parallel-finished: true |
| 80 | + coveralls_finish: |
| 81 | + needs: coverage |
| 82 | + if: ${{always()}} |
| 83 | + runs-on: ubuntu-24.04 |
| 84 | + steps: |
| 85 | + - name: Coveralls Finished |
| 86 | + uses: coverallsapp/github-action@v2 |
| 87 | + with: |
| 88 | + parallel-finished: true |
0 commit comments