1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-10-02 17:24:28 +00:00
UltimateTrainingModpack/.github/workflows/rust.yml
jugeeya d5c0d636a0
UI Code Refactor; Notifications; Save Defaults for Quick Menu (#461)
* Initial refactor

* Full refactor

* Depend only on pane creator flags

* Small refactor

* Small refactors; notification support

* Don't push event for every quick menu change

* Backend for defaults almost done

* Run tests on CI

* Finish save + reset defaults without confirmation

* Added slider menu UI

---------

Co-authored-by: xhudaman <edell.matthew@gmail.com>
2023-02-02 15:01:11 -08:00

166 lines
6 KiB
YAML

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
checker:
name: Check, Clippy, Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install minimal nightly rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt, clippy
default: true
target: x86_64-unknown-linux-gnu
- uses: Swatinem/rust-cache@v2
name: Rust Cache
with:
prefix-key: "checker"
- name: Check
run: cargo +nightly check --target=x86_64-unknown-linux-gnu
- name: Clippy
run: cargo +nightly clippy --all-targets --all-features --target=x86_64-unknown-linux-gnu
- name: TUI Test
working-directory: training_mod_tui
run: cargo +nightly test
plugin:
name: Plugin NRO
runs-on: ubuntu-latest
container:
image: jugeeya/cargo-skyline:3.2.0-no-dkp
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
name: Rust Cache
with:
prefix-key: "plugin"
- name: Build release NRO
id: build_release
run: 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
- name: Upload static files
uses: actions/upload-artifact@v2
with:
name: static
path: src/static
plugin_outside_training_mode:
name: Plugin NRO (Outside Training Mode)
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
container:
image: jugeeya/cargo-skyline:3.2.0-no-dkp
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
name: Rust Cache
with:
prefix-key: "plugin"
- name: Build outside_training_mode NRO
run: |
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:
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@v2
- name: Prepare zip
id: prepare_zip
env:
SKYLINE_DIR: atmosphere/contents/01006A800016E000
SMASH_PLUGIN_DIR: atmosphere/contents/01006A800016E000/romfs/skyline/plugins
SMASH_WEB_DIR: atmosphere/contents/01006A800016E000/manual_html/html-document/training_modpack.htdocs
run: |
mkdir -p ${{env.SKYLINE_DIR}}
mkdir -p ${{env.SMASH_PLUGIN_DIR}}
mkdir -p ${{env.SMASH_WEB_DIR}}
wget https://web.archive.org/web/20220210115256/https://github.com/skyline-dev/skyline/releases/download/beta/skyline.zip
unzip skyline.zip
mv exefs ${{env.SKYLINE_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
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
cp -r static/* ${{env.SMASH_WEB_DIR}}
zip -r training_modpack_beta.zip atmosphere
- name: Delete Release
uses: dev-drprasad/delete-tag-and-release@v0.2.0
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
### Installing on console
Install the same way you would install a full release.
### Installing on Ryujinx
Instructions to get the beta working on Ryujinx.
1. Download the latest build of Ryujinx, which can be found here: https://ryujinx.org/download/
2. Download the beta. https://github.com/jugeeya/UltimateTrainingModpack/releases/tag/beta
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.
4. You should be good to go after this. When in training mode, use Special+Uptaunt to bring up the menu.
files: >
training_modpack_beta.zip
- name: Upload zip as artifact
uses: actions/upload-artifact@v1
with:
name: full_build
path: training_modpack_beta.zip