name: Build nxdumptool-rewrite binary on: push: branches: [ rewrite ] paths: - '.github/workflows/rewrite.yml' - 'code_templates/**' - 'include/**' - 'libs/**' - 'romfs/**' - 'source/**' - 'build.sh' - 'Makefile' # Allows you to run this workflow manually from the Actions tab. workflow_dispatch: jobs: build: runs-on: ubuntu-latest container: image: devkitpro/devkita64 defaults: run: shell: bash steps: - uses: actions/checkout@v4 with: submodules: true - name: Set environment variables run: | echo "nxdt_commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV - name: Set workspace permissions run: chmod 777 -R "$GITHUB_WORKSPACE" - name: Setup ccache uses: hendrikmuhs/ccache-action@v1.2 # ccache invocation is handled in the build script. - name: Build nxdumptool-rewrite PoC binary id: build continue-on-error: true run: | ./build.sh --noconfirm - name: Install latest libnx commit and retry build id: retry if: ${{ steps.build.outcome == 'failure' }} run: | pushd /tmp git clone https://github.com/switchbrew/libnx cd libnx make -j8 PREFIX="ccache aarch64-none-elf-" make install popd ./build.sh --noconfirm #- name: Build nxdumptool-rewrite GUI binary # run: | # make -j8 PREFIX="ccache aarch64-none-elf-" - uses: actions/upload-artifact@v3 with: name: nxdt_rw_poc-${{ env.nxdt_commit }}.nro path: code_templates/tmp/nxdt_rw_poc.nro if-no-files-found: error - uses: actions/upload-artifact@v3 with: name: nxdt_rw_poc-${{ env.nxdt_commit }}.elf path: code_templates/tmp/nxdt_rw_poc.elf if-no-files-found: error #- uses: actions/upload-artifact@v3 # with: # name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.nro # path: nxdumptool.nro # if-no-files-found: error #- uses: actions/upload-artifact@v3 # with: # name: nxdumptool-rewrite-${{ env.nxdt_commit }}-WIP_UI.elf # path: nxdumptool.elf # if-no-files-found: error - name: Upload artifact to prerelease uses: ncipollo/release-action@v1 with: # Only update attachments on "rewrite-prerelease" tag. prerelease: True tag: "rewrite-prerelease" updateOnlyUnreleased: True # Remove old artifacts and replace with new ones. removeArtifacts: True replacesArtifacts: True # Update preferences. allowUpdates: True omitBody: True omitBodyDuringUpdate: True omitNameDuringUpdate: True artifacts: "code_templates/tmp/nxdt_rw_poc.*" #artifacts: "code_templates/tmp/nxdt_rw_poc.*, nxdumptool.*" token: ${{ secrets.GITHUB_TOKEN }}