name: Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} on: push: branches: [ main ] pull_request: branches: [ main ] jobs: Build: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Recursively pull git submodules run: | git submodule update --init --recursive - name: Install toolchain run: | wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz tar xf gcc-arm-*-*.tar.xz - name: Build circle-stdlib library run: | export PATH=$(readlink -f ./gcc-*/bin/):$PATH cd circle-stdlib/ # git submodule update --init --recursive ./configure -r 4 --prefix "aarch64-none-elf-" # ( cd libs/circle ; git submodule update --init --recursive ) # FIXME: Find a way without the need for this make -j$(nproc) cd .. - name: Build MiniDexed run: | export PATH=$(readlink -f ./gcc-*/bin/):$PATH cd src make -j$(nproc) ls *.img - name: Get Raspberry Pi boot files run: | export PATH=$(readlink -f ./gcc-*/bin/):$PATH cd ./circle-stdlib/libs/circle/boot make make armstub64 cd - mkdir -p sdcard cp -r ./circle-stdlib/libs/circle/boot/* sdcard mv sdcard/config64.txt sdcard/config.txt rm -rf sdcard/config32.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux cp ./src/*img sdcard/ cd sdcard zip -r ../MiniDexed_Raspberry_Pi_4.zip * - name: Upload to GitHub Releases (only when building from main branch) if: ${{ github.ref == 'refs/heads/main' }} run: | wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh bash ./upload.sh ./MiniDexed*.zip