Skip to content

Move predictor mutex into GBTreeModel (#12022) #346

Move predictor mutex into GBTreeModel (#12022)

Move predictor mutex into GBTreeModel (#12022) #346

Workflow file for this run

name: XGBoost CI (Pre-commit)
on: [push, pull_request]
permissions:
contents: read
jobs:
pre-commit:
name: Run pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install pre-commit
run: python -m pip install pre-commit
- name: Run pre-commit on updated files
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
FROM_REF="${{ github.event.pull_request.base.sha }}"
TO_REF="${{ github.event.pull_request.head.sha }}"
else
FROM_REF="${{ github.event.before }}"
TO_REF="${{ github.sha }}"
fi
if [ "${FROM_REF}" = "0000000000000000000000000000000000000000" ]; then
FROM_REF="$(git hash-object -t tree /dev/null)"
fi
pre-commit run --from-ref "${FROM_REF}" --to-ref "${TO_REF}" --show-diff-on-failure