mirror of https://github.com/probonopd/MiniDexed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.3 KiB
63 lines
2.3 KiB
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 toolchains
|
|
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 *-aarch64-none-elf.tar.xz
|
|
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
|
|
tar xf *-arm-none-eabi.tar.xz
|
|
mkdir -p kernels
|
|
- name: Build for Raspberry Pi 4
|
|
run: |
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
RPI=4 bash -ex build.sh
|
|
cp ./circle-stdlib/libs/circle/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 3
|
|
run: |
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
RPI=3 bash -ex build.sh
|
|
cp ./circle-stdlib/libs/circle/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 2
|
|
run: |
|
|
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH
|
|
RPI=2 bash -ex build.sh
|
|
lcp ./circle-stdlib/libs/circle/kernel*.img ./kernels/
|
|
- name: Get Raspberry Pi boot files
|
|
run: |
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
cp ./kernels/* ./circle-stdlib/libs/circle/boot/ || true
|
|
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_arm64_$(date +%Y-%m-%d).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
|
|
|