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.
105 lines
3.8 KiB
105 lines
3.8 KiB
name: Build
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
Build:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Get specific commits of git submodules
|
|
run: |
|
|
sh -ex ./submod.sh
|
|
- name: Apply patches
|
|
run: |
|
|
# Put git hash in startup message
|
|
sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp
|
|
- name: Install toolchains
|
|
run: |
|
|
set -ex
|
|
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 5
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
RPI=5 bash -ex build.sh
|
|
cp ./src/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 4
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
RPI=4 bash -ex build.sh
|
|
cp ./src/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 3
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
RPI=3 bash -ex build.sh
|
|
cp ./src/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 2
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH
|
|
RPI=2 bash -ex build.sh
|
|
cp ./src/kernel*.img ./kernels/
|
|
- name: Build for Raspberry Pi 1
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH
|
|
RPI=1 bash -ex build.sh
|
|
cp ./src/kernel*.img ./kernels/
|
|
- name: Get Raspberry Pi boot files
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH
|
|
cd ./circle-stdlib/libs/circle/boot
|
|
make
|
|
make armstub64
|
|
cd -
|
|
mkdir -p sdcard
|
|
cp -r ./circle-stdlib/libs/circle/boot/* sdcard
|
|
rm -rf sdcard/config*.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux
|
|
cp ./src/config.txt ./src/minidexed.ini ./src/*img ./src/performance.ini sdcard/
|
|
cp ./getsysex.sh sdcard/
|
|
echo "usbspeed=full" > sdcard/cmdline.txt
|
|
cd sdcard
|
|
cp ../kernels/* . || true
|
|
cd -
|
|
- name: Get performance files
|
|
run: |
|
|
git clone https://github.com/Banana71/Soundplantage --depth 1 # depth 1 means only the latest commit
|
|
cp -r ./Soundplantage/performance ./Soundplantage/*.pdf ./sdcard/
|
|
cd sdcard
|
|
zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip *
|
|
echo "artifactName=MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
cd -
|
|
- name: Hardware configration files
|
|
run: |
|
|
cd hwconfig
|
|
sh -ex ./customize.sh
|
|
cd -
|
|
mkdir -p ./sdcard/hardware/
|
|
cp -r ./hwconfig/minidexed_* ./sdcard/minidexed.ini ./sdcard/hardware/
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ env.artifactName }} # Exported above
|
|
path: ./sdcard/*
|
|
- name: Upload to GitHub Releases (only when building from main branch)
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
run: |
|
|
set -ex
|
|
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
bash ./upload.sh ./MiniDexed*.zip
|
|
|
|
|