2020-08-12 17:46:26 +00:00
|
|
|
name: checkstyle
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-12-01 20:15:55 +00:00
|
|
|
pull_request:
|
2020-08-12 17:46:26 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-08-24 04:15:25 +00:00
|
|
|
checkstyle:
|
2022-02-07 19:44:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-08-12 17:46:26 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2020-08-24 04:15:25 +00:00
|
|
|
sudo apt-get update
|
2022-02-07 19:44:17 +00:00
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
|
|
|
sudo apt-get install -qq mandoc cppcheck pax-utils devscripts
|
|
|
|
sudo python3 -m pip install --quiet flake8
|
|
|
|
sudo apt-get clean
|
|
|
|
|
|
|
|
# confirm that the tools are installed
|
|
|
|
# the build system doesn't fail when they are not
|
|
|
|
checkbashisms --version
|
|
|
|
cppcheck --version
|
|
|
|
flake8 --version
|
|
|
|
scanelf --version
|
|
|
|
shellcheck --version
|
2020-08-12 17:46:26 +00:00
|
|
|
- name: Prepare
|
|
|
|
run: |
|
2022-02-07 19:44:17 +00:00
|
|
|
./autogen.sh
|
2020-08-12 17:46:26 +00:00
|
|
|
./configure
|
2022-02-07 19:44:17 +00:00
|
|
|
make -j$(nproc) --no-print-directory --silent
|
2020-08-12 17:46:26 +00:00
|
|
|
- name: Checkstyle
|
|
|
|
run: |
|
2022-02-07 19:44:17 +00:00
|
|
|
make -j$(nproc) --no-print-directory --silent checkstyle
|
2020-08-24 04:15:25 +00:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
2022-02-07 19:44:17 +00:00
|
|
|
make -j$(nproc) --no-print-directory --silent lint
|
2020-12-06 17:50:47 +00:00
|
|
|
- name: CheckABI
|
2021-07-20 22:21:00 +00:00
|
|
|
id: CheckABI
|
2020-12-06 17:50:47 +00:00
|
|
|
run: |
|
2022-04-07 23:07:08 +00:00
|
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent checkabi
|
2021-07-20 22:21:00 +00:00
|
|
|
- name: StoreABI
|
|
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
|
|
run: |
|
2022-04-07 23:07:08 +00:00
|
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent storeabi
|
2021-07-20 22:21:00 +00: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
|