Files
CoolProp/.github/workflows/dev_clangformat.yml
Jeff Henning 67fe92cf79 Update Clang workflow to use latest artifacts
Updated dev_clang workflow to use action/upload-artifact@v4 since v3 is deprecated.
2025-02-13 11:08:05 -05:00

34 lines
990 B
YAML

name: Development Clang Format
on:
push:
branches: [ 'master', 'main', 'develop', 'dev_checks' ]
# tags: [ 'v*' ]
pull_request:
branches: [ 'master', 'main', 'develop' ]
#schedule:
# - cron: '15 8 * * 3' # Run weekly
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history (especially branches)
- name: Run clang-format against C++ files touched by the PR
shell: bash
run: |
echo "GITHUB_REF=$GITHUB_REF GITHUB_BASE_REF=$GITHUB_BASE_REF GITHUB_HEAD_REF=$GITHUB_HEAD_REF"
git fetch --all
clang-format --version
./dev/ci/clang-format.sh remotes/origin/$GITHUB_HEAD_REF remotes/origin/$GITHUB_BASE_REF
- name: Upload clang-format patch as artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: CoolProp-${{ github.sha }}-clang_format.patch
path: clang_format.patch