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 ]
|
2024-04-15 13:30:48 +01:00
|
|
|
|
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
|
2024-04-15 13:30:48 +01:00
|
|
|
|
2022-02-09 04:52:04 +00:00
|
|
|
container:
|
|
|
|
image: devkitpro/devkita64
|
2024-04-15 13:30:48 +01:00
|
|
|
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
|
2022-02-09 04:52:04 +00:00
|
|
|
steps:
|
2024-05-01 17:40:18 +01:00
|
|
|
- name: Set environment variables
|
2024-05-01 12:56:49 +01:00
|
|
|
run: |
|
2024-05-01 17:40:18 +01:00
|
|
|
echo "nxdt_commit=${GITHUB_SHA::7}" >> $GITHUB_ENV
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2024-05-01 17:40:18 +01:00
|
|
|
- name: Clone nxdumptool repository
|
2024-05-02 13:27:32 +01:00
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
path: nxdumptool
|
|
|
|
submodules: recursive
|
2024-05-01 17:40:18 +01:00
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
- name: Build nxdumptool-rewrite PoC binary
|
|
|
|
id: build
|
|
|
|
continue-on-error: true
|
2024-05-02 13:27:32 +01:00
|
|
|
working-directory: nxdumptool
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2024-05-02 13:27:32 +01:00
|
|
|
chmod +x ./build.sh
|
2024-04-15 13:30:48 +01:00
|
|
|
./build.sh --noconfirm
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2024-05-02 13:27:32 +01:00
|
|
|
- name: Clone libnx repository
|
|
|
|
if: ${{ steps.build.outcome == 'failure' }}
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
repository: switchbrew/libnx
|
|
|
|
path: libnx
|
|
|
|
submodules: recursive
|
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
- name: Install latest libnx commit and retry build
|
|
|
|
if: ${{ steps.build.outcome == 'failure' }}
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2024-05-02 13:27:32 +01:00
|
|
|
cd "$GITHUB_WORKSPACE/libnx"
|
|
|
|
make install -j8
|
|
|
|
cd "$GITHUB_WORKSPACE/nxdumptool"
|
2024-02-16 23:19:29 +00:00
|
|
|
./build.sh --noconfirm
|
2022-02-09 04:52:04 +00:00
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Build nxdumptool-rewrite UI binary
|
2024-05-02 13:27:32 +01:00
|
|
|
working-directory: nxdumptool
|
2024-05-01 17:40:18 +01:00
|
|
|
run: |
|
2024-05-02 13:27:32 +01:00
|
|
|
make -j8
|
2023-03-24 23:39:34 +00:00
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Upload nxdumptool-rewrite PoC NRO artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
2022-02-09 04:52:04 +00:00
|
|
|
with:
|
2024-05-01 17:40:18 +01:00
|
|
|
name: nxdt_rw_poc-${{ env.nxdt_commit }}.nro
|
2024-05-02 13:27:32 +01:00
|
|
|
path: nxdumptool/code_templates/tmp/nxdt_rw_poc.nro
|
2022-02-09 04:52:04 +00:00
|
|
|
if-no-files-found: error
|
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Upload nxdumptool-rewrite PoC ELF artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
2022-02-09 04:52:04 +00:00
|
|
|
with:
|
2024-05-01 17:40:18 +01:00
|
|
|
name: nxdt_rw_poc-${{ env.nxdt_commit }}.elf
|
2024-05-02 13:27:32 +01:00
|
|
|
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
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Upload nxdumptool-rewrite UI NRO artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
2024-05-01 17:40:18 +01:00
|
|
|
with:
|
|
|
|
name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.nro
|
2024-05-02 13:27:32 +01:00
|
|
|
path: nxdumptool/nxdumptool.nro
|
2024-05-01 17:40:18 +01:00
|
|
|
if-no-files-found: error
|
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Upload nxdumptool-rewrite UI ELF artifact
|
|
|
|
uses: actions/upload-artifact@v4
|
2024-05-01 17:40:18 +01:00
|
|
|
with:
|
|
|
|
name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.elf
|
2024-05-02 13:27:32 +01:00
|
|
|
path: nxdumptool/nxdumptool.elf
|
2024-05-01 17:40:18 +01:00
|
|
|
if-no-files-found: error
|
2023-10-17 07:20:32 +01:00
|
|
|
|
2024-05-02 14:38:39 +01:00
|
|
|
- name: Upload nxdumptool-rewrite PoC artifacts to pre-release
|
2023-10-17 07:20:32 +01:00
|
|
|
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.
|
2024-08-28 11:03:19 +01:00
|
|
|
removeArtifacts: False
|
2023-10-17 07:20:32 +01:00
|
|
|
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
|
2024-05-02 13:27:32 +01:00
|
|
|
artifacts: "nxdumptool/code_templates/tmp/nxdt_rw_poc.*"
|
|
|
|
#artifacts: "nxdumptool/code_templates/tmp/nxdt_rw_poc.*, nxdumptool/nxdumptool.*"
|
2023-10-17 07:20:32 +01:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|