aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/macos.yml
blob: b0468eeb634fc16256987f12c89aa63bcc085e8f (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
name: macOS

on: [push, pull_request]

jobs:
  build:
    strategy:
      matrix:
        os:
          - macos-10.15
        config:
          - ""
          - --disable-curses
          - --disable-lua
          - --disable-tre
          - --disable-help
    runs-on: ${{ matrix.os }}
    env:
      CFLAGS_EXTRA: --coverage
    steps:

    - name: Checkout
      uses: actions/checkout@v2

    - name: Dependency Homebrew
      run: |
        brew install \
          libtermkey \
          lua \
          luarocks \
          tre \
          pkg-config

    - name: Dependency LuaRocks
      run: |
        luarocks install lpeg
        luarocks install busted

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

    - name: Test
      run: |
        make test

    - name: Upload Test Coverage
      env:
        CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      run: |
        bash <(curl -s https://codecov.io/bash)