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:
|
2023-10-31 18:13:04 +00:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
2024-04-15 13:30:48 +01:00
|
|
|
submodules: true
|
2022-02-09 04:52:04 +00:00
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
- name: Set environment variables
|
|
|
|
run: |
|
|
|
|
echo "nxdt_commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2024-04-15 13:43:00 +01:00
|
|
|
- name: Set workspace permissions
|
|
|
|
run: chmod 777 -R "$GITHUB_WORKSPACE"
|
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
- name: Setup ccache
|
|
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
# ccache invocation is handled in the build script.
|
|
|
|
- name: Build nxdumptool-rewrite PoC binary
|
|
|
|
id: build
|
|
|
|
continue-on-error: true
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2024-04-15 13:30:48 +01:00
|
|
|
./build.sh --noconfirm
|
2023-03-20 15:58:00 +00:00
|
|
|
|
2024-04-15 13:30:48 +01:00
|
|
|
- name: Install latest libnx commit and retry build
|
|
|
|
id: retry
|
|
|
|
if: ${{ steps.build.outcome == 'failure' }}
|
2022-02-09 04:52:04 +00:00
|
|
|
run: |
|
2024-04-15 13:30:48 +01:00
|
|
|
pushd /tmp
|
|
|
|
git clone https://github.com/switchbrew/libnx
|
|
|
|
cd libnx
|
|
|
|
make -j8 PREFIX="ccache aarch64-none-elf-"
|
|
|
|
make install
|
|
|
|
popd
|
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
|
|
|
|
# run: |
|
2024-04-15 13:30:48 +01:00
|
|
|
# make -j8 PREFIX="ccache aarch64-none-elf-"
|
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
|
2024-04-15 13:30:48 +01:00
|
|
|
path: 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
|
2024-04-15 13:30:48 +01:00
|
|
|
path: 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
|
2024-04-15 13:30:48 +01:00
|
|
|
# path: nxdumptool.nro
|
2023-05-24 20:05:34 +01:00
|
|
|
# if-no-files-found: error
|
|
|
|
|
|
|
|
#- uses: actions/upload-artifact@v3
|
|
|
|
# with:
|
|
|
|
# name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.elf
|
2024-04-15 13:30:48 +01:00
|
|
|
# path: nxdumptool.elf
|
2023-05-24 20:05:34 +01:00
|
|
|
# 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
|
2024-04-15 13:30:48 +01:00
|
|
|
artifacts: "code_templates/tmp/nxdt_rw_poc.*"
|
|
|
|
#artifacts: "code_templates/tmp/nxdt_rw_poc.*, nxdumptool.*"
|
2023-10-17 07:20:32 +01:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|