1
1
inputs :
2
+ bitbake_buildname :
3
+ default : ' build'
2
4
bitbake_prefix :
3
5
default : ' '
6
+ bitbake_machine :
7
+ default : ' raspberrypi5'
4
8
bitbake_target :
5
9
default : ' core-image-weston-wpe'
6
10
bitbake_source :
15
19
run : |
16
20
echo "Environment:"
17
21
echo "======================================================================"
22
+ echo "BITBAKE_BUILDNAME=${{ inputs.bitbake_buildname }}"
23
+ echo "BITBAKE_MACHINE=${{ inputs.bitbake_machine }}"
18
24
echo "BITBAKE_PREFIX=${{ inputs.bitbake_prefix }}"
19
25
echo "BITBAKE_SOURCE=${{ inputs.bitbake_source }}"
20
26
echo "BITBAKE_TARGET=${{ inputs.bitbake_target }}"
@@ -24,18 +30,39 @@ runs:
24
30
shell : bash
25
31
run : |
26
32
cd ~/yocto-meta-wpe-image-${{ inputs.repo_release }}
27
- rm -rf tmp
28
33
ulimit -n 4096
29
- #source sources/meta-wpe-image/scripts/setup-environment ${{ inputs.bitbake_source }}
30
- source setup-environment ${{ inputs.bitbake_source }}
34
+ source sources/meta-wpe-image/scripts/setup-environment ${{ inputs.bitbake_buildname}} ${{ inputs.bitbake_machine }} ${{ inputs.bitbake_source }}
35
+ MAX_RETRIES=5
36
+ export ${{ inputs.bitbake_prefix }}
37
+ for i in $(seq 1 $MAX_RETRIES); do
38
+ echo "Attempt $i to fetch sources for $IMAGE..."
39
+ if bitbake ${{ inputs.bitbake_target }} --runall=fetch; then
40
+ echo "All sources fetched successfully."
41
+ break
42
+ fi
43
+
44
+ if [ $i -lt $MAX_RETRIES ]; then
45
+ echo "Retrying fetch process..."
46
+ else
47
+ echo "Max retries reached. Some sources may still be missing."
48
+ fi
49
+ done
31
50
${{ inputs.bitbake_prefix }} bitbake ${{ inputs.bitbake_target }}
51
+ - name : Generate timestamped prefix
52
+ id : timestamp
53
+ shell : bash
54
+ run : |
55
+ TIMESTAMP=$(date +"%Y%m%d%H%M")
56
+ echo "prefix=${TIMESTAMP}" >> $GITHUB_OUTPUT
32
57
- name : Artifacts
33
58
if : always()
34
59
shell : bash
35
- run : |
36
- ls -lh ~/yocto-meta-wpe-image-${{ inputs.repo_release }}/builds/*/tmp/deploy/images/*/
60
+ run : |
61
+ ls -lh ~/yocto-meta-wpe-image-${{ inputs.repo_release }}/builds/${{ inputs.bitbake_buildname }}/tmp/deploy/images/${{ inputs.bitbake_machine }}/
62
+ PREFIX=${{ steps.timestamp.outputs.prefix }}
63
+ s3cmd put --recursive ~/yocto-meta-wpe-image-${{ inputs.repo_release }}/builds/${{ inputs.bitbake_buildname }}/tmp/deploy/images/${{ inputs.bitbake_machine }} s3://yocto/${PREFIX}-${{ inputs.bitbake_buildname }}-${{ inputs.bitbake_target }}/
37
64
- name : Clean the tmp dir
38
65
if : always()
39
66
shell : bash
40
67
run : |
41
- rm -rf ~/yocto-meta-wpe-image-${{ inputs.repo_release }}/builds/* /tmp
68
+ rm -rf ~/yocto-meta-wpe-image-${{ inputs.repo_release }}/builds/${{ inputs.bitbake_buildname }} /tmp
0 commit comments