aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/checkstyle.yaml
blob: 33276d26909234e8658a5ad0c16cc17d312e9db9 (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
48
49
50
name: checkstyle

on:
  push:
  pull_request:

jobs:
  checkstyle:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.event.pull_request.head.sha }}
    - name: Install dependencies
      run: |
        sudo apt-get update
        sudo apt-get install --yes -qq build-essential autoconf libtool gawk alien fakeroot linux-headers-$(uname -r)
        sudo apt-get install --yes -qq zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev python-dev python-setuptools python-cffi python3 python3-dev python3-setuptools python3-cffi
        # packages for tests
        sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio
        sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts abigail-tools
        sudo -E pip --quiet install flake8
    - name: Prepare
      run: |
        sh ./autogen.sh
        ./configure
        make -j$(nproc)
    - name: Checkstyle
      run: |
        make checkstyle
    - name: Lint
      run: |
        make lint
    - name: CheckABI
      id: CheckABI
      run: |
        make checkabi
    - name: StoreABI
      if: failure() && steps.CheckABI.outcome == 'failure'
      run: |
        make storeabi
    - name: Prepare artifacts
      if: failure() && steps.CheckABI.outcome == 'failure'
      run: |
        find -name *.abi | tar -cf abi_files.tar -T -
    - uses: actions/upload-artifact@v2
      if: failure() && steps.CheckABI.outcome == 'failure'
      with:
        name: New ABI files (use only if you're sure about interface changes)
        path: abi_files.tar