Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoviola-systemelectronics authored Nov 28, 2024
1 parent 35c2364 commit 4fc27a9
Showing 1 changed file with 43 additions and 5 deletions.
48 changes: 43 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,50 @@
name: Yocto Build

on:
push:
branches:
- '**' # Matches all branches

- '**'
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Free Disk Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache
sudo rm -rf /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
df -h
- name: Set up ccache
uses: hendrikmuhs/[email protected]
with:
key: yocto-build-${{ github.ref }}
max-size: 2G

- name: Setup Yocto cache
uses: actions/cache@v3
with:
path: |
yocto-astrial/build/sstate-cache
yocto-astrial/build/downloads
key: yocto-cache-${{ github.ref }}-${{ github.sha }}
restore-keys: |
yocto-cache-${{ github.ref }}-
yocto-cache-
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y gawk wget git diffstat unzip texinfo gcc build-essential \
chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils \
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
python3-subunit mesa-common-dev zstd liblz4-tool file locales libacl1 \
curl python-is-python3 bmap-tools
curl python-is-python3 bmap-tools ccache
sudo locale-gen en_US.UTF-8
- name: Install repo tool
Expand All @@ -44,6 +63,14 @@ jobs:
wget --directory-prefix .repo/local_manifests https://raw.githubusercontent.com/System-Electronics/meta-sysele-nxp-5.15.71/main/manifest/astrial-5.15.71.xml
repo sync
- name: Configure build environment
run: |
echo 'SSTATE_DIR = "${TOPDIR}/sstate-cache"' >> yocto-astrial/build/conf/local.conf
echo 'DL_DIR = "${TOPDIR}/downloads"' >> yocto-astrial/build/conf/local.conf
echo 'INHERIT += "rm_work"' >> yocto-astrial/build/conf/local.conf
echo 'INHERIT += "ccache"' >> yocto-astrial/build/conf/local.conf
echo 'CCACHE_TOP_DIR = "${TOPDIR}/.ccache"' >> yocto-astrial/build/conf/local.conf
- name: Build Image
run: |
cd yocto-astrial
Expand All @@ -57,3 +84,14 @@ jobs:
path: |
yocto-astrial/build/tmp/deploy/images/astrial-imx8mp/imx-boot-astrial-imx8mp-sd.bin-flash_evk
yocto-astrial/build/tmp/deploy/images/astrial-imx8mp/system-astrial-image-astrial-imx8mp-*.rootfs.wic.zst
- name: Cleanup
if: always()
run: |
cd yocto-astrial/build
rm -rf tmp/work/*
rm -rf tmp/buildstats/*
rm -rf tmp/stamps/*
rm -rf tmp/log/*
rm -rf tmp/pkgdata/*
df -h

0 comments on commit 4fc27a9

Please sign in to comment.