1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-26 12:12:02 +00:00

Update libusbhsfs + workflow

This commit is contained in:
Pablo Curiel 2023-03-20 16:58:00 +01:00
parent 7e399d91db
commit 1bfbed08b3
2 changed files with 52 additions and 31 deletions

View file

@ -1,57 +1,78 @@
name: Build nxdumptool 'rewrite' tests name: Build nxdumptool 'rewrite' PoC binaries
on: on:
push: push:
branches: [ rewrite ] branches: [ rewrite ]
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab.
workflow_dispatch: workflow_dispatch:
env:
DEVKITPRO: "/opt/devkitpro"
DEVKITARM: "/opt/devkitpro/devkitARM"
DEVKITPPC: "/opt/devkitpro/devkitPPC"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: devkitpro/devkita64 image: devkitpro/devkita64
steps: steps:
- uses: actions/checkout@v2 - name: Update packages
run: |
sudo -n apt-get update
sudo -n apt-get upgrade -y patch autoconf automake tar bzip2 diffutils pkgconf fakeroot p7zip-full git
sudo -n dkp-pacman -Syu --needed --noconfirm
- name: Checkout latest nxdumptool-rewrite commit
uses: actions/checkout@v3
with: with:
submodules: recursive 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. # Workaround: manually use git instead of actions/checkout to overcome a 'missing token' error with act.
run: | #- name: Checkout latest libnx commit
export COMMIT="$(git rev-parse --short HEAD)" ; echo commit="$(git rev-parse --short HEAD)" >> $GITHUB_ENV # run: |
# cd "$GITHUB_WORKSPACE/libs"
# git clone --recurse-submodules https://github.com/switchbrew/libnx.git
- name: Building libusbhsfs - liblwext4... - name: Checkout latest libnx commit
run: | uses: actions/checkout@v3
cd $GITHUB_WORKSPACE/libs/libusbhsfs/liblwext4 with:
sudo -u nxdt-build -n COMMIT="$(git rev-parse --short HEAD)" DEVKITPRO=/opt/devkitpro DEVKITARM=/opt/devkitpro/devkitARM DEVKITPPC=/opt/devkitpro/devkitPPC dkp-makepkg repository: switchbrew/libnx
sudo dkp-pacman -U switch-lwext4*.tar.xz --noconfirm submodules: recursive
path: libs/libnx
- name: Building libusbhsfs - libntfs-3g... - name: Set workspace permissions
run: | run: chmod 777 -R "$GITHUB_WORKSPACE"
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... - name: Build and install libnx
run: | run: |
cd $GITHUB_WORKSPACE cd "$GITHUB_WORKSPACE/libs/libnx"
sudo --preserve-env=DEVKITPRO,DEVKITARM,DEVKITPPC -n make install -j$(nproc)
# Workaround for Docker image bug (see https://github.com/actions/checkout/issues/1169).
- name: "Workaround: add git safe directory (libusbhsfs)"
run: git config --system --add safe.directory "$GITHUB_WORKSPACE/libs/libusbhsfs"
- name: Build libusbhsfs dependencies
run: |
cd "$GITHUB_WORKSPACE/libs/libusbhsfs"
sudo --preserve-env=DEVKITPRO,DEVKITARM,DEVKITPPC -n make fs-libs -j$(nproc)
- name: Build nxdumptool
run: |
cd "$GITHUB_WORKSPACE"
export COMMIT=$(git rev-parse --short HEAD)
./build.sh ./build.sh
- uses: actions/upload-artifact@v2.3.1 - uses: actions/upload-artifact@v3
with: with:
name: nxdumptool rewrite (NRO) - ${{ env.commit }}.7z name: nxdumptool rewrite (NRO) - ${{ env.COMMIT }}.7z
path: nxdumptool-rewrite_poc_${{ env.commit }}.7z path: nxdumptool-rewrite_poc_${{ env.COMMIT }}.7z
if-no-files-found: error if-no-files-found: error
- uses: actions/upload-artifact@v2.3.1 - uses: actions/upload-artifact@v3
with: with:
name: nxdumptool rewrite - (Debug ELF) - ${{ env.commit }}.7z name: nxdumptool rewrite (Debug ELF) - ${{ env.COMMIT }}.7z
path: nxdumptool-rewrite_poc_${{ env.commit }}-Debug_ELFs.7z path: nxdumptool-rewrite_poc_${{ env.COMMIT }}-Debug_ELFs.7z
if-no-files-found: error if-no-files-found: error

@ -1 +1 @@
Subproject commit 8c2e51703d3e4f987b8857052b4da4bde12a6333 Subproject commit d6a4f38784e1ddf5d1d8fa4805f7789050b60f93