aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-rpm.yml
blob: 007b392baf29d2c2e021e7e6c177a0de4061736a (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
name: RPM Build
on:
  workflow_dispatch:
  schedule:
    # At the end of every day
    - cron: '0 0 * * *'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    - name: Install Ubuntu Prerequisites
      run: |
        sudo apt-get update
        sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev

    - name: Configure nDPI
      run: |
        # fake CentOS 7 env
        echo 'CentOS Linux release 7.9.2009 (Core)' | sudo tee /etc/centos-release
        # symlink source directory for ndpi.spec
        ln -sr . $HOME/nDPI
        ./autogen.sh
        cd packages/rpm
        ./configure

    - name: Build RPM package
      run: |
        make -C packages/rpm package