Skip to content

Commit

Permalink
Add Linux arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
messmerd committed Jan 18, 2025
1 parent b8950f4 commit 0bb8110
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 2 deletions.
68 changes: 66 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
name: linux
linux-x64:
name: linux-x64
runs-on: ubuntu-latest
container: ghcr.io/lmms/linux.gcc:20.04
env:
Expand Down Expand Up @@ -63,6 +63,70 @@ jobs:
ccache --show-stats
env:
CCACHE_MAXSIZE: 500M
linux-arm64:
name: linux-arm64
runs-on: ubuntu-24.04-arm
env:
CMAKE_OPTS: >-
-DUSE_WERROR=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DUSE_COMPILE_CACHE=ON
CCACHE_MAXSIZE: 0
CCACHE_NOCOMPRESS: 1
MAKEFLAGS: -j2
DEBIAN_FRONTEND: noninteractive
steps:
- name: Configure git
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Check out
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Prepare to install system packages
run: |
echo "APT_DEPENDENCIES=$(xargs < .github/workflows/deps-ubuntu-24.04-arm64-gcc.txt)" >> "$GITHUB_ENV"
.github/workflows/setup-wine.sh
- name: Install system packages
run: sudo apt-get install -y ${{ env.APT_DEPENDENCIES }}
- name: Cache ccache data
uses: actions/cache@v3
with:
key: ccache-${{ github.job }}-${{ github.ref }}-${{ github.run_id }}
restore-keys: |
ccache-${{ github.job }}-${{ github.ref }}-
ccache-${{ github.job }}-
path: ~/.ccache
- name: Configure
run: |
ccache --zero-stats
cmake -S . \
-B build \
-DCMAKE_INSTALL_PREFIX=./build/install \
$CMAKE_OPTS
- name: Build
run: cmake --build build
- name: Run tests
run: |
cd build/tests
ctest --output-on-failure -j2
- name: Package
run: |
cmake --build build --target package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: linux
path: build/lmms-*.AppImage
- name: Trim ccache and print statistics
run: |
ccache --cleanup
echo "[ccache config]"
ccache --show-config
echo "[ccache stats]"
ccache --show-stats
env:
CCACHE_MAXSIZE: 500M
macos:
strategy:
fail-fast: false
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/deps-ubuntu-24.04-arm64-gcc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
binutils
ca-certificates
ccache
cmake
file
fluid
gcc
gcc-multilib
git
gpg
g++
g++-multilib
libasound2-dev
libc6-dev
libc6-dev-i386
libfftw3-dev
libfltk1.3-dev
libfluidsynth-dev
libgig-dev
libjack-jackd2-dev
liblilv-dev
liblist-moreutils-perl
libmp3lame-dev
libogg-dev
libqt5x11extras5-dev
libsamplerate0-dev
libsdl2-dev
libsndfile1-dev
libstk-dev
libsuil-dev
libvorbis-dev
libx11-xcb-dev
libxcb-keysyms1-dev
libxcb-util0-dev
libxft-dev
libxinerama-dev
libxml2-utils
libxml-perl
lsb-release
lv2-dev
make
perl
portaudio19-dev
qt5-qmake
qtbase5-dev
qtbase5-dev-tools
qtbase5-private-dev
qttools5-dev-tools
software-properties-common
ssh-client
stk
wget
winehq-staging
wine-staging-dev
10 changes: 10 additions & 0 deletions .github/workflows/setup-wine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

# Add WineHQ APT repo
sudo dpkg --add-architecture i386
sudo apt-get install --yes wget
sudo mkdir -pm755 /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
. /etc/os-release
sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/${UBUNTU_CODENAME}/winehq-${UBUNTU_CODENAME}.sources"
sudo apt-get update

0 comments on commit 0bb8110

Please sign in to comment.