Skip to content

Commit

Permalink
Add Docker-based CI to build CIAs (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoblKyogre authored Mar 16, 2024
1 parent 5795e74 commit d77c4b1
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 20 deletions.
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

0 comments on commit d77c4b1

Please sign in to comment.