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:
|
2023-03-02 22:53:34 +00:00
|
|
|
runs-on: ubuntu-22.04
|
2020-08-12 17:46:26 +00:00
|
|
|
steps:
|
2022-10-11 19:59:06 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-08-12 17:46:26 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2023-03-02 22:58:21 +00: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
|
2023-03-03 00:18:27 +00:00
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/build-dependencies.txt apt-get install -qq
|
|
|
|
sudo xargs --arg-file=${{ github.workspace }}/.github/workflows/checkstyle-dependencies.txt apt-get install -qq
|
|
|
|
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
|
|
|
|
flake8 --version
|
|
|
|
scanelf --version
|
|
|
|
shellcheck --version
|
2020-08-12 17:46:26 +00:00
|
|
|
- name: Prepare
|
|
|
|
run: |
|
|
|
|
sh ./autogen.sh
|
|
|
|
./configure
|
2020-12-06 17:50:47 +00:00
|
|
|
make -j$(nproc)
|
2020-08-12 17:46:26 +00:00
|
|
|
- name: Checkstyle
|
|
|
|
run: |
|
|
|
|
make checkstyle
|
2020-08-24 04:15:25 +00:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
|
|
|
make 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: |
|
2021-08-31 17:53:12 +00:00
|
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make checkabi
|
2021-07-20 22:21:00 +00:00
|
|
|
- name: StoreABI
|
|
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
|
|
run: |
|
2021-08-31 17:53:12 +00:00
|
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make 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 -
|
2022-10-12 06:33:38 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2021-07-20 22:21:00 +00: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
|