2022-02-21 03:14:22 +00:00
name : Rust
on :
push :
2022-11-06 21:38:02 +00:00
branches : [ main ]
2022-02-21 03:14:22 +00:00
pull_request :
2022-11-06 21:38:02 +00:00
branches : [ main ]
2022-02-21 03:14:22 +00:00
workflow_dispatch :
jobs :
clippy_pr :
runs-on : ubuntu-latest
2022-11-12 00:07:48 +00:00
container : jugeeya/cargo-skyline:3.2.0
2022-02-21 03:14:22 +00:00
steps :
- uses : actions/checkout@v2
- name : Setup PATH
run : export PATH=$PATH:/root/.cargo/bin:/opt/devkitpro/devkitA64/bin
- name : Install minimal nightly rust
uses : actions-rs/toolchain@v1
with :
profile : minimal
2022-10-03 15:54:08 +00:00
toolchain : nightly
2022-02-21 03:14:22 +00:00
components : rustfmt, clippy
default : true
target : x86_64-unknown-linux-gnu
- uses : actions-rs/clippy-check@v1
with :
token : ${{ secrets.GITHUB_TOKEN }}
2022-10-03 16:01:29 +00:00
toolchain : nightly
2022-02-21 03:14:22 +00:00
args : --all-features --target=x86_64-unknown-linux-gnu
- uses : mbrobbel/rustfmt-check@master
with :
token : ${{ secrets.GITHUB_TOKEN }}
plugin :
runs-on : ubuntu-latest
2022-11-11 18:17:14 +00:00
outputs :
changelog : ${{ steps.build_release.outputs.changelog }}
2022-02-21 03:14:22 +00:00
container :
2022-11-12 00:07:48 +00:00
image : jugeeya/cargo-skyline:3.2.0
2022-02-21 03:14:22 +00:00
steps :
- uses : actions/checkout@v2
- name : Build release NRO
2022-11-11 18:17:14 +00:00
id : build_release
2022-02-21 03:14:22 +00:00
run : |
2022-11-12 00:07:48 +00:00
# Grab changelog for beta description later
2022-11-11 18:17:14 +00:00
# Grab latest tag, grab log vs. main, replace newlines with two newlines and a list marker
2022-11-12 00:07:48 +00:00
changelog="- $(git log --pretty=format:%s `git tag --sort=-committerdate | head -1`...main | sed -z 's/\n/\n\n- /g')"
# GH actions hate multiline strings. https://trstringer.com/github-actions-multiline-strings/
changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
echo "::set-output name=changelog::$changelog"
# Actually build plugin
2022-02-21 03:14:22 +00:00
PATH=$PATH:/root/.cargo/bin:/opt/devkitpro/devkitA64/bin /root/.cargo/bin/cargo-skyline skyline build --release
env :
HOME : /root
- name : Upload plugin artifact
uses : actions/upload-artifact@v2
with :
name : plugin
path : target/aarch64-skyline-switch/release/libtraining_modpack.nro
2022-03-05 21:55:13 +00:00
- name : Upload static files
2022-02-21 03:14:22 +00:00
uses : actions/upload-artifact@v2
with :
2022-03-05 21:55:13 +00:00
name : static
path : src/static
2022-02-21 03:14:22 +00:00
plugin_outside_training_mode :
2022-11-06 21:38:02 +00:00
if : github.ref == 'refs/heads/main'
2022-02-21 03:14:22 +00:00
runs-on : ubuntu-latest
container :
2022-11-12 00:07:48 +00:00
image : jugeeya/cargo-skyline:3.2.0
2022-02-21 03:14:22 +00:00
steps :
- uses : actions/checkout@v2
- name : Build outside_training_mode NRO
run : |
PATH=$PATH:/root/.cargo/bin:/opt/devkitpro/devkitA64/bin /root/.cargo/bin/cargo-skyline skyline build --release --features outside_training_mode
env :
HOME : /root
- name : Upload plugin (outside training mode) artifact
uses : actions/upload-artifact@v2
with :
name : plugin_outside_training_mode
path : target/aarch64-skyline-switch/release/libtraining_modpack.nro
upload :
runs-on : ubuntu-latest
2022-11-06 21:38:02 +00:00
if : github.ref == 'refs/heads/main'
2022-02-21 03:14:22 +00:00
needs :
- plugin
steps :
- name : Download all artifacts
uses : actions/download-artifact@v2
- name : Prepare zip
2022-11-11 17:56:00 +00:00
id : prepare_zip
2022-02-21 03:14:22 +00:00
env :
SKYLINE_DIR : atmosphere/contents/01006A800016E000
SMASH_PLUGIN_DIR : atmosphere/contents/01006A800016E000/romfs/skyline/plugins
2022-03-05 21:55:13 +00:00
SMASH_WEB_DIR : atmosphere/contents/01006A800016E000/manual_html/html-document/training_modpack.htdocs
2022-02-21 03:14:22 +00:00
run : |
mkdir -p ${{env.SKYLINE_DIR}}
mkdir -p ${{env.SMASH_PLUGIN_DIR}}
mkdir -p ${{env.SMASH_WEB_DIR}}
2022-02-26 10:21:16 +00:00
wget https://web.archive.org/web/20220210115256/https://github.com/skyline-dev/skyline/releases/download/beta/skyline.zip
2022-02-21 03:14:22 +00:00
unzip skyline.zip
mv exefs ${{env.SKYLINE_DIR}}
cp plugin/libtraining_modpack.nro ${{env.SMASH_PLUGIN_DIR}}/libtraining_modpack.nro
2022-06-22 15:48:56 +00:00
wget https://github.com/ultimate-research/params-hook-plugin/releases/download/v13.0.1/libparam_hook.nro
2022-02-21 03:14:22 +00:00
wget https://github.com/ultimate-research/nro-hook-plugin/releases/download/v0.3.0/libnro_hook.nro
wget https://github.com/jugeeya/nn-hid-hook/releases/download/beta/libnn_hid_hook.nro
cp libparam_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libparam_hook.nro
cp libnro_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnro_hook.nro
cp libnn_hid_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnn_hid_hook.nro
2022-03-20 18:50:56 +00:00
mv static/libtraining_modpack_menu.nro ${{env.SMASH_PLUGIN_DIR}}/libtraining_modpack_menu.nro
2022-03-05 21:55:13 +00:00
cp -r static/* ${{env.SMASH_WEB_DIR}}
2022-03-25 00:11:50 +00:00
zip -r training_modpack_beta.zip atmosphere
2022-02-21 03:14:22 +00:00
- name : Update Release
uses : meeDamian/github-release@2.0
with :
token : ${{ secrets.GITHUB_TOKEN }}
prerelease : true
allow_override : true
gzip : false
tag : beta
2022-11-07 16:59:37 +00:00
commitish : main
2022-02-21 03:14:22 +00:00
name : beta
body : >
Beta built off of the latest code in the repository.
2022-11-11 17:56:00 +00:00
## Changelog
2022-11-11 18:17:14 +00:00
${{needs.plugin.outputs.changelog}}
2022-02-21 03:14:22 +00:00
2022-05-04 15:58:10 +00:00
2022-11-11 17:56:00 +00:00
## Installation
### Installing on console
2022-05-04 15:58:10 +00:00
2022-03-24 20:15:07 +00:00
2022-02-21 03:14:22 +00:00
Install the same way you would install a full release.
2022-03-24 19:06:01 +00:00
2022-11-11 17:56:00 +00:00
### Installing on Ryujinx
2022-03-24 20:15:07 +00:00
2022-03-25 06:48:50 +00:00
Instructions to get the beta working on Ryujinx.
2022-03-24 20:15:07 +00:00
2022-05-04 15:58:10 +00:00
1. Download the latest build of Ryujinx, which can be found here : https://ryujinx.org/download/
2022-03-24 20:15:07 +00:00
2022-03-25 06:48:50 +00:00
2 . Download the beta. https://github.com/jugeeya/UltimateTrainingModpack/releases/tag/beta
2022-03-24 20:15:07 +00:00
2022-03-25 06:48:50 +00:00
3 . The atmosphere folder from the beta zip is everything that should be in Ryujinx's mod folder. This means `%AppData%/Ryujinx/mods/contents/01006a800016e000` should have what `atmosphere/contents/01006a800016e000` has.
2022-03-25 00:15:16 +00:00
2022-03-25 06:48:50 +00:00
4 . You should be good to go after this. When in training mode, use Special+Uptaunt to bring up the menu.
2022-02-21 03:14:22 +00:00
files : >
training_modpack_beta.zip
- name : Upload zip as artifact
uses : actions/upload-artifact@v1
with :
name : full_build
2022-11-07 05:57:33 +00:00
path : training_modpack_beta.zip