Build 32-bit and 64-bit separately

pull/868/head
probonopd 2 months ago committed by GitHub
parent 2a2ec34c28
commit fd9e133c79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 161
      .github/workflows/build.yml

@ -9,61 +9,59 @@ on:
pull_request: pull_request:
jobs: jobs:
Build: prepare:
name: Prepare Environment
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Get specific commits of git submodules - name: Get specific commits of git submodules
run: | run: sh -ex ./submod.sh
sh -ex ./submod.sh
- name: Apply patches - name: Apply patches
run: | run: |
# Put git hash in startup message # Put git hash in startup message
sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp sed -i "s/Loading.../$(date +%Y%m%d)-$(git rev-parse --short HEAD)/g" src/userinterface.cpp
- name: Install toolchains
build64:
name: Build 64-bit kernels
runs-on: ubuntu-22.04
needs: prepare
outputs:
artifact-path: ${{ steps.upload64.outputs.artifact-path }}
steps:
- uses: actions/checkout@v2
# Install 64-bit toolchain (aarch64)
- name: Install 64-bit toolchain
run: | run: |
set -ex 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 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 tar xf gcc-arm-10.3-2021.07-x86_64-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 - name: Build for Raspberry Pi 5 (64-bit)
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: | run: |
set -ex set -ex
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
RPI=2 bash -ex build.sh RPI=5 bash -ex build.sh
cp ./src/kernel*.img ./kernels/
- 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 ./kernels/ cp ./src/kernel*.img ./kernels/
- name: Build for Raspberry Pi 1
- name: Build for Raspberry Pi 3 (64-bit)
run: | run: |
set -ex set -ex
export PATH=$(readlink -f ./gcc-*arm-none*/bin/):$PATH export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
RPI=1 bash -ex build.sh RPI=3 bash -ex build.sh
cp ./src/kernel*.img ./kernels/ cp ./src/kernel*.img ./kernels/
- name: Get Raspberry Pi boot files and WLAN firmware
- name: Prepare SD card content for 64-bit
run: | run: |
set -ex set -ex
export PATH=$(readlink -f ./gcc-*aarch64-none*/bin/):$PATH export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf/bin):$PATH
cd ./circle-stdlib/libs/circle/boot cd ./circle-stdlib/libs/circle/boot
make make
make armstub64 make armstub64
@ -77,32 +75,79 @@ jobs:
cd sdcard cd sdcard
cp ../kernels/* . || true cp ../kernels/* . || true
cd - cd -
- name: Get performance files
- name: Upload 64-bit artifacts
id: upload64
uses: actions/upload-artifact@v4
with:
name: build64-artifacts
path: sdcard/*
build32:
name: Build 32-bit kernels
runs-on: ubuntu-22.04
needs: prepare
outputs:
artifact-path: ${{ steps.upload32.outputs.artifact-path }}
steps:
- uses: actions/checkout@v2
# Install 32-bit toolchain (arm-none-eabi)
- name: Install 32-bit toolchain
run: | run: |
git clone https://github.com/Banana71/Soundplantage --depth 1 # depth 1 means only the latest commit set -ex
cp -r ./Soundplantage/performance ./Soundplantage/*.pdf ./sdcard/ 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
- name: Hardware configration files tar xf gcc-arm-10.3-2021.07-x86_64-arm-none-eabi.tar.xz
- name: Build for Raspberry Pi 2 (32-bit)
run: | run: |
cd hwconfig set -ex
sh -ex ./customize.sh export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin):$PATH
cd - RPI=2 bash -ex build.sh
mkdir -p ./sdcard/hardware/ cp ./src/kernel*.img ./kernels/
cp -r ./hwconfig/minidexed_* ./sdcard/minidexed.ini ./sdcard/hardware/
- name: zip - name: Build for Raspberry Pi 1 (32-bit)
run: | run: |
cd sdcard set -ex
zip -r ../MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip * export PATH=$(readlink -f ./gcc-arm-10.3-2021.07-x86_64-arm-none-eabi/bin):$PATH
echo "artifactName=MiniDexed_$GITHUB_RUN_NUMBER_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" >> $GITHUB_ENV RPI=1 bash -ex build.sh
cd - cp ./src/kernel*.img ./kernels/
- uses: actions/upload-artifact@v4
- name: Upload 32-bit artifacts
id: upload32
uses: actions/upload-artifact@v4
with: with:
name: ${{ env.artifactName }} # Exported above name: build32-artifacts
path: ./sdcard/* path: sdcard/*
# retention-days: 14 # To not exceed the free MB/month quota so quickly
- name: Upload to GitHub Releases (only when building from main branch) combine:
name: Combine Artifacts
runs-on: ubuntu-22.04
needs: [ build64, build32 ]
steps:
- name: Download 64-bit artifacts
uses: actions/download-artifact@v4
with:
name: build64-artifacts
path: combined
- name: Download 32-bit artifacts
uses: actions/download-artifact@v4
with:
name: build32-artifacts
path: combined
- name: Create combined ZIP file
run: |
cd combined
zip -r ../MiniDexed_${GITHUB_RUN_NUMBER}_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip .
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 from main branch)
if: ${{ github.ref == 'refs/heads/main' }} if: ${{ github.ref == 'refs/heads/main' }}
run: | run: |
set -ex set -ex
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash ./upload.sh ./MiniDexed*.zip bash ./upload.sh MiniDexed_${GITHUB_RUN_NUMBER}_$(date +%Y-%m-%d)-$(git rev-parse --short HEAD).zip

Loading…
Cancel
Save