Update build_for_rasp.yml #15
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: Build for Raspberry Pi | |
on: | |
push: | |
branches: | |
- oceanix_dev | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install QEMU and dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y qemu qemu-user-static binfmt-support debootstrap | |
- name: Setup Raspberry Pi environment | |
run: | | |
sudo mkdir rpi-root | |
sudo debootstrap --arch=armhf --foreign buster rpi-root http://archive.raspbian.org/raspbian | |
sudo cp /usr/bin/qemu-arm-static rpi-root/usr/bin/ | |
sudo chroot rpi-root /bin/bash -c "debootstrap/debootstrap --second-stage" | |
- name: Copy Repository to rpi-root | |
run: sudo cp -r ${GITHUB_WORKSPACE}/* rpi-root/EVA/ | |
- name: Compile in Raspberry Pi environment | |
run: | | |
sudo chroot rpi-root /bin/bash -c "ls -l && cd /EVA/Oceanix && ls -l && pwd && chmod +x install.sh && ./install.sh" | |
- name: Retrieve built artifacts | |
run: sudo cp rpi-root/Oceanix/build/* ./build-output/ |