1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-10-02 17:24:28 +00:00

Fix GH Actions Workflow (#208)

* Add workflow_dispatch

* Add specific lock_api version

* Update to latest cargo-skyline version

* Update workflow with skyline-rs toolchain

* Separate cargo-skyline install and toolchain update

* Use Rust docker container

* Try rustocker/rustup container

* Revert "Try rustocker/rustup container"

This reverts commit 26fff6a44f.

* Try fork of cargo-skyline

* Revert "Try fork of cargo-skyline"

This reverts commit 0465c39e94.

* Try installing own Rust

* Fix syntax error

Co-authored-by: asimon-1 <asimon1@protonmail.com>
This commit is contained in:
asimon-1 2021-06-22 16:47:29 -04:00 committed by GitHub
parent 18a5cee052
commit cd8755012c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 86 deletions

View file

@ -3,18 +3,27 @@ name: Rust
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
plugin:
runs-on: ubuntu-latest
container: jugeeya/cargo-skyline:latest
steps:
- uses: actions/checkout@v2
- name: Link rust-std-skyline src
run: mkdir ../rust-std-skyline-squashed && ln -s $XARGO_RUST_SRC ../rust-std-skyline-squashed/src
- name: Install minimal stable rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install cargo-skyline
run: |
cargo install cargo-skyline
- name: Update skyline-rs toolchain
run: |
cargo skyline update-std
- name: Build release NRO
run: cargo skyline build --release
run: |
cargo skyline build --release
- name: Upload plugin artifact
uses: actions/upload-artifact@v2
with:

View file

@ -9,7 +9,9 @@ crate-type = ["cdylib"]
[dependencies]
skyline = { git = "https://github.com/ultimate-research/skyline-rs.git" }
skyline_smash = { git = "https://github.com/ultimate-research/skyline-smash.git" }
# TODO: Update from commit 95ea66a to latest
# skyline_smash = { git = "https://github.com/ultimate-research/skyline-smash.git", features=["weak_l2cvalue"]}
skyline_smash = {git = "https://github.com/ultimate-research/skyline-smash.git", rev = "95ea66a"}
skyline-web = { git = "https://github.com/skyline-rs/skyline-web.git" }
bitflags = "1.2.1"
parking_lot = { version = "0.11.1", features = ["nightly"] }

View file

@ -1,22 +0,0 @@
[package]
rust-src = "../rust-std-skyline-squashed/src"
[dependencies.core]
path = "../rust-std-skyline-squashed/src/libcore"
#git = "https://github.com/jam1garner/rust-std-skyline-squashed.git"
stage = 0
[dependencies.alloc]
path = "../rust-std-skyline-squashed/src/liballoc"
#git = "https://github.com/jam1garner/rust-std-skyline-squashed.git"
stage = 0
[dependencies.std]
path = "../rust-std-skyline-squashed/src/libstd"
#git = "https://github.com/jam1garner/rust-std-skyline-squashed.git"
stage = 1
#[patch.crates-io]
#rustc-std-workspace-core = { git = 'https://github.com/jam1garner/rust-std-skyline-squashed.git', branch = 'master' }
#rustc-std-workspace-alloc = { git = 'https://github.com/jam1garner/rust-std-skyline-squashed.git', branch = 'master' }
#rustc-std-workspace-std = { git = 'https://github.com/jam1garner/rust-std-skyline-squashed.git', branch = 'master' }

View file

@ -1,45 +0,0 @@
{
"abi-blacklist": [
"stdcall",
"fastcall",
"vectorcall",
"thiscall",
"win64",
"sysv64"
],
"arch": "aarch64",
"crt-static-default": false,
"crt-static-respected": false,
"data-layout": "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128",
"dynamic-linking": true,
"dynamic-linking-available": true,
"executables": true,
"has-elf-tls": false,
"has-rpath": false,
"linker": "rust-lld",
"linker-flavor": "ld.lld",
"llvm-target": "aarch64-unknown-none",
"max-atomic-width": 128,
"os": "switch",
"panic-strategy": "abort",
"position-independent-executables": true,
"pre-link-args": {
"ld.lld": [
"-Tlink.ld",
"-init=__custom_init",
"-fini=__custom_fini",
"--export-dynamic"
]
},
"post-link-args": {
"ld.lld": [
"--no-gc-sections",
"--eh-frame-hdr"
]
},
"relro-level": "off",
"target-c-int-width": "32",
"target-endian": "little",
"target-pointer-width": "64",
"vendor": "roblabla"
}

View file

@ -1 +1 @@
nightly-2020-04-10
stable

View file

@ -136,7 +136,7 @@ macro_rules! add_bitflag_submenu {
$menu.add_sub_menu_sep(
$title,
stringify!($id),
MENU_STRUCT.$id.bits() as usize,
MENU.$id.bits() as usize,
[<$id _strs>].iter().map(|i| i.as_str()).collect(),
[<$id _vals>]
);
@ -167,7 +167,7 @@ pub fn set_menu_from_url(s: &str) {
unsafe {
MENU_STRUCT.set(toggle, bits);
MENU.set(toggle, bits);
}
}
}
@ -212,7 +212,7 @@ pub unsafe fn render_menu() -> String {
overall_menu.add_sub_menu(
"Shield Toggles",
"shield_state",
MENU_STRUCT.shield_state as usize,
MENU.shield_state as usize,
[
("None", Shield::None as usize),
("Hold", Shield::Hold as usize),
@ -226,10 +226,10 @@ pub unsafe fn render_menu() -> String {
"Input Delay",
"input_delay",
// unnecessary for slider?
MENU_STRUCT.input_delay as usize,
MENU.input_delay as usize,
[].to_vec(),
[
(0, 10, MENU_STRUCT.input_delay as usize)
(0, 10, MENU.input_delay as usize)
].to_vec()
);
@ -240,7 +240,7 @@ pub unsafe fn render_menu() -> String {
overall_menu.add_sub_menu(
"Hitbox Visualization",
"hitbox_vis",
MENU_STRUCT.hitbox_vis as usize,
MENU.hitbox_vis as usize,
[
("Off", OnOff::Off as usize),
("On", OnOff::On as usize),
@ -250,7 +250,7 @@ pub unsafe fn render_menu() -> String {
overall_menu.add_sub_menu(
"Stage Hazards",
"stage_hazards",
MENU_STRUCT.stage_hazards as usize,
MENU.stage_hazards as usize,
[
("Off", OnOff::Off as usize),
("On", OnOff::On as usize),
@ -260,7 +260,7 @@ pub unsafe fn render_menu() -> String {
overall_menu.add_sub_menu(
"Mash In Neutral",
"mash_in_neutral",
MENU_STRUCT.mash_in_neutral as usize,
MENU.mash_in_neutral as usize,
[
("Off", OnOff::Off as usize),
("On", OnOff::On as usize),

View file

@ -6,7 +6,7 @@ use smash::app::{self, lua_bind::*};
use smash::hash40;
use smash::lib::lua_const::*;
pub static mut MENU_STRUCT: consts::TrainingModpackMenu = consts::TrainingModpackMenu {
pub static mut MENU: consts::TrainingModpackMenu = consts::TrainingModpackMenu {
hitbox_vis: OnOff::On,
stage_hazards: OnOff::Off,
di_state: Direction::empty(),
@ -35,8 +35,6 @@ pub static mut MENU_STRUCT: consts::TrainingModpackMenu = consts::TrainingModpac
save_damage: OnOff::On,
};
pub static mut MENU: &consts::TrainingModpackMenu = unsafe { &mut MENU_STRUCT };
pub static mut FIGHTER_MANAGER_ADDR: usize = 0;
pub static mut STAGE_MANAGER_ADDR: usize = 0;

View file

@ -62,7 +62,7 @@ pub fn main() {
nro::add_hook(nro_main).unwrap();
unsafe {
let mut buffer = format!("{:x}", MENU as *const _ as u64);
let mut buffer = format!("{:x}", &MENU as *const _ as u64);
log!(
"Writing training_modpack.log with {}...",
buffer