Skip to content

Commit a2a94c7

Browse files
committed
ci: Enhance GitHub Actions for Bitbake Build and Repo
* Added steps to clean the build directory and download artifacts in `bitbake-build/action.yml`. * Added artifact upload functionality in `bitbake-repo/action.yml`. * Changed runner environment from `self-hosted` to `ubuntu-22.04` in `test-build.yml` for consistency and reliability. * Installed necessary packages (`git`, `git-lfs`, `repo`) in `bitbake-repo/action.yml` to ensure environment readiness.
1 parent fd9f570 commit a2a94c7

File tree

3 files changed

+36
-8
lines changed

3 files changed

+36
-8
lines changed

.github/actions/bitbake-build/action.yml

+18
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,28 @@ runs:
2121
echo "BITBAKE_TARGET=${{ inputs.bitbake_target }}"
2222
echo "RELEASE=${{ inputs.repo_release }}"
2323
echo "======================================================================"
24+
- name: Clean the build dir
25+
shell: bash
26+
run: |
27+
rm -rf ~/yocto-webkit-${{ inputs.repo_release }}
28+
rm -rf ~/yocto-webkit-${{ inputs.repo_release }}.tar
29+
- name: Download artifact
30+
uses: actions/download-artifact@v4
31+
with:
32+
name: yocto-webkit-${{ inputs.repo_release }}
33+
path: ~/
34+
- name: Untar Work Dir
35+
shell: bash
36+
run: |
37+
cd ~
38+
tar -xf yocto-webkit-${{ inputs.repo_release }}.tar
39+
rm -rf ~/yocto-webkit-${{ inputs.repo_release }}.tar
2440
- name: Build
2541
shell: bash
2642
run: |
2743
cd ~/yocto-webkit-${{ inputs.repo_release }}
44+
mkdir ~/yocto-webkit-${{ inputs.repo_release }}/builds/
45+
cp /local-host.conf ~/yocto-webkit-${{ inputs.repo_release }}/builds/
2846
ulimit -n 4096
2947
source sources/meta-webkit/.github/scripts/setup-environment ${{ inputs.bitbake_source }}
3048
rm -rf tmp

.github/actions/bitbake-repo/action.yml

+14-4
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,28 @@ runs:
2020
- name: Set bitbake environment
2121
shell: bash
2222
run: |
23-
mkdir -p ~/yocto-webkit-${{ inputs.repo_release }}/builds
24-
cp /local-host.conf ~/yocto-webkit-${{ inputs.repo_release }}/builds/
23+
sudo apt-get install -y git git-lfs repo
24+
mkdir -p ~/yocto-webkit-${{ inputs.repo_release }}
2525
cd ~/yocto-webkit-${{ inputs.repo_release }}
26-
rm -rf sources .repo
2726
repo init -u ${{ inputs.repo_url }} -m .github/manifest/manifest-${{ inputs.repo_release }}.xml -b ${{ inputs.repo_ref }}
2827
repo sync --force-sync
2928
pushd sources/meta-webkit
30-
git remote remove tmp || true
29+
git config --global user.email "[email protected]"
30+
git config --global user.name "meta-webkit CI Bot"
3131
git remote add tmp ${{ inputs.repo_url }}
3232
git fetch tmp main
3333
git fetch tmp ${{ inputs.repo_ref }}:${{ inputs.repo_ref }}
3434
git checkout ${{ inputs.repo_ref }}
3535
git rebase tmp/main
3636
popd
37+
- name: Tar Work Dir
38+
shell: bash
39+
run: |
40+
cd ~
41+
tar -cf yocto-webkit-${{ inputs.repo_release }}.tar yocto-webkit-${{ inputs.repo_release }}
42+
- name: Upload Tar Work Dir Artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: yocto-webkit-${{ inputs.repo_release }}
46+
path: ~/yocto-webkit-${{ inputs.repo_release }}.tar
3747

.github/workflows/test-build.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: [pull_request]
33
jobs:
44

55
kirkstone-repo:
6-
runs-on: self-hosted
6+
runs-on: ubuntu-22.04
77
if: "!contains(github.event.head_commit.message, 'ci skip')"
88
steps:
99
- uses: actions/checkout@v3
@@ -23,7 +23,7 @@ jobs:
2323
needs: kirkstone-repo
2424

2525
scarthgap-repo:
26-
runs-on: self-hosted
26+
runs-on: ubuntu-22.04
2727
if: "!contains(github.event.head_commit.message, 'ci skip')"
2828
steps:
2929
- uses: actions/checkout@v3
@@ -84,7 +84,7 @@ jobs:
8484
needs: scarthgap-repo
8585

8686
styhead-repo:
87-
runs-on: self-hosted
87+
runs-on: ubuntu-22.04
8888
if: "!contains(github.event.head_commit.message, 'ci skip')"
8989
steps:
9090
- uses: actions/checkout@v3
@@ -104,7 +104,7 @@ jobs:
104104
needs: styhead-repo
105105

106106
walnascar-repo:
107-
runs-on: self-hosted
107+
runs-on: ubuntu-22.04
108108
continue-on-error: true
109109
if: "!contains(github.event.head_commit.message, 'ci skip')"
110110
steps:

0 commit comments

Comments
 (0)