rockchip-rv1106: disable wic #103
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
name: build-gg | |
on: | |
workflow_dispatch: | |
inputs: | |
upload-zip: | |
description: 'Create image zip files, upload to GH artifact store and provide a link.' | |
type: boolean | |
required: false | |
default: false | |
upload-source-zip: | |
description: 'Create source zip files, upload to GH artifact store and a provide a link, this means also building images without network.' | |
type: boolean | |
required: false | |
default: false | |
clean: | |
description: 'Clean sstate + downloads dir, force download + rebuild of everything.' | |
type: boolean | |
required: false | |
default: false | |
push: | |
branches: | |
- master-next | |
jobs: | |
clean: | |
runs-on: codebuild-${{ vars.CODEBUILD_RUNNER_NAME }}-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- name: clean sstate-cache + downloads | |
if: inputs.clean | |
shell: bash | |
run: | |
rm -rf /sstate-cache/* | |
rm -rf /downloads/* | |
build: | |
needs: clean | |
strategy: | |
fail-fast: false | |
matrix: | |
device: | |
- qemuarm | |
- qemuarm64 | |
- qemux86-64 | |
- aws-ec2-arm64 | |
- aws-ec2-x86-64 | |
- raspberrypi2 | |
- raspberrypi-64 | |
image: | |
- aws-iot-greengrass-demo-image | |
- aws-iot-greengrass-demo-simple-image | |
exclude: | |
- image: aws-iot-greengrass-demo-image | |
device: qemuarm | |
- image: aws-iot-greengrass-demo-image | |
device: qemuarm64 | |
- image: aws-iot-greengrass-demo-image | |
device: qemux86-64 | |
- image: aws-iot-greengrass-demo-image | |
device: aws-ec2-arm64 | |
- image: aws-iot-greengrass-demo-image | |
device: aws-ec2-x86-64 | |
runs-on: codebuild-${{ vars.CODEBUILD_RUNNER_NAME }}-${{ github.run_id }}-${{ github.run_attempt }} | |
steps: | |
- name: checkout meta-aws-demos branch to build | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: build fast | |
if: ${{ !inputs.upload-source-zip }} | |
shell: bash | |
run: | | |
chown yoctouser /sstate-cache | |
chown yoctouser /downloads | |
chown -R yoctouser . | |
sysctl vm.mmap_min_addr=65536 | |
env | |
sudo -u yoctouser bash -c '\ | |
whoami && \ | |
id && \ | |
. init-build-env && | |
export SSTATE_DIR=/sstate-cache && \ | |
export DL_DIR=/downloads && \ | |
export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS SSTATE_DIR DL_DIR" && \ | |
export DEVICE=${{ matrix.device }} && \ | |
export IMAGE=${{ matrix.image }} && \ | |
bitbake $IMAGE -f && \ | |
bitbake-getvar -q --value -r greengrass-bin PV > GREENGRASS_PV ' | |
- name: fetch sources and build from pre-fetched sources without network | |
if: inputs.upload-source-zip | |
shell: bash | |
run: | | |
chown -R yoctouser . | |
sysctl vm.mmap_min_addr=65536 | |
env | |
sudo -u yoctouser bash -c '\ | |
whoami && \ | |
id && \ | |
. init-build-env && | |
export BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS" && \ | |
export DEVICE=${{ matrix.device }} && \ | |
export IMAGE=${{ matrix.image }} && \ | |
bitbake $IMAGE --runall=fetch && \ | |
echo BB_NO_NETWORK = \"1\" > conf/site.conf && \ | |
bitbake $IMAGE && \ | |
bitbake-getvar -q --value -r greengrass-bin PV > GREENGRASS_PV ' | |
- name: Generate readme | |
run: | | |
mkdir ${{ github.workspace }}/zipfile/ | |
cp ${{ github.workspace }}/.github/workflows/build-gg-artifacts/readme-greengrass-template.txt ${{ github.workspace }}/zipfile/readme.txt | |
cat ${{ github.workspace }}/.github/workflows/build-gg-artifacts/readme-license.txt >> ${{ github.workspace }}/zipfile/readme.txt | |
sed -i 's|{{ VERSION_LINK }}|${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|g' ${{ github.workspace }}/zipfile/readme.txt | |
sed -i "s|{{ GREENGRASS_PV }}|$(cat ${{ github.workspace }}/build/GREENGRASS_PV)|g" ${{ github.workspace }}/zipfile/readme.txt | |
- name: Generate readme, raspberrypi-64 | |
if: ${{ startsWith(matrix.device, 'raspberrypi-64') && startsWith(matrix.image, 'aws-iot-greengrass-demo-image') }} | |
run: | | |
echo -e "\n###############################################################################\n#" >> ${{ github.workspace }}/zipfile/readme.txt | |
echo -e "# LIST OF PACKAGES WITH THEIR LICENSE AND VERSION\n#" >> ${{ github.workspace }}/zipfile/readme.txt | |
echo -e "###############################################################################\n" >> ${{ github.workspace }}/zipfile/readme.txt | |
cat ${{ github.workspace }}/build/tmp/deploy/licenses/raspberrypi_armv8/${{ matrix.image }}-raspberrypi-armv8.rootfs/license.manifest >> ${{ github.workspace }}/zipfile/readme.txt | |
- name: cp image (raspberrypi) to zip dir | |
if: startsWith(matrix.device, 'raspberrypi2') | |
shell: bash | |
run: | | |
cp ${{ github.workspace }}/build/tmp/deploy/images/${{ matrix.device }}/${{ matrix.image }}-${{ matrix.device }}.rootfs.wic ${{ github.workspace }}/zipfile/${{ matrix.image }}-${{ matrix.device }}.img | |
ls -la ${{ github.workspace }}/zipfile/ | |
- name: cp image (raspberrypi-) to zip dir | |
if: startsWith(matrix.device, 'raspberrypi-64') | |
shell: bash | |
run: | | |
cp ${{ github.workspace }}/build/tmp/deploy/images/raspberrypi-armv8/${{ matrix.image }}-raspberrypi-armv8.rootfs.wic ${{ github.workspace }}/zipfile/${{ matrix.image }}-${{ matrix.device }}.img | |
ls -la ${{ github.workspace }}/zipfile/ | |
- name: cp image (aws-ec2) to zip dir | |
if: startsWith(matrix.device, 'aws-ec2') | |
shell: bash | |
run: | | |
cp ${{ github.workspace }}/build/tmp/deploy/images/${{ matrix.device }}/${{ matrix.image }}-${{ matrix.device }}.rootfs.wic.vhd ${{ github.workspace }}/zipfile/aws-greengrass-demo-image.wic.vhd | |
cp ${{ github.workspace }}/build/tmp/deploy/images/${{ matrix.device }}/${{ matrix.image }}-${{ matrix.device }}.rootfs.testdata.json ${{ github.workspace }}/zipfile/ | |
cp ${{ github.workspace }}/layers/sw/meta-aws/scripts/ec2-ami/README.md ${{ github.workspace }}/zipfile/ | |
cp ${{ github.workspace }}/layers/sw/meta-aws/scripts/ec2-ami/vmimport-cfn.yml ${{ github.workspace }}/zipfile/ | |
cp ${{ github.workspace }}/.github/workflows/build-gg-artifacts/ec2/create-ec2-ami.sh ${{ github.workspace }}/zipfile/ | |
cp -r ${{ github.workspace }}/layers/sw/meta-aws/scripts/ec2-ami/* ${{ github.workspace }}/zipfile/ | |
echo "To upload the image to EC2 run: bash ./create-ec2-ami.sh amitest-bucket 16 aws-greengrass-demo-image aws-ec2-arm64" >> ${{ github.workspace }}/zipfile/readme.txt | |
ls -la ${{ github.workspace }}/zipfile/ | |
- name: Create and save zipfile | |
if: (startsWith(matrix.device, 'raspberrypi') || startsWith(matrix.device, 'aws-ec2') ) && inputs.upload-zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.image }}_${{ matrix.device }} | |
path: | | |
${{ github.workspace }}/zipfile/* | |
retention-days: 5 | |
- name: Upload sourece zipfile | |
if: (startsWith(matrix.device, 'raspberrypi') || startsWith(matrix.device, 'aws-ec2') ) && inputs.upload-source-zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.image }}_${{ matrix.device }}_downloads | |
path: | | |
${{ github.workspace }}/build/downloads/* | |
!${{ github.workspace }}/build/downloads/*/ | |
retention-days: 5 |