Files
meta-rust/.github/workflows/main.yml
Anatol Belski e0180c565e workflows: Further reduce SDK size
Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
2021-04-03 14:33:11 +02:00

44 lines
1.9 KiB
YAML

on: [pull_request]
jobs:
build:
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 gatesgarth --single-branch git://git.yoctoproject.org/poky
git clone -b gatesgarth --single-branch git://git.openembedded.org/meta-openembedded
- name: Run bitbake
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
bitbake rust-hello-world
- name: Test SDK
run: |
SDK_DIR=$PWD/sdk-test
cd poky
. oe-init-build-env
echo 'TOOLCHAIN_HOST_TASK_append = " packagegroup-rust-cross-canadian-${MACHINE}"' >> conf/local.conf
echo 'PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"' >> conf/local.conf
echo 'DISTRO_FEATURES_remove = "acl alsa argp bluetooth ext2 ipv4 ipv6 largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g nfc x11 vfat largefile opengl ptest multiarch wayland vulkan pulseaudio gobject-introspection-data ldconfig"' >> conf/local.conf
echo 'IMAGE_INSTALL_remove = "packagegroup-core-boot"' >> conf/local.conf
echo 'VIRTUAL-RUNTIME_dev_manager = ""' >> conf/local.conf
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)