mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-26 04:02:11 +00:00
Minor workflow simplifications (#144)
* Simplify workflow * Update libusbhsfs submodule
This commit is contained in:
parent
e6ffe64baf
commit
ec6deede37
2 changed files with 17 additions and 33 deletions
48
.github/workflows/rewrite.yml
vendored
48
.github/workflows/rewrite.yml
vendored
|
@ -16,66 +16,50 @@ on:
|
||||||
# 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
|
||||||
# Skip build with [ci skip] in commit
|
|
||||||
if: "! contains(github.event.head_commit.message, '[ci skip]')"
|
|
||||||
container:
|
container:
|
||||||
image: devkitpro/devkita64
|
image: devkitpro/devkita64
|
||||||
steps:
|
steps:
|
||||||
# Workaround: avoid requesting data from devkitPro servers because they ban most CI/CD scripts.
|
# Workaround: avoid requesting data from devkitPro servers because they ban most CI/CD scripts.
|
||||||
|
# TODO: Remove the last dkp-pacman invocation if https://github.com/devkitPro/docker/pull/28 gets accepted
|
||||||
- name: Update packages
|
- name: Update packages
|
||||||
run: |
|
run: |
|
||||||
sudo -n apt-get update
|
sudo -n apt-get update
|
||||||
sudo -n apt-get upgrade -y patch autoconf automake tar bzip2 diffutils pkgconf fakeroot git file zstd
|
sudo -n apt-get upgrade -y patch autoconf automake tar bzip2 diffutils pkgconf fakeroot git file zstd
|
||||||
sudo -n dkp-pacman --noconfirm -U \
|
sudo -n dkp-pacman --noconfirm -U \
|
||||||
"https://wii.leseratte10.de/devkitPro/other-stuff/dkp-toolchain-vars-1.0.3-2-any.pkg.tar.zst" \
|
"https://wii.leseratte10.de/devkitPro/other-stuff/dkp-toolchain-vars-1.0.3-2-any.pkg.tar.zst"
|
||||||
"https://wii.leseratte10.de/devkitPro/cmake/switch-cmake-1.5.0-1-any.pkg.tar.xz"
|
|
||||||
# "https://wii.leseratte10.de/devkitPro/switch/switch-libjson-c-0.16-1-any.pkg.tar.xz" \
|
|
||||||
# "https://wii.leseratte10.de/devkitPro/switch/switch-libpng-1.6.39-2-any.pkg.tar.zst" \
|
|
||||||
# "https://wii.leseratte10.de/devkitPro/switch/switch-zlib-1.2.13-1-any.pkg.tar.xz"
|
|
||||||
|
|
||||||
- name: Silence all git safe directory warnings
|
- uses: actions/checkout@v4
|
||||||
run: git config --system --add safe.directory '*'
|
with:
|
||||||
|
path: nxdumptool
|
||||||
# Workaround: manually use git instead of actions/checkout to parse repository properties (e.g. branch name, commit hash, etc.) on our own.
|
submodules: recursive
|
||||||
- name: Checkout latest nxdumptool-rewrite commit
|
|
||||||
run: |
|
|
||||||
cd "$GITHUB_WORKSPACE"
|
|
||||||
git clone --branch rewrite --recurse-submodules https://github.com/DarkMatterCore/nxdumptool.git
|
|
||||||
|
|
||||||
- name: Checkout latest libnx commit
|
- name: Checkout latest libnx commit
|
||||||
run: |
|
uses: actions/checkout@v4
|
||||||
cd "$GITHUB_WORKSPACE"
|
with:
|
||||||
git clone --recurse-submodules https://github.com/switchbrew/libnx.git
|
repository: switchbrew/libnx
|
||||||
|
path: libnx
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
- name: Set workspace permissions
|
- name: Set workspace permissions
|
||||||
run: chmod 777 -R "$GITHUB_WORKSPACE"
|
run: chmod 777 -R "$GITHUB_WORKSPACE"
|
||||||
|
|
||||||
- name: Build and install libnx
|
- name: Build and install libnx
|
||||||
|
working-directory: libnx
|
||||||
run: |
|
run: |
|
||||||
cd "$GITHUB_WORKSPACE/libnx"
|
|
||||||
make install -j$(nproc)
|
make install -j$(nproc)
|
||||||
|
|
||||||
# Workaround: dkp-makepkg's "-i" option fails because it tries to run pacman as root on its own using sudo, and a password must be interactively provided.
|
|
||||||
# We can't just provide root access to dkp-makepkg because it refuses to work at all if we do so.
|
|
||||||
# As much as I'd like to run "make fs-libs" and call it a day, it's just not possible.
|
|
||||||
- name: Build libusbhsfs dependencies
|
- name: Build libusbhsfs dependencies
|
||||||
|
working-directory: nxdumptool/libs/libusbhsfs
|
||||||
run: |
|
run: |
|
||||||
cd "$GITHUB_WORKSPACE/nxdumptool/libs/libusbhsfs"
|
make fs-libs
|
||||||
cd libntfs-3g; su -s /bin/bash nobody -c "dkp-makepkg -c -C -f" > /dev/null; sudo -n dkp-pacman -U --needed --noconfirm *.pkg.tar.* > /dev/null; cd ..
|
|
||||||
cd liblwext4; su -s /bin/bash nobody -c "dkp-makepkg -c -C -f" > /dev/null; sudo -n dkp-pacman -U --needed --noconfirm *.pkg.tar.* > /dev/null; cd ..
|
|
||||||
|
|
||||||
- name: Build nxdumptool-rewrite PoC binary
|
- name: Build nxdumptool-rewrite PoC binary
|
||||||
|
working-directory: nxdumptool
|
||||||
run: |
|
run: |
|
||||||
cd "$GITHUB_WORKSPACE/nxdumptool"
|
echo "nxdt_commit=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
||||||
echo "nxdt_commit=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
./build.sh
|
./build.sh
|
||||||
|
|
||||||
#- name: Build nxdumptool-rewrite GUI binary
|
#- name: Build nxdumptool-rewrite GUI binary
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit a11eb0d7083fba72aade29d3f9b35070d5510c3d
|
Subproject commit 2a6092059b6271a89aa31e40a16f090d212b6b92
|
Loading…
Reference in a new issue