mirror of
https://github.com/SCST-project/scst.git
synced 2026-10-22 14:12:33 +00:00
The checkpatch workflows fetch checkpatch.pl, spelling.txt and const_structs.checkpatch with a plain curl. When raw.githubusercontent.com rate-limits the runner, curl saves the HTTP 429 error page as checkpatch.pl and exits successfully. The next step then runs that page as a script, so every commit fails with ./checkpatch.pl: line 1: 429:: command not found which looks like a checkpatch failure of the pull request. Pass -f so that an HTTP error fails the download step, and --retry 5 so that transient errors, including HTTP 429, are retried first. Also use -sSL to keep the log quiet and follow redirects.
33 lines
1010 B
YAML
33 lines
1010 B
YAML
name: Checkpatch upon push
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
checkpatch:
|
|
name: ${{matrix.commit.message}}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
commit: ${{github.event.commits}}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@main
|
|
with:
|
|
ref: ${{matrix.commit.id}}
|
|
fetch-depth: 2
|
|
|
|
- name: Download checkpatch.pl
|
|
run: |
|
|
curl -fsSL --retry 5 https://raw.githubusercontent.com/torvalds/linux/master/scripts/checkpatch.pl -o checkpatch.pl
|
|
curl -fsSL --retry 5 https://raw.githubusercontent.com/torvalds/linux/master/scripts/spelling.txt -o spelling.txt
|
|
curl -fsSL --retry 5 https://raw.githubusercontent.com/torvalds/linux/master/scripts/const_structs.checkpatch -o const_structs.checkpatch
|
|
chmod +x checkpatch.pl
|
|
|
|
- name: Run checkpatch.pl
|
|
run: |
|
|
git format-patch -1 --stdout | CHECKPATCH_PATH=. ./scripts/checkpatch
|