mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-15 20:50:30 +03:00
4f6e0ca117
Update the GitHub actions workflows using a subset of the changes
from the master branch, commit 620a977f22
. Cherry-picking each
relevant commit would have resulted in a large number of conflicts
so this change only applies a minimal set of useful updates.
- Added build-dependencies.txt and checkstyle-dependencies.txt
- Added reclaim_disk_space.sh script
- Minor changes to build steps
- Reduced ztest run time
- checkbashisms, mandoc, and cppcheck were not included to
avoid additional backports
- Add exceptions for shellcheck
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: checkstyle
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
jobs:
|
|
checkstyle:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install dependencies
|
|
run: |
|
|
# 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
|
|
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
|
|
- name: Prepare
|
|
run: |
|
|
sh ./autogen.sh
|
|
./configure
|
|
make -j$(nproc)
|
|
- name: Checkstyle
|
|
run: |
|
|
make checkstyle
|
|
- name: Lint
|
|
run: |
|
|
make lint
|
|
- name: CheckABI
|
|
id: CheckABI
|
|
run: |
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make checkabi
|
|
- name: StoreABI
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
run: |
|
|
sudo docker run -v $(pwd):/source ghcr.io/openzfs/libabigail make storeabi
|
|
- name: Prepare artifacts
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
run: |
|
|
find -name *.abi | tar -cf abi_files.tar -T -
|
|
- uses: actions/upload-artifact@v3
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
with:
|
|
name: New ABI files (use only if you're sure about interface changes)
|
|
path: abi_files.tar
|