2020-08-12 20:46:26 +03:00
|
|
|
name: checkstyle
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-12-01 23:15:55 +03:00
|
|
|
pull_request:
|
2020-08-12 20:46:26 +03:00
|
|
|
|
|
|
|
jobs:
|
2020-08-24 07:15:25 +03:00
|
|
|
checkstyle:
|
2021-11-02 23:02:57 +03:00
|
|
|
runs-on: ubuntu-20.04
|
2020-08-12 20:46:26 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-08-24 07:15:25 +03:00
|
|
|
sudo apt-get update
|
2020-08-12 20:46:26 +03:00
|
|
|
sudo apt-get install --yes -qq build-essential autoconf libtool gawk alien fakeroot linux-headers-$(uname -r)
|
2022-01-13 19:51:12 +03:00
|
|
|
sudo apt-get install --yes -qq zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libssl-dev python3 python3-dev python3-setuptools python3-cffi
|
2020-08-12 20:46:26 +03:00
|
|
|
# packages for tests
|
|
|
|
sudo apt-get install --yes -qq parted lsscsi ksh attr acl nfs-kernel-server fio
|
2021-08-31 23:56:45 +03:00
|
|
|
sudo apt-get install --yes -qq mandoc cppcheck pax-utils devscripts
|
2020-08-24 07:15:25 +03:00
|
|
|
sudo -E pip --quiet install flake8
|
2020-08-12 20:46:26 +03:00
|
|
|
- name: Prepare
|
|
|
|
run: |
|
|
|
|
sh ./autogen.sh
|
|
|
|
./configure
|
2020-12-06 20:50:47 +03:00
|
|
|
make -j$(nproc)
|
2020-08-12 20:46:26 +03:00
|
|
|
- name: Checkstyle
|
|
|
|
run: |
|
|
|
|
make checkstyle
|
2020-08-24 07:15:25 +03:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
|
|
|
make lint
|
2020-12-06 20:50:47 +03:00
|
|
|
- name: CheckABI
|
2021-07-21 01:21:00 +03:00
|
|
|
id: CheckABI
|
2020-12-06 20:50:47 +03:00
|
|
|
run: |
|
2021-08-31 20:53:12 +03:00
|
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make checkabi
|
2021-07-21 01:21:00 +03:00
|
|
|
- name: StoreABI
|
|
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
|
|
run: |
|
2021-08-31 20:53:12 +03:00
|
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make storeabi
|
2021-07-21 01:21:00 +03:00
|
|
|
- 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
|