Skip to content

Commit

Permalink
build-gg-lite.yml: add upload sources zip
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-roos committed Dec 4, 2024
1 parent 6533044 commit 88180b6
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/build-gg-lite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ on:
type: boolean
required: false
default: false

upload-source-zip:
description: 'source zip files should be uploaded to GH artifact store and a link will provided, this means also building without network'
type: boolean
required: false
default: false
push:
branches:
- master-next
Expand Down Expand Up @@ -61,7 +65,8 @@ jobs:
with:
submodules: true
fetch-depth: 0
- name: build
- name: build fast
if: ! inputs.upload-source-zip
shell: bash
run: |
chown yoctouser /sstate-cache
Expand All @@ -79,6 +84,23 @@ jobs:
export DEVICE=${{ matrix.device }} && \
export IMAGE=${{ matrix.image }} && \
bitbake $IMAGE '
- 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 -c fetchall && \
echo BB_NO_NETWORK = \"1\" > conf/site.conf && \
bitbake $IMAGE '
- name: Generate readme
run: |
mkdir ${{ github.workspace }}/zipfile/
Expand Down Expand Up @@ -116,4 +138,12 @@ jobs:
name: ${{ matrix.image }}_${{ matrix.device }}
path: |
${{ github.workspace }}/zipfile/*
retention-days: 1
- 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/*
retention-days: 1

0 comments on commit 88180b6

Please sign in to comment.