2020-04-13 03:36:16 +00:00
|
|
|
name: Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-08-15 02:25:46 +00:00
|
|
|
branches: [ master ]
|
2021-08-13 01:18:57 +00:00
|
|
|
pull_request:
|
2020-04-13 03:36:16 +00:00
|
|
|
branches: [ master ]
|
2021-06-22 20:47:29 +00:00
|
|
|
workflow_dispatch:
|
2020-04-13 03:36:16 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-09-14 17:55:23 +00:00
|
|
|
clippy_pr:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: jugeeya/cargo-skyline:2.1.0-dkp
|
|
|
|
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
|
|
|
|
toolchain: nightly-2021-06-01
|
|
|
|
components: rustfmt, clippy
|
|
|
|
default: true
|
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
- uses: actions-rs/clippy-check@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
toolchain: nightly-2021-06-01
|
|
|
|
args: --all-features --target=x86_64-unknown-linux-gnu
|
2021-09-14 21:05:48 +00:00
|
|
|
- uses: mbrobbel/rustfmt-check@master
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-08-15 02:25:46 +00:00
|
|
|
plugin:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2021-09-13 15:24:43 +00:00
|
|
|
image: jugeeya/cargo-skyline:2.1.0-dkp
|
2021-08-15 02:25:46 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2020-08-15 19:21:24 +00:00
|
|
|
- name: Build release NRO
|
2021-06-22 20:47:29 +00:00
|
|
|
run: |
|
2021-09-13 15:24:43 +00:00
|
|
|
PATH=$PATH:/root/.cargo/bin:/opt/devkitpro/devkitA64/bin /root/.cargo/bin/cargo-skyline skyline build --release
|
2021-08-14 05:53:57 +00:00
|
|
|
env:
|
|
|
|
HOME: /root
|
2020-08-15 19:21:24 +00:00
|
|
|
- name: Upload plugin artifact
|
2020-08-15 20:16:03 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
2020-07-05 23:10:13 +00:00
|
|
|
with:
|
2020-08-15 19:21:24 +00:00
|
|
|
name: plugin
|
2020-09-21 00:48:56 +00:00
|
|
|
path: target/aarch64-skyline-switch/release/libtraining_modpack.nro
|
2021-08-16 01:55:51 +00:00
|
|
|
- name: Upload menu icons
|
2021-04-14 17:33:29 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: svg
|
2021-08-16 01:55:51 +00:00
|
|
|
path: src/templates/*.svg
|
2021-08-16 06:32:15 +00:00
|
|
|
plugin_outside_training_mode:
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2021-09-13 15:24:43 +00:00
|
|
|
image: jugeeya/cargo-skyline:2.1.0-dkp
|
2021-08-16 06:32:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-01-22 19:21:17 +00:00
|
|
|
- name: Build outside_training_mode NRO
|
2021-09-13 15:24:43 +00:00
|
|
|
run: |
|
2021-11-05 21:27:40 +00:00
|
|
|
PATH=$PATH:/root/.cargo/bin:/opt/devkitpro/devkitA64/bin /root/.cargo/bin/cargo-skyline skyline build --release --features outside_training_mode
|
2021-08-14 05:53:57 +00:00
|
|
|
env:
|
|
|
|
HOME: /root
|
2021-01-22 19:21:17 +00:00
|
|
|
- name: Upload plugin (outside training mode) artifact
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: plugin_outside_training_mode
|
2021-11-03 18:26:47 +00:00
|
|
|
path: target/aarch64-skyline-switch/release/libtraining_modpack.nro
|
2020-08-15 19:21:24 +00:00
|
|
|
upload:
|
|
|
|
runs-on: ubuntu-latest
|
2021-08-15 02:25:46 +00:00
|
|
|
if: github.ref == 'refs/heads/master'
|
2020-08-15 19:21:24 +00:00
|
|
|
needs:
|
|
|
|
- plugin
|
|
|
|
steps:
|
|
|
|
- name: Download all artifacts
|
|
|
|
uses: actions/download-artifact@v2
|
2020-05-17 17:41:48 +00:00
|
|
|
- name: Prepare zip
|
2020-08-15 19:21:24 +00:00
|
|
|
env:
|
2021-04-16 15:37:17 +00:00
|
|
|
SKYLINE_DIR: atmosphere/contents/01006A800016E000
|
2020-08-15 19:21:24 +00:00
|
|
|
SMASH_PLUGIN_DIR: atmosphere/contents/01006A800016E000/romfs/skyline/plugins
|
2021-04-16 03:35:27 +00:00
|
|
|
SMASH_WEB_DIR: atmosphere/contents/01006A800016E000/manual_html/html-document/contents.htdocs
|
2021-04-16 15:37:17 +00:00
|
|
|
run: |
|
|
|
|
mkdir -p ${{env.SKYLINE_DIR}}
|
|
|
|
mkdir -p ${{env.SMASH_PLUGIN_DIR}}
|
|
|
|
mkdir -p ${{env.SMASH_WEB_DIR}}
|
2021-04-14 17:33:29 +00:00
|
|
|
wget https://github.com/skyline-dev/skyline/releases/download/beta/skyline.zip
|
|
|
|
unzip skyline.zip
|
|
|
|
mv exefs ${{env.SKYLINE_DIR}}
|
2020-08-15 19:21:24 +00:00
|
|
|
cp plugin/libtraining_modpack.nro ${{env.SMASH_PLUGIN_DIR}}/libtraining_modpack.nro
|
2020-10-14 02:23:17 +00:00
|
|
|
wget https://github.com/ultimate-research/params-hook-plugin/releases/download/v0.1.1/libparam_hook.nro
|
2021-09-09 18:29:44 +00:00
|
|
|
wget https://github.com/ultimate-research/nro-hook-plugin/releases/download/v0.3.0/libnro_hook.nro
|
2021-08-20 19:18:35 +00:00
|
|
|
wget https://github.com/jugeeya/nn-hid-hook/releases/download/beta/libnn_hid_hook.nro
|
2020-09-14 20:52:29 +00:00
|
|
|
cp libparam_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libparam_hook.nro
|
2021-04-14 17:33:29 +00:00
|
|
|
cp libnro_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnro_hook.nro
|
2021-08-20 18:49:56 +00:00
|
|
|
cp libnn_hid_hook.nro ${{env.SMASH_PLUGIN_DIR}}/libnn_hid_hook.nro
|
2021-08-16 06:18:56 +00:00
|
|
|
ls -1 svg/*.svg | xargs -n 1 basename | xargs -L1 -I{} cp svg/{} ${{env.SMASH_WEB_DIR}}/{}
|
2021-08-25 02:27:29 +00:00
|
|
|
zip -r training_modpack_beta.zip atmosphere
|
2020-06-08 02:20:24 +00:00
|
|
|
- name: Update Release
|
|
|
|
uses: meeDamian/github-release@2.0
|
2020-05-17 18:13:52 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2020-06-08 02:20:24 +00:00
|
|
|
prerelease: true
|
|
|
|
allow_override: true
|
|
|
|
gzip: false
|
2020-08-20 00:59:40 +00:00
|
|
|
tag: beta
|
2020-05-17 18:13:52 +00:00
|
|
|
name: beta
|
2020-05-17 18:25:12 +00:00
|
|
|
body: >
|
2020-05-25 22:13:19 +00:00
|
|
|
Beta built off of the latest code in the repository.
|
|
|
|
|
2020-10-02 05:21:30 +00:00
|
|
|
Install the same way you would install a full release.
|
2020-06-08 02:20:24 +00:00
|
|
|
files: >
|
|
|
|
training_modpack_beta.zip
|
2020-08-13 20:37:16 +00:00
|
|
|
- name: Upload zip as artifact
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: full_build
|
2021-08-16 06:18:56 +00:00
|
|
|
path: training_modpack_beta.zip
|