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:
|
2022-11-12 15:48:32 +03:00
|
|
|
runs-on: ubuntu-22.04
|
2020-08-12 20:46:26 +03:00
|
|
|
steps:
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/checkout@v4
|
2020-08-12 20:46:26 +03:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-02-27 20:19:25 +03:00
|
|
|
# https://github.com/orgs/community/discussions/47863
|
|
|
|
sudo apt-mark hold grub-efi-amd64-signed
|
|
|
|
sudo apt-get update --fix-missing
|
|
|
|
sudo apt-get upgrade
|
2022-02-07 22:44:17 +03:00
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
2022-11-12 15:48:32 +03:00
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/checkstyle-dependencies.txt apt-get install -qq
|
2022-02-07 22:44:17 +03:00
|
|
|
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 20:46:26 +03:00
|
|
|
- name: Prepare
|
|
|
|
run: |
|
2022-02-07 22:44:17 +03:00
|
|
|
./autogen.sh
|
2020-08-12 20:46:26 +03:00
|
|
|
./configure
|
2022-02-07 22:44:17 +03:00
|
|
|
make -j$(nproc) --no-print-directory --silent
|
2020-08-12 20:46:26 +03:00
|
|
|
- name: Checkstyle
|
|
|
|
run: |
|
2022-02-07 22:44:17 +03:00
|
|
|
make -j$(nproc) --no-print-directory --silent checkstyle
|
2020-08-24 07:15:25 +03:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
2022-02-07 22:44:17 +03:00
|
|
|
make -j$(nproc) --no-print-directory --silent 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: |
|
2022-04-08 02:07:08 +03:00
|
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent checkabi
|
2021-07-21 01:21:00 +03:00
|
|
|
- name: StoreABI
|
|
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
|
|
run: |
|
2022-04-08 02:07:08 +03:00
|
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent 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 -
|
2024-01-27 01:22:26 +03:00
|
|
|
- uses: actions/upload-artifact@v4
|
2021-07-21 01:21:00 +03:00
|
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
|
|
with:
|
|
|
|
name: New ABI files (use only if you're sure about interface changes)
|
|
|
|
path: abi_files.tar
|