2023-02-27 07:44:12 +00:00
name : Rust
on :
push :
branches : [ main ]
pull_request :
branches : [ main ]
workflow_dispatch :
jobs :
2023-04-11 21:56:14 +00:00
rustfmt_check :
2023-03-05 03:12:58 +00:00
name : Code Formatting
2023-02-27 07:44:12 +00:00
runs-on : ubuntu-latest
2023-04-11 21:56:14 +00:00
steps :
2023-08-04 20:07:15 +00:00
- uses : actions/checkout@v3
- name : Install Rust Toolchain
uses : dtolnay/rust-toolchain@nightly
2023-04-11 21:56:14 +00:00
with :
2023-08-04 20:07:15 +00:00
components : rustfmt
2023-02-27 07:44:12 +00:00
target : x86_64-unknown-linux-gnu
2023-08-04 20:07:15 +00:00
- name : Check Formatting
run : cargo fmt --all -- --check
2023-02-27 07:44:12 +00:00
checker :
name : Check, Clippy, Tests
runs-on : ubuntu-latest
steps :
2023-08-04 20:07:15 +00:00
- uses : actions/checkout@v3
- name : Install Rust Toolchain
uses : dtolnay/rust-toolchain@nightly
2023-02-27 07:44:12 +00:00
with :
components : rustfmt, clippy
target : x86_64-unknown-linux-gnu
- uses : Swatinem/rust-cache@v2
name : Rust Cache
with :
prefix-key : "checker-2"
- name : Clippy
2023-08-04 20:07:15 +00:00
run : cargo clippy --all-targets --all-features --target=x86_64-unknown-linux-gnu -- -D warnings
2023-02-27 07:44:12 +00:00
- name : TUI Test
2023-07-11 16:10:56 +00:00
uses : ClementTsang/cargo-action@v0.0.3
2023-02-27 07:44:12 +00:00
with :
2023-07-11 16:10:56 +00:00
command : test
directory : training_mod_tui
2023-02-27 07:44:12 +00:00
plugin :
name : Plugin NRO
runs-on : ubuntu-latest
steps :
2023-08-04 20:07:15 +00:00
- uses : actions/checkout@v3
2023-08-08 06:28:40 +00:00
- uses : dtolnay/rust-toolchain@nightly
with :
target : x86_64-unknown-linux-gnu
2023-02-27 07:44:12 +00:00
- uses : Swatinem/rust-cache@v2
name : Rust Cache
with :
prefix-key : "plugin"
2023-08-08 06:28:40 +00:00
cache-all-crates : true
- name : Install Skyline
run : |
cargo install cargo-skyline
cargo-skyline skyline update-std
2023-02-27 07:44:12 +00:00
- name : Build release NRO
id : build_release
2023-09-15 07:24:06 +00:00
run : RUSTFLAGS=-g cargo-skyline skyline build --release
2023-02-27 07:44:12 +00:00
- name : Upload plugin artifact
2023-08-04 20:07:15 +00:00
uses : actions/upload-artifact@v3
2023-02-27 07:44:12 +00:00
with :
name : plugin
path : target/aarch64-skyline-switch/release/libtraining_modpack.nro
plugin_outside_training_mode :
name : Plugin NRO (Outside Training Mode)
if : github.ref == 'refs/heads/main'
runs-on : ubuntu-latest
steps :
2023-08-04 20:07:15 +00:00
- uses : actions/checkout@v3
2023-08-08 06:28:40 +00:00
- uses : dtolnay/rust-toolchain@nightly
with :
target : x86_64-unknown-linux-gnu
2023-02-27 07:44:12 +00:00
- uses : Swatinem/rust-cache@v2
name : Rust Cache
with :
prefix-key : "plugin"
2023-08-08 06:28:40 +00:00
cache-all-crates : true
- name : Install Skyline
2023-02-27 07:44:12 +00:00
run : |
2023-08-08 06:28:40 +00:00
cargo install cargo-skyline
cargo-skyline skyline update-std
- name : Build outside_training_mode NRO
2023-08-21 19:32:49 +00:00
run : RUSTFLAGS=-g cargo-skyline skyline build --release --features outside_training_mode
2023-02-27 07:44:12 +00:00
- name : Upload plugin (outside training mode) artifact
2023-08-04 20:07:15 +00:00
uses : actions/upload-artifact@v3
2023-02-27 07:44:12 +00:00
with :
name : plugin_outside_training_mode
path : target/aarch64-skyline-switch/release/libtraining_modpack.nro
upload :
name : Upload Beta Release
runs-on : ubuntu-latest
if : github.ref == 'refs/heads/main'
needs :
- plugin
steps :
- name : Download all artifacts
2023-08-04 20:07:15 +00:00
uses : actions/download-artifact@v3
2023-02-27 07:44:12 +00:00
- name : Prepare zip
id : prepare_zip
env :
SMASH_PLUGIN_DIR : atmosphere/contents/01006A800016E000/romfs/skyline/plugins
run : |
mkdir -p ${{env.SMASH_PLUGIN_DIR}}
cp plugin/libtraining_modpack.nro ${{env.SMASH_PLUGIN_DIR}}/libtraining_modpack.nro
wget https://github.com/ultimate-research/params-hook-plugin/releases/download/v13.0.1/libparam_hook.nro
wget https://github.com/ultimate-research/nro-hook-plugin/releases/download/v0.4.0/libnro_hook.nro
cp libparam_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libparam_hook.nro
cp libnro_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnro_hook.nro
zip -r training_modpack_beta.zip atmosphere
- name : Delete Release
2023-03-23 15:28:21 +00:00
uses : dev-drprasad/delete-tag-and-release@v0.2.1
2023-02-27 07:44:12 +00:00
with :
tag_name : beta
delete_release : true
env :
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
- name : Update Release
uses : meeDamian/github-release@2.0
with :
token : ${{ secrets.GITHUB_TOKEN }}
prerelease : true
allow_override : true
gzip : false
tag : beta
commitish : main
name : beta
body : >
Beta built off of the latest code in the repository.
# Changelog
You can find the changelog here : https://github.com/jugeeya/UltimateTrainingModpack#beta-changelog
## Installation
*For fuller instructions, please join the [Discord](https://discord.gg/xUZWJ5BWe7) and visit the #setup-and-download channel.*
2023-03-05 03:12:58 +00:00
The Training Modpack requires the following prerequisite packages :
* Skyline : https://github.com/skyline-dev/skyline/releases
* This is a generic code mod loader for Nintendo Switch games that the Training Modpack uses.
To install the Training Modpack, download the .zip file from the [latest release page](https://github.com/jugeeya/UltimateTrainingModpack/releases/latest). Extract the files from the .zip file using the file explorer on Windows or Mac, or a program such as 7-zip (windows) or unzip (Linux).
### Installation on Nintendo Switch
* Atmosphere : https://github.com/Atmosphere-NX/Atmosphere/releases
* This is the custom firmware that is required for any hacked Switch. One great guide for installation here can be found at https://switch.homebrew.guide/.
1 ) Transfer the extracted contents of the TrainingModpack .zip (`atmosphere` folder) onto the root of your SD card, merging the `/atmosphere` folder with the one on your SD card.
2 ) Similarly, transfer the extracted contents of the Skyline .zip (`exefs` folder) into `sd:/atmosphere/contents/01006A800016E000`.
2023-02-27 07:44:12 +00:00
2023-03-05 03:12:58 +00:00
3 ) No files need to be manually deleted when upgrading from a previous version.
2023-02-27 07:44:12 +00:00
2023-03-05 03:12:58 +00:00
4 ) The The SD card should have the below files at these locations.
```
SD Card Root
└── atmosphere/
└── contents/
└── 01006A800016E000/
├── exefs/
│ ├── subsdk9
│ └── main.npdm
└── romfs/
└── skyline/
└── plugins/
├── libnro_hook.nro
├── libparam_hook.nro
└── libtraining_modpack.nro
```
2023-09-06 17:12:08 +00:00
### Installation on Yuzu Emulator on PC
> [!NOTE]
> Working as of Yuzu Mainline 1537 ~ 1538!
Exact same process as above, but the filepaths are in Yuzu's mod paths.
1 ) Extract the contents of the TrainingModpack .zip (`atmosphere` folder). Paste the `atmosphere` folder inside atmosphere into `%AppData%/Yuzu/sdmc/`.
2 ) Similarly, extracted contents of the Skyline .zip (`exefs` folder) into into `%AppData%/yuzu/sdmc/atmosphere/contents/01006a800016e000`.
2023-03-05 03:12:58 +00:00
3 ) No files need to be manually deleted when upgrading from a previous version.
2023-09-06 17:12:08 +00:00
4 ) The Yuzu `sdmc` folder should have the files below at these locations.
2023-03-05 03:12:58 +00:00
```
%AppData%
2023-09-06 17:12:08 +00:00
└── Yuzu/
└── sdmc/
2023-10-09 18:53:55 +00:00
└── atmosphere/
└── contents/
└── 01006A800016E000/
├── exefs/
│ ├── subsdk9
│ └── main.npdm
└── romfs/
└── skyline/
└── plugins/
├── libnro_hook.nro
├── libparam_hook.nro
└── libtraining_modpack.nro
2023-09-06 17:12:08 +00:00
```
### Installation on Ryujinx Emulator on PC
Exact same process as above, but the filepaths are in Ryujinx's mod paths.
1 ) Extract the contents of the TrainingModpack .zip (`atmosphere` folder). Within that folder, you'll have a `contents` folder. Paste the `contents` folder inside atmosphere into `%AppData%/Ryujinx/mods/`.
2 ) Similarly, extracted contents of the Skyline .zip (`exefs` folder) into into `%AppData%/Ryujinx/mods/contents/01006a800016e000`.
3 ) No files need to be manually deleted when upgrading from a previous version.
4 ) The Ryujinx mods folder should have the files below at these locations.
```
%AppData%
└── Ryujinx/
└── mods/
└── contents/
└── 01006A800016E000/
├── exefs/
│ ├── subsdk9
│ └── main.npdm
└── romfs/
└── skyline/
└── plugins/
├── libnro_hook.nro
├── libparam_hook.nro
└── libtraining_modpack.nro
2023-03-05 03:12:58 +00:00
```
2023-03-05 04:15:37 +00:00
files : >
2023-02-27 07:44:12 +00:00
training_modpack_beta.zip
- name : Upload zip as artifact
2023-08-04 20:07:15 +00:00
uses : actions/upload-artifact@v3
2023-02-27 07:44:12 +00:00
with :
name : full_build
path : training_modpack_beta.zip