-
Notifications
You must be signed in to change notification settings - Fork 48
187 lines (168 loc) · 7.2 KB
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
rustfmt_check:
name: Code Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
target: x86_64-unknown-linux-gnu
- name: Check Formatting
run: cargo fmt --all -- --check
checker:
name: Check, Clippy, Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@nightly
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
run: cargo clippy --all-targets --all-features --target=x86_64-unknown-linux-gnu -- -D warnings
- name: TUI Test
uses: ClementTsang/[email protected]
with:
command: test
directory: training_mod_tui
plugin:
name: Plugin NRO
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
target: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
name: Rust Cache
with:
prefix-key: "plugin"
cache-all-crates: true
- name: Install Skyline
run: |
cargo install --git https://github.com/Raytwo/cargo-skyline --branch std-change --force
cargo-skyline skyline update-std
- name: Build release NRO
id: build_release
run: RUSTFLAGS=-g cargo-skyline skyline build --release
- name: Upload plugin artifact
uses: actions/upload-artifact@v3
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:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@nightly
with:
target: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
name: Rust Cache
with:
prefix-key: "plugin"
cache-all-crates: true
- name: Install Skyline
run: |
cargo install --git https://github.com/Raytwo/cargo-skyline --branch std-change --force
cargo-skyline skyline update-std
- name: Build outside_training_mode NRO
run: RUSTFLAGS=-g cargo-skyline skyline build --release --features outside_training_mode
- name: Upload plugin (outside training mode) artifact
uses: actions/upload-artifact@v3
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
uses: actions/download-artifact@v3
- 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.3/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
uses: dev-drprasad/[email protected]
with:
tag_name: beta
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update Release
uses: meeDamian/[email protected]
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.*
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`.
3) No files need to be manually deleted when upgrading from a previous version.
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
```
files: >
training_modpack_beta.zip
- name: Upload zip as artifact
uses: actions/upload-artifact@v3
with:
name: full_build
path: training_modpack_beta.zip