mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:30:05 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			40 lines
		
	
	
	
		
			925 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
	
		
			925 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: clang-format-check
 | |
| 
 | |
| on:
 | |
|   workflow_dispatch:
 | |
|   pull_request:
 | |
|     branches:
 | |
|       - 'develop'
 | |
| 
 | |
| concurrency:
 | |
|   # Cancel in-progress jobs for the same pull request
 | |
|   group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
 | |
|   cancel-in-progress: true
 | |
| 
 | |
| jobs:
 | |
|   format:
 | |
|     runs-on: ubuntu-24.04
 | |
|     steps:
 | |
| 
 | |
|     - name: Checkout
 | |
|       uses: actions/checkout@v4
 | |
|       with:
 | |
|         fetch-depth: 0
 | |
|         submodules: false
 | |
| 
 | |
|     - name: Update References
 | |
|       shell: bash
 | |
|       run: |
 | |
|         git fetch origin develop
 | |
| 
 | |
|     - name: Setup Ubuntu Environment
 | |
|       shell: bash
 | |
|       run: |
 | |
|         sudo apt-get install clang-format-17
 | |
| 
 | |
|     - name: Check Formatting
 | |
|       shell: bash
 | |
|       run: |
 | |
|         MERGE_BASE=$(git merge-base origin/develop ${{ github.event.pull_request.head.sha || github.ref }})
 | |
|         echo "Comparing against ${MERGE_BASE}"
 | |
|         git clang-format-17 --diff --style=file -v ${MERGE_BASE}
 | 
