5310b50d80
Signed-off-by: Clément Péron <peron.clem@gmail.com>
49 lines
1.8 KiB
YAML
49 lines
1.8 KiB
YAML
on: [pull_request]
|
|
jobs:
|
|
build:
|
|
env:
|
|
YOCTO_VERSION: 3.0.4
|
|
YOCTO_BRANCH: zeus
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
path: 'meta-rust'
|
|
- name: Fetch poky
|
|
run: |
|
|
mv poky/build/sstate-cache . || true
|
|
rm -rf poky meta-openembedded
|
|
git clone -b yocto-$YOCTO_VERSION --single-branch git://git.yoctoproject.org/poky
|
|
git clone -b $YOCTO_BRANCH --single-branch git://git.openembedded.org/meta-openembedded
|
|
- name: Configure build
|
|
run: |
|
|
cd poky
|
|
. oe-init-build-env
|
|
mv ../../sstate-cache . || true
|
|
bitbake-layers add-layer ../../meta-openembedded/meta-oe
|
|
bitbake-layers add-layer ../../meta-rust
|
|
echo 'PARALLEL_MAKE_pn-rust-llvm-native = "-j2"' >> conf/local.conf
|
|
echo 'TOOLCHAIN_HOST_TASK_append = " packagegroup-rust-cross-canadian-${MACHINE}"' >> conf/local.conf
|
|
echo "SSTATE_MIRRORS = \"file://.* http://sstate.yoctoproject.org/$YOCTO_VERSION/PATH;downloadfilename=PATH \\n\"" >> conf/local.conf
|
|
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"' >> conf/local.conf
|
|
- name: Run bitbake
|
|
run: |
|
|
cd poky
|
|
. oe-init-build-env
|
|
bitbake rust-hello-world
|
|
- name: Test SDK
|
|
run: |
|
|
SDK_DIR=$PWD/sdk-test
|
|
cd poky
|
|
. oe-init-build-env
|
|
bitbake core-image-minimal -c populate_sdk
|
|
rm -rf $SDK_DIR
|
|
./$(find ./tmp/deploy/sdk/ -name '*.sh') -d $SDK_DIR -y
|
|
. $(find $SDK_DIR -name 'environment-setup-*')
|
|
PROG=hello
|
|
rm -rf $PROG
|
|
cargo new $PROG
|
|
cd $PROG
|
|
cargo build
|
|
file $(find ./target -name $PROG)
|