Build switch target using the devkita64 docker image

This commit is contained in:
Romain Graillot 2020-09-22 12:11:59 +02:00 committed by Thomas Bernard
parent e2ff6fd441
commit a8420cf1f5
2 changed files with 3 additions and 38 deletions

View File

@ -118,10 +118,10 @@ job_gp2x:
job_switch:
stage: build
image: devkitpro/devkita64
before_script:
- apt-get update -qq && apt-get install -y -qq zip
- "sh ./.install-switch-toolchain.sh"
- "source /etc/profile.d/devkit-env.sh"
- apt-get update -qq && apt-get install -y -qq build-essential libpng-dev zip dos2unix
- "export PATH=$PATH:$DEVKITPRO/portlibs/switch/bin"
script:
- "SWITCH=1 make -j2 grafx2 || exit 1"
- "SWITCH=1 make ziprelease || exit 1"

View File

@ -1,35 +0,0 @@
#!/bin/sh
FILE="devkitpro-pacman.deb"
SHA256=aa674feee79b00948154ba132ed36266e1ace9fe1974c430764449ea26ac1d7a
URL="https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/$FILE"
URLALT="https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/$FILE"
SUDO=$(which sudo || echo "")
if [ -z "$SUDO" ] ; then
echo "no sudo"
else
echo "sudo: $SUDO"
fi
WGET=$(WGET=`which wget` ; \
if [ "$?" = "0" ] && [ -x "$WGET" ] ; \
then echo "$WGET -nv" ; \
else echo 'curl -R -O -L' ; fi)
TMP=$(mktemp -d)
cd ${TMP}
$WGET "$URL" || $WGET "$URLALT"
if ! echo "$SHA256 $FILE" | shasum -c - ; then
echo "FAILED to check authenticity of devikpro dkp-pacman deb package"
exit 1
fi
cd /
$SUDO dpkg -i "${TMP}/${FILE}" || exit 1
echo "devkitpro pacman installed"
yes Y | $SUDO dkp-pacman -S devkitA64 devkit-env libnx switch-tools switch-pkg-config switch-sdl2 switch-sdl2_ttf switch-sdl2_image switch-zlib switch-bzip2 switch-libpng switch-libjpeg-turbo switch-freetype || exit 1
echo "Switch toolchain and library extracted to /opt/devkitpro.."
rm -r ${TMP}