From 3d5187dd1fccc7e7480f10d933558c4ffc1679b1 Mon Sep 17 00:00:00 2001 From: Whovian9369 Date: Tue, 8 Feb 2022 23:52:04 -0500 Subject: [PATCH] Add working github workflow to rewrite branch, builds libusbhsfs + nxdt rewrite (#106) * Add working github workflow to branch, builds libusbhsfs + nxdt rewrite * Fix build to actually work with dkp-toolchain-vars from mirror site * Update `build.sh` so Github Actions properly finishes the build process for the Rewrite * Update dkp-toolchain-vars - v1.0.0-2 link to Wayback mirror --- .github/workflows/rewrite.yml | 57 +++++++++++++++++++++++++++++++++++ build.sh | 2 -- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/rewrite.yml diff --git a/.github/workflows/rewrite.yml b/.github/workflows/rewrite.yml new file mode 100644 index 0000000..32f57d5 --- /dev/null +++ b/.github/workflows/rewrite.yml @@ -0,0 +1,57 @@ +name: Build nxdumptool 'rewrite' tests + +on: + push: + branches: [ rewrite ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: devkitpro/devkita64 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Updating repos, install dkp-toolchain-vars, and set permissions... + run: | + sudo apt-get update ; sudo apt-get upgrade -y patch fakeroot p7zip-full + sudo -n dkp-pacman --noconfirm -U "https://web.archive.org/web/20220209041425if_/https://wii.leseratte10.de/devkitPro/other-stuff/dkp-toolchain-vars-1.0.0-2-any.pkg.tar.xz" + useradd nxdt-build + chmod 777 -R $GITHUB_WORKSPACE + + - name: Export variables. + run: | + export COMMIT="$(git rev-parse --short HEAD)" ; echo commit="$(git rev-parse --short HEAD)" >> $GITHUB_ENV + + - name: Building libusbhsfs - liblwext4... + run: | + cd $GITHUB_WORKSPACE/libs/libusbhsfs/liblwext4 + sudo -u nxdt-build -n COMMIT="$(git rev-parse --short HEAD)" DEVKITPRO=/opt/devkitpro DEVKITARM=/opt/devkitpro/devkitARM DEVKITPPC=/opt/devkitpro/devkitPPC dkp-makepkg + sudo dkp-pacman -U switch-lwext4*.tar.xz --noconfirm + + - name: Building libusbhsfs - libntfs-3g... + run: | + cd $GITHUB_WORKSPACE/libs/libusbhsfs/libntfs-3g + sudo -u nxdt-build -n COMMIT="$(git rev-parse --short HEAD)" DEVKITPRO=/opt/devkitpro DEVKITARM=/opt/devkitpro/devkitARM DEVKITPPC=/opt/devkitpro/devkitPPC dkp-makepkg + sudo dkp-pacman -U switch-libntfs-3g*.tar.xz --noconfirm + + - name: Building nxdumptool... + run: | + cd $GITHUB_WORKSPACE + ./build.sh + + - uses: actions/upload-artifact@v2.3.1 + with: + name: nxdumptool rewrite (NRO) - ${{ env.commit }}.7z + path: nxdumptool-rewrite_poc_${{ env.commit }}.7z + if-no-files-found: error + + - uses: actions/upload-artifact@v2.3.1 + with: + name: nxdumptool rewrite - (Debug ELF) - ${{ env.commit }}.7z + path: nxdumptool-rewrite_poc_${{ env.commit }}-Debug_ELFs.7z + if-no-files-found: error diff --git a/build.sh b/build.sh index 2e0db14..e03b840 100644 --- a/build.sh +++ b/build.sh @@ -48,5 +48,3 @@ cd ../.. rm -f ./source/main.c rm -rf ./code_templates/tmp mv ./main.cpp ./source/main.cpp - -read -p "Press any key to finish ..."