Commit e51f6fc7 authored by Starcarr's avatar Starcarr
Browse files

[CICD] Reusing script

parent e36cce7f
Pipeline #624 passed with stage
in 4 minutes and 49 seconds
variables:
PACKAGE_FOLDER: "snes9x"
LIBRARY_NAME: "snes9x_libretro_switch.a"
NRO_NAME: "snes9x.nro"
APP_TITLE: "SNES9X libnx"
package:
image: starcarr/libnx:latest
script:
- rm -rf $PACKAGE_FOLDER
- mkdir $PACKAGE_FOLDER
- cp assets/overlay.cfg $PACKAGE_FOLDER/overlay.cfg
- cp assets/overlay.png $PACKAGE_FOLDER/overlay.png
- cd libretro/
- make platform=switch -j10
- cd ../
- git clone -b master https://git.m4xw.net/Switch/RetroArch/RetroArch.git --depth=1
- cp libretro/$LIBRARY_NAME RetroArch/libretro_switch.a
- cp assets/icon.jpg RetroArch/icon.jpg
- cd RetroArch/
- mkdir romfs
- APP_TITLE="$APP_TITLE" make -f Makefile.switch -j10
- cp retroarch_switch.nro ../$PACKAGE_FOLDER/$NRO_NAME
- sh build.sh $PACKAGE_FOLDER master
artifacts:
name: $PACKAGE_FOLDER
paths:
......@@ -31,20 +15,7 @@ package:
nightly:
image: starcarr/libnx:nightly
script:
- rm -rf $PACKAGE_FOLDER
- mkdir $PACKAGE_FOLDER
- cp assets/overlay.cfg $PACKAGE_FOLDER/overlay.cfg
- cp assets/overlay.png $PACKAGE_FOLDER/overlay.png
- cd libretro/
- make platform=switch -j10
- cd ../
- git clone -b develop https://git.m4xw.net/Switch/RetroArch/RetroArch.git --depth=1
- cp libretro/$LIBRARY_NAME RetroArch/libretro_switch.a
- cp assets/icon.jpg RetroArch/icon.jpg
- cd RetroArch/
- mkdir romfs
- APP_TITLE="$APP_TITLE" make -f Makefile.switch -j10
- cp retroarch_switch.nro ../$PACKAGE_FOLDER/$NRO_NAME
- sh build.sh $PACKAGE_FOLDER develop
artifacts:
name: $PACKAGE_FOLDER
expire_in: 24 hours
......
#!/bin/bash
PACKAGE_FOLDER=$1
BRANCH=$2
LIBRARY_NAME="snes9x_libretro_switch.a"
NRO_NAME="snes9x.nro"
APP_TITLE="SNES9X libnx"
mkdir $PACKAGE_FOLDER
cp assets/overlay.cfg $PACKAGE_FOLDER/overlay.cfg
cp assets/overlay.png $PACKAGE_FOLDER/overlay.png
cd libretro/
make platform=switch -j10
cd ../
git clone -b $BRANCH https://git.m4xw.net/Switch/RetroArch/RetroArch.git --depth=1
cp libretro/$LIBRARY_NAME RetroArch/libretro_switch.a
cp assets/icon.jpg RetroArch/icon.jpg
cd RetroArch/
mkdir romfs
APP_TITLE="$APP_TITLE" make -f Makefile.switch -j10
cp retroarch_switch.nro ../$PACKAGE_FOLDER/$NRO_NAME
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment