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: |
|
2024-09-19 00:24:12 +03:00
|
|
|
# for x in lxd core20 snapd; do sudo snap remove $x; done
|
|
|
|
sudo apt-get purge -y snapd google-chrome-stable firefox
|
|
|
|
ONLY_DEPS=1 .github/workflows/scripts/qemu-3-deps.sh ubuntu22
|
|
|
|
sudo apt-get install -y cppcheck devscripts mandoc pax-utils shellcheck
|
|
|
|
sudo python -m pipx install --quiet flake8
|
2022-02-07 22:44:17 +03:00
|
|
|
# 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: |
|
2024-09-19 00:24:12 +03:00
|
|
|
sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4
|
2022-02-07 22:44:17 +03:00
|
|
|
./autogen.sh
|
2024-09-19 00:24:12 +03:00
|
|
|
- name: Configure
|
|
|
|
run: |
|
2020-08-12 20:46:26 +03:00
|
|
|
./configure
|
2024-09-19 00:24:12 +03:00
|
|
|
- name: Make
|
|
|
|
run: |
|
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
|