Skip to content

Some hidden stairs functions #745

Some hidden stairs functions

Some hidden stairs functions #745

Workflow file for this run

name: Check C Headers
on:
pull_request:
paths: 'headers/**'
branches:
- master
workflow_call:
inputs:
no-format-on-check-fail:
required: false
type: boolean
default: false
jobs:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile
run: make -C headers headers-aligned CFLAGS='-Wno-incompatible-library-redeclaration'
implicit-padding-check:
runs-on: ubuntu-latest
needs: compile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile with implicit packing
run: make -C headers headers-packed CFLAGS='-Wno-incompatible-library-redeclaration'
compile-no-builtin:
runs-on: ubuntu-latest
needs: compile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile with no builtin function declarations
run: make -C headers headers-no-builtin
compile-unsized:
runs-on: ubuntu-latest
needs: compile
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compile with unsized types
run: make -C headers headers-unsized
format-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Format check
run: make -C headers format-check
format:
runs-on: ubuntu-latest
needs: format-check
if: failure() && !inputs.no-format-on-check-fail
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Format
run: make -C headers format
- name: Package reformatted files
run: zip clang-format-output.zip $(git diff --relative --name-only)
working-directory: headers
- name: Upload reformatted files
uses: actions/upload-artifact@v4
with:
name: formatted-headers
path: headers/clang-format-output.zip
retention-days: 1
- name: Provide download link
run: |
echo 'Download link: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts'
echo "You can download these properly formatted header files if you don't have the formatter (clang-format) set up in your environment."