Skip to content

Commit 8c39781

Browse files
committed
ci: Add hdl project check, compile defconfig, devicetree
Add if hdl tag is present in devicetree. Compile common defconfig and devicetrees. Signed-off-by: Jorge Marques <jorge.marques@analog.com>
1 parent 847b31f commit 8c39781

File tree

12 files changed

+315
-21
lines changed

12 files changed

+315
-21
lines changed

.github/workflows.mirror/cron.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Synchronization cron
2+
13
on:
24
workflow_dispatch:
35
schedule:

.github/workflows.mirror/self.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Self synchronization
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/build.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Kernel build
2+
13
on:
24
workflow_call:
35
inputs:
@@ -19,6 +21,9 @@ on:
1921
CHECKS:
2022
type: boolean
2123
default: false
24+
AUTO_FROM_RANGE:
25+
type: boolean
26+
default: true
2227
outputs:
2328
fail:
2429
value: ${{ jobs.build.outputs.fail }}
@@ -62,6 +67,7 @@ jobs:
6267
fi
6368
echo "CROSS_COMPILE=${{ inputs.CROSS_COMPILE }}" >> $GITHUB_ENV
6469
echo "ARCH=${{ inputs.ARCH }}" >> $GITHUB_ENV
70+
echo "AUTO_FROM_RANGE={{ inputs.AUTO_FROM_RANGE }}" >> $GITHUB_ENV
6571
6672
- name: Make defconfig
6773
run: |
@@ -72,14 +78,20 @@ jobs:
7278
make defconfig
7379
fi
7480
75-
- name: Imply driver config and apply cocci/bash
81+
- name: Imply driver config
82+
if: ${{ env.AUTO_FROM_RANGE == 'true' }}
7683
run: |
7784
source ci/build.sh
7885
auto_set_kconfig
86+
87+
- name: Apply cocci/bash and save defconfig
88+
run: |
89+
source ci/build.sh
7990
apply_prerun
8091
make savedefconfig
8192
8293
- name: Compile devicetrees
94+
if: ${{ env.AUTO_FROM_RANGE == 'true' }}
8395
run: |
8496
source ci/build.sh
8597
compile_devicetree
@@ -90,6 +102,7 @@ jobs:
90102
compile_kernel
91103
92104
- name: Assert compiled
105+
if: ${{ env.AUTO_FROM_RANGE == 'true' }}
93106
run: |
94107
source ci/build.sh
95108
assert_compiled
@@ -132,7 +145,7 @@ jobs:
132145
- name: Store the distribution packages
133146
uses: actions/upload-artifact@v4
134147
with:
135-
name: dist-${{ env.CID }}-${{ inputs.ARCH }}
148+
name: dist-${{ env.run_id }}-${{ env.CID }}-${{ inputs.ARCH }}
136149
path: dist
137150

138151
- name: Assert compile

.github/workflows/checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Checks
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/cron.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Synchronization cron
2+
13
on:
24
workflow_dispatch:
35
schedule:

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Maintenance
2+
13
on:
24
push:
35
branches:
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Many devicetrees
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
CXX:
7+
type: string
8+
default: ""
9+
CROSS_COMPILE:
10+
type: string
11+
default: ""
12+
ARCHS:
13+
required: true
14+
type: string
15+
DTS_FILES:
16+
required: true
17+
type: string
18+
outputs:
19+
fail:
20+
value: ${{ jobs.build.outputs.fail }}
21+
warn:
22+
value: ${{ jobs.build.outputs.warn }}
23+
24+
env:
25+
run_id: ${{ github.run_id }}
26+
27+
jobs:
28+
build:
29+
timeout-minutes: 7200
30+
runs-on: [self-hosted, v1]
31+
32+
outputs:
33+
fail: ${{ steps.assert.outputs.fail }}
34+
warn: ${{ steps.assert.outputs.warn }}
35+
36+
steps:
37+
- uses: analogdevicesinc/doctools/checkout@v1
38+
39+
- name: Prepare env
40+
run: |
41+
if [[ ! -z "${{ inputs.CXX }}" ]]; then
42+
echo "CXX=gcc-${{ inputs.CXX }}" >> $GITHUB_ENV
43+
fi
44+
echo "ARCHS=${{ inputs.ARCHS }}" >> $GITHUB_ENV
45+
echo "DTS_FILES=${{ inputs.DTS_FILES }}" >> $GITHUB_ENV
46+
47+
- name: Compile many devicetrees
48+
run: |
49+
source ci/build.sh
50+
compile_many_devicetree
51+
52+
- name: Prepare dist
53+
run: |
54+
if [[ -d dist ]]; then
55+
rm -r dist
56+
fi
57+
mkdir -p dist/dtb
58+
find . -type f -name *.dtb| \
59+
xargs -I % cp --parents % dist/dtb
60+
61+
- name: Store the distribution packages
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: dist-dtb-${{ env.CXX }}
65+
path: dist
66+
67+
- name: Assert
68+
id: assert
69+
run: |
70+
source ci/runner_env.sh
71+
export_labels

.github/workflows/mirror.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Mirror synchronization
2+
13
on:
24
workflow_call:
35
inputs:

.github/workflows/stage-build.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Kernel build (common defconfigs, many devicetrees)
2+
3+
on:
4+
on:
5+
workflow_run:
6+
workflows: ["Kernel build (changed files)"]
7+
branches:
8+
- main
9+
- rpi-6.1.y
10+
- rpi-6.6.y
11+
- rpi-6.12.y
12+
- staging-rpi/*
13+
types:
14+
- completed
15+
16+
jobs:
17+
build_gcc_arm_zynq_xcomm_adv7511_defconfig:
18+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
19+
uses: ./.github/workflows/build.yml
20+
secrets: inherit
21+
with:
22+
CXX: "14"
23+
CROSS_COMPILE: "arm-suse-linux-gnueabi-"
24+
ARCH: "arm"
25+
DEFCONFIG: "zynq_xcomm_adv7511_defconfig"
26+
AUTO_FROM_RANGE: false
27+
build_gcc_arm_socfpga_adi_defconfig:
28+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
29+
uses: ./.github/workflows/build.yml
30+
secrets: inherit
31+
with:
32+
CXX: "14"
33+
CROSS_COMPILE: "arm-suse-linux-gnueabi-"
34+
ARCH: "arm"
35+
DEFCONFIG: "socfpga_adi_defconfig"
36+
AUTO_FROM_RANGE: false
37+
build_gcc_arm_zynq_pluto_defconfig:
38+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
39+
uses: ./.github/workflows/build.yml
40+
secrets: inherit
41+
with:
42+
CXX: "14"
43+
CROSS_COMPILE: "arm-suse-linux-gnueabi-"
44+
ARCH: "arm"
45+
DEFCONFIG: "zynq_pluto_defconfig"
46+
AUTO_FROM_RANGE: false
47+
build_gcc_arm_zynq_m2k_defconfig:
48+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
49+
uses: ./.github/workflows/build.yml
50+
secrets: inherit
51+
with:
52+
CXX: "14"
53+
CROSS_COMPILE: "arm-suse-linux-gnueabi-"
54+
ARCH: "arm"
55+
DEFCONFIG: "zynq_m2k_defconfig"
56+
AUTO_FROM_RANGE: false
57+
build_gcc_aarch64_adi_zynqmp_defconfig:
58+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
59+
uses: ./.github/workflows/build.yml
60+
secrets: inherit
61+
with:
62+
CXX: "14"
63+
CROSS_COMPILE: "aarch64-suse-linux-"
64+
ARCH: "arm64"
65+
DEFCONFIG: "adi_zynqmp_defconfig"
66+
AUTO_FROM_RANGE: false
67+
build_gcc_arm_adi_versal_defconfig:
68+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
69+
uses: ./.github/workflows/build.yml
70+
secrets: inherit
71+
with:
72+
CXX: "14"
73+
CROSS_COMPILE: "arm-suse-linux-gnueabi-"
74+
ARCH: "arm"
75+
DEFCONFIG: "adi_versal_defconfig"
76+
AUTO_FROM_RANGE: false
77+
many_devicetrees:
78+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
79+
uses: ./.github/workflows/many_devicetrees.yml
80+
secrets: inherit
81+
with:
82+
CXX: "14"
83+
ARCHS: "arm arm64 microblaze nios2"
84+
DTS_FILES: >
85+
arch/microblaze/boot/dts/*.dts
86+
arch/arm/boot/dts/xilinx/zynq-*.dts
87+
arch/arm/boot/dts/intel/socfpga/socfpga_*.dts
88+
arch/arm64/boot/dts/xilinx/zynqmp-*.dts
89+
arch/arm64/boot/dts/xilinx/versal-*.dts
90+
arch/nios2/boot/dts/*.dts
91+
assert:
92+
runs-on: [self-hosted, v1]
93+
needs:
94+
- build_gcc_arm_zynq_xcomm_adv7511_defconfig
95+
- build_gcc_arm_socfpga_adi_defconfig
96+
- build_gcc_arm_zynq_pluto_defconfig
97+
- build_gcc_arm_zynq_m2k_defconfig
98+
- build_gcc_aarch64_adi_zynqmp_defconfig
99+
- build_gcc_arm_adi_versal_defconfig
100+
- many_devicetrees
101+
steps:
102+
- name: Assert
103+
env:
104+
job_warn_build_gcc_arm_zynq_xcomm_adv7511_defconfig: ${{needs.build_gcc_arm_zynq_xcomm_adv7511_defconfig.outputs.warn}}
105+
job_fail_build_gcc_arm_zynq_xcomm_adv7511_defconfig: ${{needs.build_gcc_arm_zynq_xcomm_adv7511_defconfig.outputs.fail}}
106+
job_warn_build_gcc_arm_socfpga_adi_defconfig: ${{needs.build_gcc_arm_socfpga_adi_defconfig.outputs.warn}}
107+
job_fail_build_gcc_arm_socfpga_adi_defconfig: ${{needs.build_gcc_arm_socfpga_adi_defconfig.outputs.fail}}
108+
job_warn_build_gcc_arm_zynq_pluto_defconfig: ${{needs.build_gcc_arm_zynq_pluto_defconfig.outputs.warn}}
109+
job_fail_build_gcc_arm_zynq_pluto_defconfig: ${{needs.build_gcc_arm_zynq_pluto_defconfig.outputs.fail}}
110+
job_warn_build_gcc_arm_zynq_m2k_defconfig: ${{needs.build_gcc_arm_zynq_m2k_defconfig.outputs.warn}}
111+
job_fail_build_gcc_arm_zynq_m2k_defconfig: ${{needs.build_gcc_arm_zynq_m2k_defconfig.outputs.fail}}
112+
job_warn_build_gcc_aarch64_adi_zynqmp_defconfig: ${{needs.build_gcc_aarch64_adi_zynqmp_defconfig.outputs.warn}}
113+
job_fail_build_gcc_aarch64_adi_zynqmp_defconfig: ${{needs.build_gcc_aarch64_adi_zynqmp_defconfig.outputs.fail}}
114+
job_warn_build_gcc_arm_adi_versal_defconfig: ${{needs.build_gcc_arm_adi_versal_defconfig.outputs.warn}}
115+
job_fail_build_gcc_arm_adi_versal_defconfig: ${{needs.build_gcc_arm_adi_versal_defconfig.outputs.fail}}
116+
job_warn_many_devicetrees: ${{needs.many_devicetrees.outputs.warn}}
117+
job_fail_many_devicetrees: ${{needs.many_devicetrees.outputs.fail}}
118+
run: |
119+
curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -L -o runner_env.sh \
120+
https://raw.githubusercontent.com/${{ github.repository }}/$GITHUB_SHA/ci/runner_env.sh
121+
source runner_env.sh
122+
assert_labels
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: Kernel build (changed files)
2+
13
on:
24
push:
35
branches:
@@ -60,10 +62,15 @@ jobs:
6062
CHECKS: true
6163
assert:
6264
runs-on: [self-hosted, v1]
63-
needs: [checks, build_gcc_x86_64, build_llvm_x86_64, build_gcc_aarch64, build_gcc_arm]
65+
needs:
66+
- checks
67+
- build_gcc_x86_64
68+
- build_llvm_x86_64
69+
- build_gcc_aarch64
70+
- build_gcc_arm
6471

6572
steps:
66-
- name: Assert checks
73+
- name: Assert
6774
env:
6875
job_warn_checks: ${{needs.checks.outputs.warn}}
6976
job_warn_build_gcc_x86_64: ${{needs.build_gcc_x86_64.outputs.warn}}

0 commit comments

Comments
 (0)