-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (48 loc) · 2.67 KB
/
build-maaxboard-demo-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: build-maaxboard-demo-image
on:
workflow_dispatch:
inputs:
yocto-image:
description: "The yocto image to build"
required: false
default: "core-image-base"
jobs:
build-yocto:
runs-on: [self-hosted, build]
container:
image: ghcr.io/avnet-iotconnect/meta-iotconnect/build-iotc-sdk-dunfell:latest
options: --user pokyuser
credentials:
username: ${{github.actor}}
password: ${{secrets.GHCR_PAT}}
steps:
- name: "Run yocto build"
run: |
cd /home/pokyuser
cd MaaXBoard_IoTC
git config --global user.email "avnet-ci@example.com" && git config --global user.name "Avnet Iotc CI" && git config --global color.ui false && repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.72-2.2.3.xml && repo sync && git clone https://github.com/Avnet/meta-maaxboard.git -b hardknott sources/meta-maaxboard
set +e
MACHINE=maaxboard source sources/meta-maaxboard/tools/maaxboard-setup.sh -b maaxboard/build
cd ../../
source sources/poky/oe-init-build-env maaxboard/build/
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone https://github.com/avnet-iotconnect/meta-iotconnect.git -b hardknott ../../sources/meta-iotconnect
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone https://github.com/avnet-iotconnect/meta-iotconnect-demos.git -b hardknott ../../sources/meta-iotconnect-demos
bitbake-layers add-layer ../../sources/meta-iotconnect
bitbake-layers add-layer ../../sources/meta-iotconnect-demos
GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" bitbake ${{ github.event.inputs.yocto-image }}
cd /home/pokyuser/
cp /home/pokyuser/MaaXBoard_IoTC/maaxboard/build/tmp/deploy/images/maaxboard/${{ github.event.inputs.yocto-image }}-maaxboard.wic ${{ github.event.inputs.yocto-image }}-maaxboard-demo.wic
gzip -v ${{ github.event.inputs.yocto-image }}-maaxboard-demo.wic
shell: bash {0}
- uses: hkusu/s3-upload-action@v2.1.0
id: s3-upload
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
aws-bucket: 'iotconnect-sdk-images'
file-path: /home/pokyuser/${{ github.event.inputs.yocto-image }}-maaxboard-demo.wic.gz
destination-dir: '${{ github.head_ref || github.ref_name }}/maaxboard/'
bucket-root: "MPU/"
public: true
output-file-url: 'true'