Edit

kc3-lang/libevent/.github/workflows/coverage.yml

Branch :

  • Browse

    Commit

  • Author : Azat Khuzhin
    Date : 2021-12-02 10:27:16
    Hash : e1ecc6fa
    Message : Switch coverage to ubuntu 18.04 It seems that there is no 16.04 image anymore, since github actions was not able to find it for 24 hours [1]. [1]: https://github.com/libevent/libevent/actions/runs/1522612189

  • .github/workflows/coverage.yml
  • ---
    name: coverage
    
    on:
      push:
        branches:
          - master
        paths-ignore:
          - '**.md'
          - '.mailmap'
          - 'ChangeLog*'
          - 'whatsnew*'
          - 'LICENSE'
    
    jobs:
      linux:
        runs-on: ubuntu-18.04
        if: "!contains(github.event.head_commit.message, 'ci skip')"
        steps:
          - uses: actions/checkout@v2.0.0
          - name: Cache
            uses: actions/cache@v1.0.3
            with:
              path: build
              key: ${{ matrix.os }}-coverage-v2
    
          - name: Install Depends
            run: sudo apt install zlib1g-dev libssl-dev build-essential lcov libmbedtls-dev
    
          - name: Build
            shell: bash
            run: |
                export JOBS=20
                mkdir -p build
                cd build
                cmake .. -DEVENT__COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
                make -j $JOBS
    
          - name: Test
            shell: bash
            run: |
                export CTEST_PARALLEL_LEVEL=$JOBS
                export CTEST_OUTPUT_ON_FAILURE=1
                cd build
                make verify_coverage
    
          - name: Coveralls GitHub Action
            uses: coverallsapp/github-action@v1.0.1
            with:
              github-token: ${{ secrets.GITHUB_TOKEN }}
              path-to-lcov: ./build/coverage.info.cleaned
    
          - uses: actions/upload-artifact@v1
            if: failure()
            with:
              name: coverage-build
              path: build