mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
4b5fbf70f2
For checkstyle, zloop, zfs-qemu, and codeql workflows cancel in-progress jobs when the PR is updated. Relevant GitHub Actions documentation: The following concurrency group cancels in-progress jobs or run on pull_request events only; if github.head_ref is undefined, the concurrency group will fallback to the run ID, which is guaranteed to be both unique and defined for the run. https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #16562
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
name: checkstyle
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
checkstyle:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Install dependencies
|
|
run: |
|
|
# 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
|
|
# 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
|
|
- name: Prepare
|
|
run: |
|
|
sed -i '/DEBUG_CFLAGS="-Werror"/s/^/#/' config/zfs-build.m4
|
|
./autogen.sh
|
|
- name: Configure
|
|
run: |
|
|
./configure
|
|
- name: Make
|
|
run: |
|
|
make -j$(nproc) --no-print-directory --silent
|
|
- name: Checkstyle
|
|
run: |
|
|
make -j$(nproc) --no-print-directory --silent checkstyle
|
|
- name: Lint
|
|
run: |
|
|
make -j$(nproc) --no-print-directory --silent lint
|
|
- name: CheckABI
|
|
id: CheckABI
|
|
run: |
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent checkabi
|
|
- name: StoreABI
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
run: |
|
|
docker run -v $PWD:/source ghcr.io/openzfs/libabigail make -j$(nproc) --no-print-directory --silent storeabi
|
|
- name: Prepare artifacts
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
run: |
|
|
find -name *.abi | tar -cf abi_files.tar -T -
|
|
- uses: actions/upload-artifact@v4
|
|
if: failure() && steps.CheckABI.outcome == 'failure'
|
|
with:
|
|
name: New ABI files (use only if you're sure about interface changes)
|
|
path: abi_files.tar
|