Update install.sh #24
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 mkdir -p rpi-root/EVA/ | |
sudo cp -r ${GITHUB_WORKSPACE}/Oceanix/* rpi-root/EVA/ | |
- name: Compile in Raspberry Pi environment | |
run: | | |
sudo chroot rpi-root /bin/bash -c "ls -l && cd EVA && ls -l && pwd && chmod +x install.sh && ./install.sh" | |
- name: Retrieve built artifacts | |
run: sudo cp rpi-root/Oceanix/build/* ./build-output/ |