52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
on: [pull_request]
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
yoctobranch: [dunfell, hardknott]
|
|
include:
|
|
- yoctobranch: hardknott
|
|
yoctoversion: 3.3.2
|
|
- yoctobranch: dunfell
|
|
yoctoversion: 3.1.9
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
path: 'meta-rust'
|
|
- name: Fetch poky
|
|
run: |
|
|
rm -rf poky meta-openembedded
|
|
git clone -b ${{ matrix.yoctobranch }} --single-branch git://git.yoctoproject.org/poky
|
|
git clone -b ${{ matrix.yoctobranch }} --single-branch git://git.openembedded.org/meta-openembedded
|
|
- name: Configure build
|
|
run: |
|
|
cd poky
|
|
. oe-init-build-env
|
|
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/${{ matrix.yoctoversion }}/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)
|