-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Neil Armstrong <[email protected]>
- Loading branch information
1 parent
2255f69
commit 1b0e973
Showing
3 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
host: | ||
required: true | ||
type: string | ||
images: | ||
required: true | ||
type: string | ||
machines: | ||
required: true | ||
type: string | ||
url: | ||
required: true | ||
type: string | ||
branch: | ||
required: true | ||
type: string | ||
ref: | ||
required: true | ||
type: string | ||
ref_type: | ||
type: string | ||
default: ref | ||
tclibc: | ||
type: string | ||
default: glibc | ||
secrets: | ||
TUXSUITE_TOKEN: | ||
required: true | ||
|
||
env: | ||
POKY_URL: https://git.yoctoproject.org/poky | ||
DISTRO: poky | ||
|
||
jobs: | ||
build: | ||
name: ${{github.event_name}} - ${{github.ref}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: "3.x" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade tuxsuite | ||
- name: Setup tux plan | ||
run: | | ||
cat << EOF > plan.yaml | ||
name: CI for ${{github.repository}} | ||
description: ${{github.workflow}} - ${{github.ref}} | ||
version: 1 | ||
common: &commondata | ||
container: ${{inputs.host}} | ||
envsetup: poky/oe-init-build-env | ||
sources: | ||
git_trees: | ||
- branch: ${{inputs.branch}} | ||
url: $POKY_URL | ||
- ${{inputs.ref_type}}: ${{inputs.ref}} | ||
url: ${{inputs.url}} | ||
distro: $DISTRO | ||
target: ${{inputs.images}} | ||
bblayers_conf: | ||
- BBLAYERS += '../$(echo ${{github.repository}} | cut -d'/' -f2)' | ||
artifacts: [] | ||
EOF | ||
for tclibc in ${{inputs.tclibc}}; do | ||
cat << EOF >> plan.yaml | ||
${tclibc}: &${tclibc} | ||
local_conf: | ||
- INHERIT += 'buildstats buildstats-summary' | ||
- INHERIT:remove = 'rm_work' | ||
- TCLIBC := '${tclibc}' | ||
EOF | ||
done | ||
cat << EOF >> plan.yaml | ||
jobs: | ||
EOF | ||
for tclibc in ${{inputs.tclibc}}; do | ||
cat << EOF >> plan.yaml | ||
- name: ${tclibc} | ||
bakes: | ||
EOF | ||
for machine in ${{inputs.machines}}; do | ||
cat << EOF >> plan.yaml | ||
- { <<: [*commondata, *${tclibc}], machine: ${machine}, name: ${machine}-${tclibc} } | ||
EOF | ||
done | ||
done | ||
echo "Ready to submit this Tux Plan:" | ||
cat plan.yaml | ||
- name: Run build | ||
run: | | ||
tuxsuite plan plan.yaml | ||
env: | ||
TUXSUITE_TOKEN: ${{ secrets.TUXSUITE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Pull Request Build | ||
|
||
on: | ||
pull_request_target: | ||
branches: | ||
- kirkstone | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build-template.yml | ||
with: | ||
host: ubuntu-20.04 | ||
images: core-image-base core-image-weston core-image-x11 amlogic-image-headless-initrd amlogic-image-headless-sd amlogic-image-sato | ||
machines: amlogic-p200 amlogic-p200-sdboot amlogic-p201-sdboot amlogic-p212 amlogic-p212-sdboot amlogic-s400 friendlyelec-nanopik2 hardkernel-odroidc2 hardkernel-odroidc2-sdboot hardkernel-odroidc4 hardkernel-odroidc4-sdboot hardkernel-odroidhc4 hardkernel-odroidhc4-sdboot hardkernel-odroidn2 hardkernel-odroidn2-sdboot hardkernel-odroidn2plus hardkernel-odroidn2plus-sdboot khadas-vim khadas-vim-sdboot khadas-vim2 khadas-vim3 khadas-vim3-sdboot khadas-vim3l khadas-vim3l-sdboot libretech-ac libretech-cc radxa-zero seirobotics-sei510 seirobotics-sei610 | ||
ref: refs/pull/${{github.event.pull_request.number}}/merge | ||
branch: ${{github.base_ref}} | ||
url: ${{github.server_url}}/${{github.repository}} | ||
secrets: | ||
TUXSUITE_TOKEN: ${{ secrets.TUXSUITE_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Push Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- kirkstone | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build-template.yml | ||
with: | ||
host: ubuntu-20.04 | ||
images: core-image-base core-image-weston core-image-x11 amlogic-image-headless-initrd amlogic-image-headless-sd amlogic-image-sato | ||
machines: amlogic-p200 amlogic-p200-sdboot amlogic-p201-sdboot amlogic-p212 amlogic-p212-sdboot amlogic-s400 friendlyelec-nanopik2 hardkernel-odroidc2 hardkernel-odroidc2-sdboot hardkernel-odroidc4 hardkernel-odroidc4-sdboot hardkernel-odroidhc4 hardkernel-odroidhc4-sdboot hardkernel-odroidn2 hardkernel-odroidn2-sdboot hardkernel-odroidn2plus hardkernel-odroidn2plus-sdboot khadas-vim khadas-vim-sdboot khadas-vim2 khadas-vim3 khadas-vim3-sdboot khadas-vim3l khadas-vim3l-sdboot libretech-ac libretech-cc radxa-zero seirobotics-sei510 seirobotics-sei610 | ||
ref_type: sha | ||
ref: ${{github.sha}} | ||
branch: ${{github.ref_name}} | ||
url: ${{github.server_url}}/${{github.repository}} | ||
secrets: | ||
TUXSUITE_TOKEN: ${{ secrets.TUXSUITE_TOKEN }} |