Skip to content

chore: bump version to 9.11.2 (#4909) #7189

chore: bump version to 9.11.2 (#4909)

chore: bump version to 9.11.2 (#4909) #7189

Workflow file for this run

name: Lint
on:
push:
branches:
- master
- 'releases/**'
pull_request:
branches:
- '*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
python-formatting:
name: lint.python.formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: false
- name: Init submodules with retry
shell: bash
run: |
git config --global --add safe.directory "$(pwd)"
for attempt in 1 2 3 4 5; do
if git submodule update --init --recursive; then
echo "Submodule init succeeded on attempt $attempt"
exit 0
fi
echo "Attempt $attempt failed, retrying in 15s..."
sleep 15
done
echo "Submodule init failed after 5 attempts"
exit 1
- name: Install python dependencies
run: |
sudo apt-get update || true
sudo apt-get install -y python3-pip
pip install black black[jupyter]
- shell: bash
run: |
python -m black --check . --exclude ext_libs/ || (echo -e "---\nTo fix, run:\n\tpython -m black . --exclude ext_libs"; exit 1)
cpp-formatting:
name: lint.c++.formatting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install clang-format
# This is only needed if the diff check runs as it installs 'clang-format-diff'
# 'clang-format' is available by default
if: github.event_name == 'pull_request'
shell: bash
run: |
sudo apt update
sudo apt install clang-format
clang-format --version
- name: Check code formatting for codebase
shell: bash
run: ./utl/clang-format.sh check
env:
GH_WORKFLOW_LOGGING: true
- name: Check code formatting for diff
# Only run the diff check for pull requests
if: github.event_name == 'pull_request'
shell: bash
run: |
if [[ ! -f .clang-format ]]; then
echo "Cannot find .clang-format file!"
exit 1
fi
git diff origin/master...HEAD -U0 --no-color | clang-format-diff -r '^.*\.(cc|h)$' -p1 > clang_format_diff.txt
if [ -s clang_format_diff.txt ]; then
cat clang_format_diff.txt
echo "::error:: Formatting issues found"
echo "To fix:"
echo -e "\tUse the clang-format.sh script in docker mode:"
echo -e "\t\tRun: \"./utl/clang-format.sh docker fix\""
echo -e "\tOr, install the right verson of clang-format locally"
echo -e "\t\tRun: \"git diff upstream/master...HEAD -U0 --no-color | clang-format-diff -r '^.*\.(cc|h)$' -p1 -i\""
echo -e "\tBe sure to check your version of clang-format. The version used here is..."
clang-format --version
exit 1
else
echo "No formatting issues found in the PR diff."
fi
run-clang-tidy:
name: lint.c++.clang-tidy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v18
- name: Run clang-tidy
run: |
echo "::group::nix develop -c vw-clang-tidy"
nix develop -c vw-clang-tidy | tee tidy_out.txt || true
# Prevent false positives for THROW("error: ...") by using the prepended :
grep -A 3 ": error: " tidy_out.txt > tidy_onlyerrors.txt || true
echo "::endgroup::"
if [ -s tidy_onlyerrors.txt ]; then
# file has contents
echo "::group::clang-tidy errors"
cat tidy_onlyerrors.txt
echo "::endgroup::"
exit 11
fi