aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ubuntu.yml
blob: 68e6291bae544d37c237e0c57b85c064ebea6d70 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Ubuntu

on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - ubuntu-20.04
        config:
          - ""
          - --disable-curses
          - --disable-lua
          - --disable-tre
          - --disable-selinux
          - --disable-acl
          - --disable-help
    runs-on: ${{ matrix.os }}
    env:
      CFLAGS_EXTRA: --coverage
    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Dependency
      run: |
        sudo apt install \
          9base \
          libacl1-dev \
          liblua5.3-dev \
          libncursesw5-dev \
          libselinux1-dev \
          libtermkey-dev \
          libtre-dev \
          lua-lpeg

    - name: Build
      run: |
        ./configure ${{ matrix.config }}
        make

    - name: Test
      run: |
        make test

    - name: Upload Test Coverage
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      run: |
        curl -s https://codecov.io/bash > codecov
        curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/SHA256SUM > codecov.sha256
        if ! sha256sum -c --ignore-missing --status codecov.sha256 ; then
          echo "Download checksum verification failed"
          exit 1
        fi
        bash < codecov