probonopd 2 days ago committed by GitHub
parent c0d73e3629
commit 22a7d54251
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 49
      .github/workflows/build.yml

@ -1,9 +1,8 @@
# Build 32-bit and 64-bit separately
name: Build name: Build
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_INFO: ""
on: on:
push: push:
@ -19,13 +18,15 @@ jobs:
artifact-path: ${{ steps.upload64.outputs.artifact-path }} artifact-path: ${{ steps.upload64.outputs.artifact-path }}
steps: steps:
- uses: actions/checkout@v2 - 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 - name: Get specific commits of git submodules
run: sh -ex ./submod.sh run: sh -ex ./submod.sh
- name: Create sdcard directory - name: Create sdcard directory
run: mkdir -p ./sdcard/ run: mkdir -p ./sdcard/
- name: Put git hash in startup message - name: Put git hash in startup message
run: | run: |
sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp sed -i "s/Loading.../${{ env.GIT_INFO }}/g" src/userinterface.cpp
# Install 64-bit toolchain (aarch64) # Install 64-bit toolchain (aarch64)
- name: Install 64-bit toolchain - name: Install 64-bit toolchain
@ -65,15 +66,30 @@ jobs:
cd - cd -
cp -r ./circle-stdlib/libs/circle/boot/* sdcard cp -r ./circle-stdlib/libs/circle/boot/* sdcard
rm -rf sdcard/config*.txt sdcard/README sdcard/Makefile sdcard/armstub sdcard/COPYING.linux 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 ./src/config.txt ./src/minidexed.ini ./src/performance.ini sdcard/
cp ./getsysex.sh sdcard/ cp ./getsysex.sh sdcard/
echo "usbspeed=full" > sdcard/cmdline.txt echo "usbspeed=full" > sdcard/cmdline.txt
# Performances
git clone https://github.com/Banana71/Soundplantage --depth 1 # depth 1 means only the latest commit
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 - name: Upload 64-bit artifacts
id: upload64 id: upload64
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: build64-artifacts name: MiniDexed_${{ github.run_number }}_${{ env.GIT_INFO }}_64bit
path: sdcard/* path: sdcard/*
build32: build32:
@ -83,13 +99,15 @@ jobs:
artifact-path: ${{ steps.upload32.outputs.artifact-path }} artifact-path: ${{ steps.upload32.outputs.artifact-path }}
steps: steps:
- uses: actions/checkout@v2 - 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 - name: Get specific commits of git submodules
run: sh -ex ./submod.sh run: sh -ex ./submod.sh
- name: Create sdcard directory - name: Create sdcard directory
run: mkdir -p ./sdcard/ run: mkdir -p ./sdcard/
- name: Put git hash in startup message - name: Put git hash in startup message
run: | run: |
sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp sed -i "s/Loading.../${{ env.GIT_INFO }}/g" src/userinterface.cpp
# Install 32-bit toolchain (arm-none-eabi) # Install 32-bit toolchain (arm-none-eabi)
- name: Install 32-bit toolchain - name: Install 32-bit toolchain
@ -116,7 +134,7 @@ jobs:
id: upload32 id: upload32
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: build32-artifacts name: MiniDexed_${{ github.run_number }}_${{ env.GIT_INFO }}_32bit
path: sdcard/* path: sdcard/*
combine: combine:
@ -124,26 +142,17 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: [ build64, build32 ] needs: [ build64, build32 ]
steps: steps:
- name: Download 64-bit artifacts - name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build64-artifacts
path: combined
- name: Download 32-bit artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
with: with:
name: build32-artifacts pattern: MiniDexed_*
merge-multiple: true
path: combined path: combined
- name: Create combined ZIP file - name: Create combined ZIP file
run: | run: |
cd combined cd combined
zip -r ../MiniDexed_${GITHUB_RUN_NUMBER}_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip . zip -r ../MiniDexed_${{ github.run_number }}_${{ env.GIT_INFO }}.zip .
cd .. cd ..
- name: Upload combined ZIP artifact
uses: actions/upload-artifact@v4
with:
name: combined-artifact
path: MiniDexed_${GITHUB_RUN_NUMBER}_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip
- name: Upload to GitHub Releases (only when building from main branch) - name: Upload to GitHub Releases (only when building from main branch)
if: ${{ github.ref == 'refs/heads/main' }} if: ${{ github.ref == 'refs/heads/main' }}
run: | run: |

Loading…
Cancel
Save