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.
174 lines
6.0 KiB
174 lines
6.0 KiB
name: Build
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
|
|
jobs:
|
|
build64:
|
|
name: Build 64-bit kernels
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
artifact-path: ${{ steps.upload64.outputs.artifact-path }}
|
|
git_info: ${{ steps.gitinfo.outputs.git_info }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Compute Git Info for Artifact Name
|
|
id: gitinfo
|
|
run: echo "::set-output name=git_info::$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)"
|
|
|
|
- name: Get specific commits of git submodules
|
|
run: sh -ex ./submod.sh
|
|
|
|
- name: Create sdcard directory
|
|
run: mkdir -p ./sdcard/
|
|
|
|
- name: Put git hash in startup message
|
|
run: |
|
|
sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp
|
|
|
|
# Install 64-bit toolchain (aarch64)
|
|
- name: Install 64-bit toolchain
|
|
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 gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
|
|
|
|
- name: Build for Raspberry Pi 5 (64-bit)
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
|
|
RPI=5 bash -ex build.sh
|
|
cp ./src/kernel*.img ./sdcard/
|
|
|
|
- name: Build for Raspberry Pi 4 (64-bit)
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
|
|
RPI=4 bash -ex build.sh
|
|
cp ./src/kernel*.img ./sdcard/
|
|
|
|
- name: Build for Raspberry Pi 3 (64-bit)
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
|
|
RPI=3 bash -ex build.sh
|
|
cp ./src/kernel*.img ./sdcard/
|
|
|
|
- name: Prepare SD card content for 64-bit
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
|
|
cd ./circle-stdlib/libs/circle/boot
|
|
make
|
|
make armstub64
|
|
cd -
|
|
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/performance.ini sdcard/
|
|
cp ./getsysex.sh sdcard/
|
|
echo "usbspeed=full" > sdcard/cmdline.txt
|
|
# Performances
|
|
git clone https://github.com/Banana71/Soundplantage --depth 1
|
|
cp -r ./Soundplantage/performance ./Soundplantage/*.pdf ./sdcard/
|
|
# Hardware configuration
|
|
cd hwconfig
|
|
sh -ex ./customize.sh
|
|
cd -
|
|
mkdir -p ./sdcard/hardware/
|
|
cp -r ./hwconfig/minidexed_* ./sdcard/minidexed.ini ./sdcard/hardware/
|
|
# WLAN firmware
|
|
mkdir -p sdcard/firmware
|
|
cp circle-stdlib/libs/circle/addon/wlan/sample/hello_wlan/wpa_supplicant.conf sdcard/
|
|
cd sdcard/firmware
|
|
make -f ../../circle-stdlib/libs/circle/addon/wlan/firmware/Makefile
|
|
cd -
|
|
|
|
- name: Upload 64-bit artifacts
|
|
id: upload64
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MiniDexed_${{ github.run_number }}_${{ steps.gitinfo.outputs.git_info }}_64bit
|
|
path: sdcard/*
|
|
|
|
build32:
|
|
name: Build 32-bit kernels
|
|
runs-on: ubuntu-22.04
|
|
outputs:
|
|
artifact-path: ${{ steps.upload32.outputs.artifact-path }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Compute Git Info for Artifact Name
|
|
run: echo "GIT_INFO=$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
|
|
- name: Get specific commits of git submodules
|
|
run: sh -ex ./submod.sh
|
|
|
|
- name: Create sdcard directory
|
|
run: mkdir -p ./sdcard/
|
|
|
|
- name: Put git hash in startup message
|
|
run: |
|
|
sed -i "s/Loading.../${{ env.GIT_INFO }}/g" src/userinterface.cpp
|
|
|
|
# Install 32-bit toolchain (arm-none-eabi)
|
|
- name: Install 32-bit toolchain
|
|
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-arm-none-eabi.tar.xz
|
|
tar xf gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
|
|
|
|
- name: Build for Raspberry Pi 2 (32-bit)
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin):$PATH
|
|
RPI=2 bash -ex build.sh
|
|
cp ./src/kernel*.img ./sdcard/
|
|
|
|
- name: Build for Raspberry Pi 1 (32-bit)
|
|
run: |
|
|
set -ex
|
|
export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin):$PATH
|
|
RPI=1 bash -ex build.sh
|
|
cp ./src/kernel*.img ./sdcard/
|
|
|
|
- name: Upload 32-bit artifacts
|
|
id: upload32
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: MiniDexed_${{ github.run_number }}_${{ env.GIT_INFO }}_32bit
|
|
path: sdcard/*
|
|
|
|
combine:
|
|
name: Combine Artifacts
|
|
runs-on: ubuntu-22.04
|
|
needs: [ build64, build32 ]
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: MiniDexed_*
|
|
merge-multiple: true
|
|
path: combined
|
|
|
|
- name: Create combined ZIP file
|
|
run: |
|
|
cd combined
|
|
zip -r ../MiniDexed_${{ github.run_number }}_${{ needs.build64.outputs.git_info }}.zip .
|
|
cd ..
|
|
|
|
- name: Upload to GitHub Releases (only when building from main branch)
|
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
run: |
|
|
set -ex
|
|
export UPLOADTOOL_ISPRERELEASE=true
|
|
export UPLOADTOOL_PR_BODY="This is a continuous build. Feedback is appreciated."
|
|
export UPLOADTOOL_BODY="This is a continuous build. Feedback is appreciated."
|
|
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
bash ./upload.sh ./MiniDexed*.zip
|
|
|