You've already forked meta-qcom-extras
mirror of
https://github.com/linux-msm/meta-qcom-extras.git
synced 2026-02-25 13:14:43 -08:00
.github: switch to TuxOE plans
Use TuxOE plans to submit multiple jobs at once, instead of matrix build since it uses one Github Action job for each build. Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
This commit is contained in:
103
.github/workflows/build-template.yml
vendored
103
.github/workflows/build-template.yml
vendored
@@ -26,16 +26,12 @@ on:
|
||||
env:
|
||||
POKY_URL: http://git.yoctoproject.org/git/poky
|
||||
DISTRO: poky
|
||||
TCLIBC: glibc musl
|
||||
|
||||
jobs:
|
||||
meta-qcom-premerge-build-test:
|
||||
name: ${{ matrix.machine }}/${{ matrix.tclibc }}
|
||||
build:
|
||||
name: ${{github.event_name}} - ${{github.ref}}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
machine: ${{ fromJson(inputs.machines) }}
|
||||
tclibc: [glibc, musl]
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
@@ -44,51 +40,60 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade tuxsuite
|
||||
- name: Setup tux definition
|
||||
env:
|
||||
MACHINE: ${{ matrix.machine }}
|
||||
TCLIBC: ${{ matrix.tclibc }}
|
||||
REF: ${{ inputs.ref }}
|
||||
IMAGES: ${{ inputs.images }}
|
||||
HOST: ${{ inputs.host }}
|
||||
BRANCH: ${{ inputs.branch }}
|
||||
URL: ${{ inputs.url }}
|
||||
- name: Setup tux plan
|
||||
run: |
|
||||
cat << EOF > tux.json
|
||||
{
|
||||
"sources": {
|
||||
"git_trees": [
|
||||
{
|
||||
"url": "$POKY_URL",
|
||||
"branch": "$BRANCH"
|
||||
},
|
||||
{
|
||||
"url": "$URL",
|
||||
"ref": "$REF"
|
||||
}
|
||||
]
|
||||
},
|
||||
"container": "$HOST",
|
||||
"envsetup": "poky/oe-init-build-env",
|
||||
"distro": "$DISTRO",
|
||||
"machine": "$MACHINE",
|
||||
"target": "$IMAGES",
|
||||
"bblayers_conf": [
|
||||
"BBLAYERS += '../meta-qcom/'"
|
||||
],
|
||||
"artifacts": [
|
||||
"\$DEPLOY_DIR"
|
||||
],
|
||||
"environment": {
|
||||
},
|
||||
"local_conf": [
|
||||
"INHERIT += 'buildstats buildstats-summary'",
|
||||
"TCLIBC := '$TCLIBC'"
|
||||
]
|
||||
}
|
||||
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
|
||||
- ref: ${{inputs.ref}}
|
||||
url: ${{inputs.url}}
|
||||
distro: $DISTRO
|
||||
target: ${{inputs.images}}
|
||||
bblayers_conf:
|
||||
- BBLAYERS += '../meta-qcom/'
|
||||
artifacts:
|
||||
- \$DEPLOY_DIR
|
||||
EOF
|
||||
|
||||
for tclibc in ${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 ${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 bake submit tux.json
|
||||
tuxsuite plan plan.yaml
|
||||
env:
|
||||
TUXSUITE_TOKEN: ${{ secrets.TUXSUITE_TOKEN }}
|
||||
|
||||
3
.github/workflows/premerge.yml
vendored
3
.github/workflows/premerge.yml
vendored
@@ -9,8 +9,7 @@ jobs:
|
||||
with:
|
||||
host: ubuntu-20.04
|
||||
images: core-image-base core-image-weston core-image-x11 initramfs-test-image initramfs-test-full-image initramfs-firmware-image initramfs-rootfs-image cryptodev-module
|
||||
machines: >-
|
||||
['dragonboard-410c', 'dragonboard-845c', 'qrb5165-rb5', 'qcom-armv8a', 'sdx55-mtp', 'sa8155p-adp', 'qcom-armv7a']
|
||||
machines: dragonboard-410c dragonboard-845c qrb5165-rb5 qcom-armv8a sdx55-mtp sa8155p-adp qcom-armv7a
|
||||
ref: refs/pull/${{github.event.pull_request.number}}/merge
|
||||
branch: ${{github.base_ref}}
|
||||
url: ${{github.server_url}}/${{github.repository}}
|
||||
|
||||
3
.github/workflows/push.yml
vendored
3
.github/workflows/push.yml
vendored
@@ -13,8 +13,7 @@ jobs:
|
||||
with:
|
||||
host: ubuntu-20.04
|
||||
images: core-image-base core-image-weston core-image-x11 initramfs-test-image initramfs-test-full-image initramfs-firmware-image initramfs-rootfs-image cryptodev-module
|
||||
machines: >-
|
||||
['dragonboard-410c', 'dragonboard-845c', 'qrb5165-rb5', 'qcom-armv8a', 'sdx55-mtp', 'sa8155p-adp', 'qcom-armv7a']
|
||||
machines: dragonboard-410c dragonboard-845c qrb5165-rb5 qcom-armv8a sdx55-mtp sa8155p-adp qcom-armv7a
|
||||
ref: ${{github.sha}}
|
||||
branch: ${{github.ref_name}}
|
||||
url: ${{github.server_url}}/${{github.repository}}
|
||||
|
||||
Reference in New Issue
Block a user