Merge pull request #134 from alfonsosanchezbeato/fix-initrd-build #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: build core in snapcraft | |
env: | |
URL: http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.6-base-amd64.tar.gz | |
CHROOT: xenial-test-chroot | |
LC_ALL: C.UTF-8 | |
LANG: C.UTF-8 | |
run: | | |
echo "Simulate LP build environment" | |
mkdir -p $CHROOT/build/core | |
wget -q -O - $URL | zcat - | sudo tar x -C $CHROOT | |
sudo cp /etc/resolv.conf $CHROOT/etc/ | |
sudo mount --bind /dev $CHROOT/dev | |
sudo chroot $CHROOT apt update | |
sudo chroot $CHROOT apt install -y software-properties-common | |
sudo chroot $CHROOT apt-add-repository -y ppa:snappy-dev/image | |
sudo sed -i '/^deb/s/$/ universe/' $CHROOT/etc/apt/sources.list | |
sudo chroot $CHROOT apt update | |
sudo chroot $CHROOT apt install -y livecd-rootfs snapcraft | |
sudo cp -a Makefile snapcraft.yaml hooks live-build extra-files $CHROOT/build/core | |
sudo chroot $CHROOT sh -c 'mount -t proc proc /proc; mount -t sysfs sys /sys; cd build/core; snapcraft' |