| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
name: Lint |
| 6 |
description: Lint |
| 7 |
|
| 8 |
inputs: |
| 9 |
nix-shell: |
| 10 |
description: Run in the specified Nix environment if exists |
| 11 |
default: "ci-linter" |
| 12 |
nix-cache: |
| 13 |
description: Determine whether to enable nix cache |
| 14 |
default: "false" |
| 15 |
nix-verbose: |
| 16 |
description: Determine wether to suppress nix log or not |
| 17 |
default: 'false' |
| 18 |
custom_shell: |
| 19 |
description: The shell to use. Only relevant if no nix-shell specified |
| 20 |
default: "bash" |
| 21 |
cross-prefix: |
| 22 |
description: Binary prefix for cross compilation |
| 23 |
default: "" |
| 24 |
gh_token: |
| 25 |
description: Github access token to use |
| 26 |
required: true |
| 27 |
runs: |
| 28 |
using: composite |
| 29 |
steps: |
| 30 |
- uses: ./.github/actions/setup-shell |
| 31 |
with: |
| 32 |
nix-shell: ${{ inputs.nix-shell }} |
| 33 |
custom_shell: ${{ inputs.custom_shell }} |
| 34 |
nix-cache: ${{ inputs.nix-cache }} |
| 35 |
nix-verbose: ${{ inputs.nix-verbose }} |
| 36 |
gh_token: ${{ inputs.gh_token }} |
| 37 |
script: | |
| 38 |
cat >> $GITHUB_STEP_SUMMARY << EOF |
| 39 |
## Setup |
| 40 |
Architecture: $(uname -m) |
| 41 |
- $(uname -a) |
| 42 |
- $(nix --version) |
| 43 |
- $(clang-format --version) |
| 44 |
- $(${{ matrix.target.cross-prefix }}gcc --version | grep -m1 "") |
| 45 |
- $(bash --version | grep -m1 "") |
| 46 |
EOF |
| 47 |
- name: Run linter |
| 48 |
shell: ${{ env.SHELL }} |
| 49 |
run: | |
| 50 |
echo "## Lint & Checks" >> $GITHUB_STEP_SUMMARY |
| 51 |
lint |