mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-19 13:09:39 -07:00
Add CI Build for Switch (#234)
This commit is contained in:
parent
f35311bf61
commit
6e2d93ec2c
6 changed files with 41 additions and 8 deletions
18
.github/workflows/switch.yml
vendored
Normal file
18
.github/workflows/switch.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Switch
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Switch
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Checkout submodules
|
||||||
|
run: |
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
- name: Docker Build
|
||||||
|
run: scripts/switch/build-docker-image.sh
|
||||||
|
- name: Build Chiaki
|
||||||
|
run: scripts/switch/run-docker-build-chiaki.sh
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,6 +3,8 @@
|
||||||
.idea
|
.idea
|
||||||
build
|
build
|
||||||
cmake-build-*
|
cmake-build-*
|
||||||
|
/build_*
|
||||||
|
/build-*
|
||||||
.DS_store
|
.DS_store
|
||||||
*.AppImage
|
*.AppImage
|
||||||
appdir
|
appdir
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
FROM docker.io/archlinux/base
|
FROM archlinux:latest
|
||||||
|
|
||||||
ENV DEVKITPRO=/opt/devkitpro
|
ENV DEVKITPRO=/opt/devkitpro
|
||||||
ENV DEVKITARM=/opt/devkitpro/devkitARM
|
ENV DEVKITARM=/opt/devkitpro/devkitARM
|
||||||
ENV DEVKITPPC=/opt/devkitpro/devkitPPC
|
ENV DEVKITPPC=/opt/devkitpro/devkitPPC
|
||||||
ENV PATH="${PATH}:${DEVKITARM}/bin/:${DEVKITPPC}/bin/"
|
ENV PATH="${PATH}:${DEVKITARM}/bin/:${DEVKITPPC}/bin/"
|
||||||
|
|
||||||
|
|
||||||
ENV WORKDIR="/build"
|
ENV WORKDIR="/build"
|
||||||
WORKDIR "${WORKDIR}"
|
WORKDIR "${WORKDIR}"
|
||||||
|
|
||||||
# Upgarde image
|
# Upgrade image
|
||||||
RUN pacman --noconfirm -Syu
|
RUN pacman --noconfirm -Syu
|
||||||
|
|
||||||
# Install requirements for libtransistor
|
# Install requirements for libtransistor
|
||||||
|
@ -33,7 +32,7 @@ RUN pacman-key --init
|
||||||
# https://devkitpro.org/wiki/devkitPro_pacman
|
# https://devkitpro.org/wiki/devkitPro_pacman
|
||||||
|
|
||||||
# First import the key which is used to validate the packages
|
# First import the key which is used to validate the packages
|
||||||
RUN pacman-key --recv F7FD5492264BB9D0
|
RUN pacman-key --recv-keys F7FD5492264BB9D0
|
||||||
RUN pacman-key --lsign F7FD5492264BB9D0
|
RUN pacman-key --lsign F7FD5492264BB9D0
|
||||||
|
|
||||||
# Add the devkitPro repositories
|
# Add the devkitPro repositories
|
||||||
|
@ -73,7 +72,7 @@ RUN pacman --noconfirm -S \
|
||||||
switch-ffmpeg \
|
switch-ffmpeg \
|
||||||
switch-mbedtls
|
switch-mbedtls
|
||||||
|
|
||||||
RUN pip3 install -U pip
|
# RUN pip3 install -U pip
|
||||||
|
|
||||||
VOLUME ${WORKDIR}
|
VOLUME ${WORKDIR}
|
||||||
# nxlink server port
|
# nxlink server port
|
||||||
|
|
5
scripts/switch/build-docker-image.sh
Executable file
5
scripts/switch/build-docker-image.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "`dirname $(readlink -f ${0})`"
|
||||||
|
|
||||||
|
docker build "$@" -t chiaki-switch .
|
|
@ -23,7 +23,6 @@ build_chiaki (){
|
||||||
#rm -rf ./build
|
#rm -rf ./build
|
||||||
|
|
||||||
cmake -B "${build}" -DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
cmake -B "${build}" -DCMAKE_TOOLCHAIN_FILE=${toolchain} \
|
||||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
|
||||||
-DCHIAKI_ENABLE_TESTS=OFF \
|
-DCHIAKI_ENABLE_TESTS=OFF \
|
||||||
-DCHIAKI_ENABLE_CLI=OFF \
|
-DCHIAKI_ENABLE_CLI=OFF \
|
||||||
-DCHIAKI_ENABLE_GUI=OFF \
|
-DCHIAKI_ENABLE_GUI=OFF \
|
||||||
|
@ -32,8 +31,8 @@ build_chiaki (){
|
||||||
-DCHIAKI_ENABLE_SWITCH_LINUX="${CHIAKI_ENABLE_SWITCH_LINUX}" \
|
-DCHIAKI_ENABLE_SWITCH_LINUX="${CHIAKI_ENABLE_SWITCH_LINUX}" \
|
||||||
-DCHIAKI_LIB_ENABLE_MBEDTLS=ON
|
-DCHIAKI_LIB_ENABLE_MBEDTLS=ON
|
||||||
|
|
||||||
pushd "${BASEDIR}/${build}/switch/"
|
pushd "${BASEDIR}/${build}"
|
||||||
make
|
make -j8
|
||||||
popd
|
popd
|
||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
10
scripts/switch/run-docker-build-chiaki.sh
Executable file
10
scripts/switch/run-docker-build-chiaki.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
cd "`dirname $(readlink -f ${0})`/../.."
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
-v "`pwd`:/build/chiaki" \
|
||||||
|
-t \
|
||||||
|
chiaki-switch \
|
||||||
|
-c "cd /build/chiaki && scripts/switch/build.sh"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue