mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
builiding for aarch64
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
name: New Release
|
||||
run-name: Release v${{ github.event.inputs.tag }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [ubuntu-20.04]
|
||||
name: Building aarch64 binary
|
||||
steps:
|
||||
- name: Installing Packages
|
||||
run: |
|
||||
sudo apt -y install binfmt-support qemu-user-static systemd-container wget libarchive-tools
|
||||
- name: Starting Services
|
||||
run: |
|
||||
sudo systemctl restart systemd-binfmt
|
||||
- name: Downloading Arch Linux Arm Image for rpi4 aarch64
|
||||
run: |
|
||||
wget http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-aarch64-latest.tar.gz
|
||||
- name: Extracting Image
|
||||
run: |
|
||||
mkdir root
|
||||
bsdtar xpvf ArchLinuxARM-rpi-aarch64-latest.tar.gz -C root
|
||||
- name: Building Swingmusic in qemu
|
||||
run: |
|
||||
sudo systemd-nspawn -D root ./aarch64_buildscript
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.run_number }}
|
||||
release_name: Release ${{ github.run_number }}
|
||||
draft: false
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./root/root/swingmusicbuilder/swingmusic/dist/swingmusic
|
||||
asset_name: swingmusic
|
||||
asset_content_type: application/octet-stream
|
||||
Executable
+44
@@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
# README
|
||||
# Builds swingmusic binary for aarch64 aka ARM64 architecture
|
||||
# Run
|
||||
# ./buildswingmusic.sh
|
||||
# chmod a+x swingmusicbuilder/swingmusic/dist/swingmusic
|
||||
# .swingmusicbuilder/swingmusic/dist/swingmusic --port <optional_port_param> --host <optional_host_param>
|
||||
# Notes
|
||||
# Poetry installer and pipx install poetry are both broken on ARM64 Raspberry Pi OS
|
||||
# Moving or renaming venv directory (comment inline below) will break that venv.
|
||||
# Additional poetry bug ongoing https://github.com/python-poetry/poetry/issues/5250 (comment inline below)
|
||||
# Changed to bash shebang above from repo build script setting of zsh
|
||||
pacman-key --init
|
||||
pacman-key --populate archlinuxarm
|
||||
pacman -U --noconfirm https://github.com/jensgrunzer1/pyhon311-for-aarch64/raw/refs/heads/main/python311-3.11.9-2-aarch64.pkg.tar.xz
|
||||
pacman -Sy --noconfirm
|
||||
pacman -S -noconfirm yarn git
|
||||
mkdir swingmusicbuilder
|
||||
cd swingmusicbuilder
|
||||
|
||||
git clone https://github.com/swing-opensource/swingmusic-client.git
|
||||
git clone https://github.com/swing-opensource/swingmusic.git
|
||||
|
||||
# Manual poetry installation as installers are broken.
|
||||
python3 -m venv poetry
|
||||
source poetry/bin/activate
|
||||
|
||||
cd swingmusic
|
||||
|
||||
pip install -U pip setuptools
|
||||
pip install poetry
|
||||
|
||||
cd ../swingmusic-client
|
||||
yarn install
|
||||
yarn build --outDir ../swingmusic/client
|
||||
|
||||
cd ../swingmusic
|
||||
# Fixes poetry issue 5250.
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.fail.Keyring
|
||||
poetry install
|
||||
# Swing gives error if this is not set. Set to version of repo you cloned.
|
||||
export SWINGMUSIC_APP_VERSION="1.4.8"
|
||||
poetry run python manage.py --build
|
||||
Reference in New Issue
Block a user