aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ubuntu.yml
blob: 695badd6a394764ef6eb174e171b58a03114682d (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
name: Build Ubuntu

on: [push]

jobs:
  ubuntu:
    name: Build & Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Install deps
        run: sudo tools/debian-setup.sh --install-optional --install-test-deps --install-deb-deps python3-pip -y
      - name: Mkdir
        run: mkdir build
      - name: Cmake
        working-directory: build
        run: cmake -GNinja ..
      - name: Build
        run: ninja
        working-directory: build
      - name: Build test-programs
        run: ninja test-programs
        working-directory: build
      - name: Set up Python 3.8
        uses: actions/setup-python@v1
        with:
          python-version: 3.8
      - name: Install pytest
        run: pip install pytest pytest-xdist
      - name: Run tests
        env:
          PYTEST_ADDOPTS: --skip-missing-programs=rawshark
        run: pytest
        working-directory: build
      - name: Build debian pkg
        run: dpkg-buildpackage -b -us -uc -jauto
      - name: Move deb packages
        run: |
          mkdir deb
          mv ../*.deb deb
      - name: Upload deb packages
        uses: actions/upload-artifact@v1
        with:
          name: packages
          path: deb