From 46c2384383209a11a505569956decf7cc8e597ca Mon Sep 17 00:00:00 2001 From: TGP17 <86961834+TGP17@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:59:36 +0200 Subject: [PATCH] Adds required Dockerfiles for Linux Arm64 --- .github/workflows/ci.yml | 6 ++- linux-arm64-appimage-packaging/Dockerfile | 44 +++++++++++++++ linux-arm64-appimage/Dockerfile | 65 +++++++++++++++++++++++ 3 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 linux-arm64-appimage-packaging/Dockerfile create mode 100644 linux-arm64-appimage/Dockerfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f9ae8b0..2aa493d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ["linux-appimage", "linux-fresh"] + image: ["linux-appimage", "linux-arm64-appimage", "linux-arm64-appimage-packaging", "linux-fresh"] steps: - uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64' - uses: docker/setup-buildx-action@v2 name: Setup Docker BuildX system - name: Login to DockerHub diff --git a/linux-arm64-appimage-packaging/Dockerfile b/linux-arm64-appimage-packaging/Dockerfile new file mode 100644 index 0000000..a21abab --- /dev/null +++ b/linux-arm64-appimage-packaging/Dockerfile @@ -0,0 +1,44 @@ +FROM arm64v8/ubuntu:20.04 +SHELL ["/bin/bash", "-c"] +LABEL maintainer="citraemu" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt update +RUN apt-get install -y software-properties-common lsb-release curl +RUN apt-get update +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN add-apt-repository -y ppa:okirby/qt6-backports +RUN add-apt-repository -y ppa:okirby/qt6-testing +RUN add-apt-repository -y ppa:theofficialgman/gpu-tools +RUN curl -s https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA +RUN add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ focal main' +RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y +RUN apt-get install -y \ + libsdl2-dev \ + libssl-dev \ + qt6-base-dev \ + qt6-base-private-dev \ + qt6-multimedia-dev \ + qt6-l10n-tools \ + qt6-tools-dev \ + qt6-tools-dev-tools \ + qt6-documentation-tools \ + ffmpeg \ + libavcodec-dev \ + libavdevice-dev \ + libavfilter-dev \ + libavformat-dev \ + libswresample-dev \ + libswscale-dev \ + p7zip-full \ + wget \ + unzip \ + git \ + ccache \ + glslang-dev \ + glslang-tools \ + patchelf \ + desktop-file-utils \ + file diff --git a/linux-arm64-appimage/Dockerfile b/linux-arm64-appimage/Dockerfile new file mode 100644 index 0000000..34d1157 --- /dev/null +++ b/linux-arm64-appimage/Dockerfile @@ -0,0 +1,65 @@ +FROM ubuntu:20.04 +SHELL ["/bin/bash", "-c"] +LABEL maintainer="citraemu" + +ENV DEBIAN_FRONTEND=noninteractive + +# Create a user account citra (UID 1027) that the container will run as +RUN useradd -m -u 1027 -s /bin/bash citra + +# Update system, install PPAs and install packages for building Citra. +RUN apt-get update && apt-get full-upgrade -y +RUN apt-get install -y software-properties-common lsb-release curl +RUN apt-get update +RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test +RUN add-apt-repository -y ppa:okirby/qt6-backports +RUN add-apt-repository -y ppa:okirby/qt6-testing +RUN add-apt-repository -y ppa:theofficialgman/gpu-tools +RUN curl -s https://apt.kitware.com/keys/kitware-archive-latest.asc | gpg --dearmor | tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 42D5A192B819C5DA +RUN add-apt-repository -y 'deb https://apt.kitware.com/ubuntu/ focal main' +RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y + +# Add arm64 architecture +RUN dpkg --add-architecture arm64 +RUN sh -c "sed \"s|^deb \([a-z\.:/]*\) \([a-z\-]*\) \(.*\)$|deb [arch=amd64] \1 \2 \3\ndeb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports \2 \3|\" /etc/apt/sources.list > /etc/apt/sources.list.new" +RUN rm /etc/apt/sources.list +RUN mv /etc/apt/sources.list.new /etc/apt/sources.list +RUN apt-get update +RUN apt-get install -y \ + build-essential \ + libsdl2-dev:arm64 \ + libssl-dev:arm64 \ +# Qt 6 + qt6-base-dev:arm64 \ + qt6-base-private-dev:arm64 \ + qt6-multimedia-dev:arm64 \ + qt6-l10n-tools \ + qt6-tools-dev:arm64 \ + qt6-tools-dev-tools:arm64 \ + qt6-documentation-tools:arm64 \ +# FFmpeg + ffmpeg:arm64 \ + libavcodec-dev:arm64 \ + libavdevice-dev:arm64 \ + libavfilter-dev:arm64 \ + libavformat-dev:arm64 \ + libswresample-dev:arm64 \ + libswscale-dev:arm64 \ +# Tools + cmake \ + p7zip-full \ + wget \ + unzip \ + git \ + ccache \ + ninja-build \ + glslang-dev \ + glslang-tools \ + patchelf \ + file \ + zstd + +# Install GCC 11 +RUN wget https://github.com/xieyubo/gcc-build/releases/download/gcc-11.2.0-1/gcc-11.2.0-1-ubuntu-20.04.deb +RUN apt install -y ./gcc-11.2.0-1-ubuntu-20.04.deb