1- name : _build
2- on :
3- workflow_call :
4- inputs :
5- docker_image :
6- description : Docker image
7- type : string
8- required : true
9-
10- jobs :
11- build :
12- runs-on :
13- group : GHA-Kernel-SelfHosted-RG
14- labels : [ self-hosted, kernel-prd-u2404-x64-large-od-ephem ]
15- steps :
16- - name : Checkout code
17- uses : actions/checkout@v4
18- with :
19- ref : ${{ github.ref }}
20- fetch-depth : 0
21-
22- - name : Pull docker image
23- uses : ./.github/actions/pull_docker_image
24- with :
25- image : ${{ inputs.docker_image }}
26- github_token : ${{ secrets.GITHUB_TOKEN }}
27-
28- - name : Build workspace
29- id : build_workspace
30- uses : ./.github/actions/build
31- with :
32- docker_image : ${{ inputs.docker_image }}
33-
34- - name : Create file list for artifacts upload
35- run : |
36- touch ../artifacts/file_list.txt
37- tar -cJf modules.tar.xz ../kobj/tar-install/lib/modules/
38- echo "modules.tar.xz" >> ../artifacts/file_list.txt
39- echo "../kobj/arch/arm64/boot/Image" >> ../artifacts/file_list.txt
40- echo "../kobj/vmlinux" >> ../artifacts/file_list.txt
41- echo "../kobj/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dtb" >> ../artifacts/file_list.txt
42-
43- - name : Upload artifacts
44- uses : ./.github/actions/aws_s3_helper
45- with :
46- s3_bucket : qli-prd-kernel-gh-artifacts
47- aws_access_key_id : ${{ secrets.AWSKEYID }}
48- aws_secret_access_key : ${{ secrets.AWSACCESSKEY }}
49- local_file : ../artifacts/file_list.txt
50- mode : multi-upload
51-
52- - name : Clean up
53- run : |
54- rm -rf ../artifacts
55- rm -rf ../kobj
56- rm -rf modules.tar.xz
57-
58- - name : Update summary
59- if : success() || failure()
60- shell : bash
61- run : |
62- if [ ${{ steps.build_workspace.outcome }} == 'success' ]; then
63- echo "Build was successful"
64- summary=":heavy_check_mark: Build Success"
65- else
66- echo "Build failed"
67- summary=":x: Build Failed"
68- fi
69- SUMMARY='
70- <details><summary><i>Build Summary</i></summary>
71-
72- '${summary}'
73- </details>
74- '
1+ name : _build
2+ on :
3+ workflow_call :
4+ inputs :
5+ docker_image :
6+ description : Docker image
7+ type : string
8+ required : true
9+
10+ jobs :
11+ build :
12+ runs-on :
13+ group : GHA-Kernel-SelfHosted-RG
14+ labels : [ self-hosted, kernel-prd-u2404-x64-large-od-ephem ]
15+ steps :
16+ - name : Checkout code
17+ uses : actions/checkout@v4
18+ with :
19+ ref : ${{ github.ref }}
20+ fetch-depth : 0
21+
22+ - name : Pull docker image
23+ uses : ./.github/actions/pull_docker_image
24+ with :
25+ image : ${{ inputs.docker_image }}
26+ github_token : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Build workspace
29+ id : build_workspace
30+ uses : ./.github/actions/build
31+ with :
32+ docker_image : ${{ inputs.docker_image }}
33+
34+ - name : Create file list for artifacts upload
35+ run : |
36+ touch ../artifacts/file_list.txt
37+ tar -cJf modules.tar.xz ../kobj/tar-install/lib/modules/
38+ echo "modules.tar.xz" >> ../artifacts/file_list.txt
39+ echo "../kobj/arch/arm64/boot/Image" >> ../artifacts/file_list.txt
40+ echo "../kobj/vmlinux" >> ../artifacts/file_list.txt
41+ echo "../kobj/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dtb" >> ../artifacts/file_list.txt
42+
43+ - name : Upload artifacts
44+ uses : ./.github/actions/aws_s3_helper
45+ with :
46+ s3_bucket : qli-prd-kernel-gh-artifacts
47+ aws_access_key_id : ${{ secrets.AWSKEYID }}
48+ aws_secret_access_key : ${{ secrets.AWSACCESSKEY }}
49+ local_file : ../artifacts/file_list.txt
50+ mode : multi-upload
51+
52+ - name : Clean up
53+ run : |
54+ rm -rf ../artifacts
55+ rm -rf ../kobj
56+ rm -rf modules.tar.xz
57+
58+ - name : Update summary
59+ if : success() || failure()
60+ shell : bash
61+ run : |
62+ if [ ${{ steps.build_workspace.outcome }} == 'success' ]; then
63+ echo "Build was successful"
64+ summary=":heavy_check_mark: Build Success"
65+ else
66+ echo "Build failed"
67+ summary=":x: Build Failed"
68+ fi
69+ SUMMARY='
70+ <details><summary><i>Build Summary</i></summary>
71+
72+ '${summary}'
73+ </details>
74+ '
7575 echo -e "$SUMMARY" >> $GITHUB_STEP_SUMMARY
0 commit comments