forked from u-boot/u-boot
-
Notifications
You must be signed in to change notification settings - Fork 3
112 lines (96 loc) · 3.2 KB
/
checks.yml
File metadata and controls
112 lines (96 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Checks
on:
workflow_call:
inputs:
strategy:
required: false
type: string
default: "commit" # when supported, or "file"
checkpatch_extraignores:
type: string
default: ""
defconfigs:
required: false
type: string
default: ""
outputs:
fatal:
value: ${{ jobs.checks.outputs.fatal}}
summary:
value: ${{ jobs.checks.outputs.summary }}
jobs:
checks:
timeout-minutes: 7200
runs-on: [self-hosted, repo-only, v4]
continue-on-error: true
outputs:
fatal: ${{ steps.assert.outputs.fatal }}
summary: ${{ steps.assert.outputs.summary }}
steps:
- uses: analogdevicesinc/doctools/checkout@action
- name: Get sources
run: |
get_file () {
echo https://raw.githubusercontent.com/analogdevicesinc/u-boot/refs/heads/ci/$1
curl -sL -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -o $1 \
https://raw.githubusercontent.com/analogdevicesinc/u-boot/refs/heads/ci/$1
}
mkdir -p ci
get_file ci/build.sh
get_file ci/runner_env.sh
- name: Apply cocci
run: |
source ./ci/build.sh
apply_prerun
- name: Assert state
if: ${{ failure() }}
run: |
source ./ci/build.sh
set_step_fail "assert_state"
echo "fatal=true" >> "$GITHUB_ENV"
- name: License
if: ${{ !cancelled() && env.fatal != 'true' }}
run: |
source ./ci/build.sh
check_license
- name: Check patch
if: ${{ !cancelled() && env.fatal != 'true' }}
run: |
export CHECKPATCH_EXTRAIGNORES="${{ inputs.checkpatch_extraignores }}";
status=0; timeout 1d bash -c "source ./ci/build.sh ; check_checkpatch ${{ inputs.strategy }}" || status=$?
[ $status -eq 124 ] && echo "step_fail_checkpatch_timeout=true" >> "$GITHUB_ENV"
exit $status
- name: Coccicheck
if: ${{ !cancelled() && env.fatal != 'true' }}
run: |
status=0; timeout 1d bash -c "source ./ci/build.sh ; check_coccicheck" || status=$?
[ $status -eq 124 ] && echo "step_fail_coccicheck_timeout=true" >> "$GITHUB_ENV"
exit $status
- name: Configure buildman toolchains
if: ${{ !cancelled() && env.fatal != 'true' }}
run: |
arm_gcc=$(basename "$(find /opt/gcc/armv7-eabihf/bin -maxdepth 1 -name '*gcc' | head -n 1)")
aarch64_gcc=$(basename "$(find /opt/gcc/aarch64/bin -maxdepth 1 -name '*gcc' | head -n 1)")
arm_prefix="/opt/gcc/armv7-eabihf/bin/${arm_gcc%gcc}"
aarch64_prefix="/opt/gcc/aarch64/bin/${aarch64_gcc%gcc}"
cat > "$HOME/.buildman" <<EOF
[toolchain-prefix]
arm = $arm_prefix
aarch64 = $aarch64_prefix
EOF
- name: Check qconfig
if: ${{ !cancelled() && env.fatal != 'true' }}
run: |
source ./ci/build.sh
list=$(mktemp)
cat > "$list" <<'EOF'
${{ inputs.defconfigs }}
EOF
check_qconfig "$list"
- name: Export labels
if: ${{ !cancelled() }}
id: assert
run: |
echo "fatal=$fatal" >> "$GITHUB_OUTPUT"
source ./ci/runner_env.sh
export_job_summary