Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker-based CI to build CIAs #12

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build-cia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Build CIA

on:
workflow_dispatch:
push:
pull_request:

jobs:
build-cia:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Dockerfile
run: docker build --network=host -t moonlight-n3ds .
- name: Build CIA
run: docker run --rm -v .:/moonlight-N3DS -w /moonlight-N3DS moonlight-n3ds:latest make
- name: Upload CIA
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: ./*.cia
Empty file modified 3ds/build-expat.sh
100644 → 100755
Empty file.
Empty file modified 3ds/build-ffmpeg.sh
100644 → 100755
Empty file.
Empty file modified 3ds/build-openssl.sh
100644 → 100755
Empty file.
25 changes: 5 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# docker build --network=host -t moonlight-n3ds .
FROM ubuntu:22.04
#FROM ubuntu:22.04
FROM devkitpro/devkitarm:latest

# Use bash instead of sh
SHELL ["/bin/bash", "-c"]
Expand Down Expand Up @@ -45,32 +46,16 @@ RUN apt-get install -y \
gcc \
g++

# Install devkitPro for 3DS
RUN wget https://apt.devkitpro.org/install-devkitpro-pacman && \
chmod +x ./install-devkitpro-pacman && \
echo "y" | ./install-devkitpro-pacman
RUN dkp-pacman -S 3ds-dev --noconfirm && \
dkp-pacman -Syu 3ds-curl --noconfirm && \
dkp-pacman -Syu 3ds-libarchive \
3ds-jansson \
3ds-libjpeg-turbo \
3ds-libpng \
3ds-tinyxml2 \
3ds-freetype \
3ds-curl \
3ds-libopus \
--noconfirm

# Install bannertool
RUN wget https://github.com/Steveice10/bannertool/releases/download/1.2.0/bannertool.zip && \
RUN wget https://github.com/Epicpkmn11/bannertool/releases/download/v1.2.2/bannertool.zip && \
unzip bannertool.zip -d /bannertool && \
cp /bannertool/linux-x86_64/bannertool /usr/local/bin && \
chmod +x /usr/local/bin/bannertool && \
rm -r /bannertool

# Install MakeROM for CIA packaging
RUN wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.4/makerom-v0.18.4-ubuntu_x86_64.zip && \
unzip makerom-v0.18.4-ubuntu_x86_64.zip -d /usr/local/bin && \
RUN wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v0.18.3/makerom-v0.18.3-ubuntu_x86_64.zip && \
unzip makerom-v0.18.3-ubuntu_x86_64.zip -d /usr/local/bin && \
chmod +x /usr/local/bin/makerom

# Install custom third party libraries
Expand Down