2023-07-21 23:53:56 +01:00
|
|
|
name: Build nxdumptool-rewrite binary
|
2022-02-09 04:52:04 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ rewrite ]
|
2023-04-09 14:39:42 +01:00
|
|
|
paths:
|
|
|
|
- '.github/workflows/rewrite.yml'
|
|
|
|
- 'code_templates/**'
|
|
|
|
- 'include/**'
|
|
|
|
- 'libs/**'
|
|
|
|
- 'romfs/**'
|
|
|
|
- 'source/**'
|
|
|
|
- 'build.sh'
|
|
|
|
- 'Makefile'
|
2022-02-09 04:52:04 +00:00
|
|
|
|
2023-03-20 15:58:00 +00:00
|
|
|
# Allows you to run this workflow manually from the Actions tab.
|
2022-02-09 04:52:04 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: devkitpro/devkita64
|
|
|
|
steps:
|
2023-10-31 18:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: nxdumptool
|
|
|
|
submodules: recursive
|
2022-02-09 04:52:04 +00:00
|
|
|
|
2023-03-20 15:58:00 +00:00
|
|
|
- name: Checkout latest libnx commit
|
2023-10-31 18:13:04 +00:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: switchbrew/libnx
|
|
|
|
path: libnx
|
|
|
|
submodules: recursive
|
2023-03-20 15:58:00 +00:00
|
|
|
|
|
|
|
- name: Set workspace permissions
|
|
|
|
run: chmod 777 -R "$GITHUB_WORKSPACE"
|
|
|
|
|
|
|
|
- name: Build and install libnx
|
2023-10-31 18:13:04 +00:00
|
|
|
working-directory: libnx
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2023-03-25 11:10:07 +00:00
|
|
|
make install -j$(nproc)
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2023-07-21 23:53:56 +01:00
|
|
|
- name: Build nxdumptool-rewrite PoC binary
|
2023-10-31 18:13:04 +00:00
|
|
|
working-directory: nxdumptool
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2023-10-31 18:13:04 +00:00
|
|
|
echo "nxdt_commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
2024-02-16 23:19:29 +00:00
|
|
|
./build.sh --noconfirm
|
2022-02-09 04:52:04 +00:00
|
|
|
|
2023-05-24 20:05:34 +01:00
|
|
|
#- name: Build nxdumptool-rewrite GUI binary
|
2023-11-03 01:22:47 +00:00
|
|
|
# working-directory: nxdumptool
|
2023-05-24 20:05:34 +01:00
|
|
|
# run: |
|
|
|
|
# make -j$(nproc)
|
2023-03-24 23:39:34 +00:00
|
|
|
|
2023-03-20 15:58:00 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-02-09 04:52:04 +00:00
|
|
|
with:
|
2023-07-21 23:53:56 +01:00
|
|
|
name: nxdt_rw_poc-${{ env.nxdt_commit }}.nro
|
|
|
|
path: nxdumptool/code_templates/tmp/nxdt_rw_poc.nro
|
2022-02-09 04:52:04 +00:00
|
|
|
if-no-files-found: error
|
|
|
|
|
2023-03-20 15:58:00 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2022-02-09 04:52:04 +00:00
|
|
|
with:
|
2023-07-21 23:53:56 +01:00
|
|
|
name: nxdt_rw_poc-${{ env.nxdt_commit }}.elf
|
|
|
|
path: nxdumptool/code_templates/tmp/nxdt_rw_poc.elf
|
2022-02-09 04:52:04 +00:00
|
|
|
if-no-files-found: error
|
2023-03-24 23:39:34 +00:00
|
|
|
|
2023-05-24 20:05:34 +01:00
|
|
|
#- uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.nro
|
|
|
|
# path: nxdumptool/nxdumptool.nro
|
|
|
|
# if-no-files-found: error
|
|
|
|
|
|
|
|
#- uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.elf
|
|
|
|
# path: nxdumptool/nxdumptool.elf
|
|
|
|
# if-no-files-found: error
|
2023-10-17 07:20:32 +01:00
|
|
|
|
|
|
|
- name: Upload artifact to prerelease
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
2023-11-03 18:03:50 +00:00
|
|
|
# Only update attachments on "rewrite-prerelease" tag.
|
2023-10-17 07:20:32 +01:00
|
|
|
prerelease: True
|
|
|
|
tag: "rewrite-prerelease"
|
|
|
|
updateOnlyUnreleased: True
|
2023-11-03 01:22:47 +00:00
|
|
|
# Remove old artifacts and replace with new ones.
|
2023-10-17 07:20:32 +01:00
|
|
|
removeArtifacts: True
|
|
|
|
replacesArtifacts: True
|
2023-11-03 01:22:47 +00:00
|
|
|
# Update preferences.
|
2023-10-17 07:20:32 +01:00
|
|
|
allowUpdates: True
|
|
|
|
omitBody: True
|
|
|
|
omitBodyDuringUpdate: True
|
|
|
|
omitNameDuringUpdate: True
|
|
|
|
artifacts: "nxdumptool/code_templates/tmp/nxdt_rw_poc.*"
|
|
|
|
#artifacts: "nxdumptool/code_templates/tmp/nxdt_rw_poc.*, nxdumptool/nxdumptool.*"
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|