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 : Sync codebase
17
+ id : sync
18
+ uses : ./.github/actions/sync
19
+ with :
20
+ base_branch : ${{ github.base_ref }}
21
+ pr_url : ${{ github.event.pull_request.ssh_url }}
22
+ pr_number : ${{ github.event.pull_request.number }}
23
+
24
+ - name : Pull docker image
25
+ uses : ./.github/actions/pull_docker_image
26
+ with :
27
+ image : ${{ inputs.docker_image }}
28
+ github_token : ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ - name : Build workspace
31
+ id : build_workspace
32
+ uses : ./.github/actions/build
33
+ with :
34
+ docker_image : ${{ inputs.docker_image }}
35
+ workspace_path : ${{ steps.sync.outputs.workspace_path }}
36
+
37
+ - name : Create file list for artifacts upload
38
+ run : |
39
+ cd ${{ steps.sync.outputs.workspace_path }}
40
+ touch ../artifacts/file_list.txt
41
+ tar -cJf modules.tar.xz ../kobj/tar-install/lib/modules/
42
+ echo "modules.tar.xz" >> ../artifacts/file_list.txt
43
+ echo "../kobj/arch/arm64/boot/Image" >> ../artifacts/file_list.txt
44
+ echo "../kobj/vmlinux" >> ../artifacts/file_list.txt
45
+ echo "../kobj/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dtb" >> ../artifacts/file_list.txt
46
+
47
+ - name : Upload artifacts
48
+ uses : ./.github/actions/aws_s3_helper
49
+ with :
50
+ s3_bucket : qli-prd-kernel-gh-artifacts
51
+ local_file : ${{ steps.sync.outputs.workspace_path }}/../artifacts/file_list.txt
52
+ mode : multi-upload
53
+
54
+ - name : Clean up
55
+ run : |
56
+ cd ${{ steps.sync.outputs.workspace_path }}
57
+ rm -rf ../artifacts
58
+ rm -rf ../kobj
59
+ rm -rf modules.tar.xz
60
+
61
+ - name : Update summary
62
+ if : success() || failure()
63
+ shell : bash
64
+ run : |
65
+ if [ ${{ steps.build_workspace.outcome }} == 'success' ]; then
66
+ echo "Build was successful"
67
+ summary=":heavy_check_mark: Build Success"
68
+ else
69
+ echo "Build failed"
70
+ summary=":x: Build Failed"
71
+ fi
72
+ SUMMARY='
73
+ <details><summary><i>Build Summary</i></summary>
74
+
75
+ '${summary}'
76
+ </details>
77
+ '
75
78
echo -e "$SUMMARY" >> $GITHUB_STEP_SUMMARY
0 commit comments