summaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
blob: 5ac71b71e9ab79a85da71f7098865e8508a71f3f (plain)
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
name: 'Build Thrift Compiler and Libraries'
on:
  push:
    branches: [ '*' ]
  pull_request:
    branches: [ '*' ]
jobs:
  # TODO windows and macos
  build-thrift-compiler-ubuntu:
    strategy:
        matrix:
          os: [ubuntu-18.04, ubuntu-20.04]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v3

      - name: Install dependencies
        run: |
          # https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners
          sudo apt-get update -yq
          sudo apt-get install -y --no-install-recommends \
            automake \
            bison \
            flex \
            g++ \
            git \
            libboost-all-dev \
            libevent-dev \
            libssl-dev \
            libtool \
            make \
            pkg-config

      - name: Run bootstrap
        run: ./bootstrap.sh

      - name: Run configure
        run: ./configure --disable-debug --disable-tests --disable-libs

      - name: Run make
        run: make -j$(nproc)

      - name: Run install
        run: make install

      - name: Run thrift version
        run: /usr/local/bin/thrift -version