1name: C Header File 2on: 3 push: 4 branches: 5 - main 6 pull_request: 7 8permissions: 9 contents: read 10 11# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main. 12concurrency: 13 group: ${{ github.workflow }}-${{ github.ref }} 14 cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} 15 16jobs: 17 c-header-file: 18 name: "C Header File" 19 runs-on: ubuntu-latest 20 21 steps: 22 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 23 24 - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 25 with: 26 toolchain: stable 27 28 - name: Build the library and generate the C header file 29 run: cargo build --features capi --release --no-default-features 30 31 - name: Ensure that there is no diff in the header file. 32 run: git diff --exit-code include/avif/avif.h 33