1
0
Fork 0
mirror of https://github.com/DarkMatterCore/nxdumptool.git synced 2024-11-10 04:31:44 +00:00
nxdumptool/.github/workflows/rewrite.yml

71 lines
2.3 KiB
YAML
Raw Normal View History

2023-03-20 15:58:00 +00:00
name: Build nxdumptool 'rewrite' PoC binaries
on:
push:
branches: [ rewrite ]
2023-03-20 15:58:00 +00:00
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
2023-03-20 15:58:00 +00:00
env:
DEVKITPRO: "/opt/devkitpro"
DEVKITARM: "/opt/devkitpro/devkitARM"
DEVKITPPC: "/opt/devkitpro/devkitPPC"
jobs:
build:
runs-on: ubuntu-latest
container:
image: devkitpro/devkita64
steps:
2023-03-20 15:58:00 +00:00
- 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
2023-03-20 16:48:21 +00:00
- name: Silence all git safe directory warnings
run: git config --global --add safe.directory '*'
2023-03-20 16:48:21 +00:00
# Workaround: manually use git instead of actions/checkout to parse repository properties (e.g. branch name, commit hash, etc.) on our own.
- name: Checkout latest nxdumptool-rewrite commit
run: |
cd "$GITHUB_WORKSPACE"
git clone --branch rewrite --recurse-submodules https://github.com/DarkMatterCore/nxdumptool.git
2023-03-20 15:58:00 +00:00
- name: Checkout latest libnx commit
2023-03-20 16:48:21 +00:00
run: |
cd "$GITHUB_WORKSPACE"
git clone --recurse-submodules https://github.com/switchbrew/libnx.git
2023-03-20 15:58:00 +00:00
- name: Set workspace permissions
run: chmod 777 -R "$GITHUB_WORKSPACE"
- name: Build and install libnx
run: |
2023-03-20 16:48:21 +00:00
cd "$GITHUB_WORKSPACE/libnx"
2023-03-20 15:58:00 +00:00
sudo --preserve-env=DEVKITPRO,DEVKITARM,DEVKITPPC -n make install -j$(nproc)
- name: Build libusbhsfs dependencies
run: |
2023-03-20 16:48:21 +00:00
cd "$GITHUB_WORKSPACE/nxdumptool/libs/libusbhsfs"
2023-03-20 15:58:00 +00:00
sudo --preserve-env=DEVKITPRO,DEVKITARM,DEVKITPPC -n make fs-libs -j$(nproc)
2023-03-20 15:58:00 +00:00
- name: Build nxdumptool
run: |
2023-03-20 16:48:21 +00:00
cd "$GITHUB_WORKSPACE/nxdumptool"
2023-03-20 15:58:00 +00:00
export COMMIT=$(git rev-parse --short HEAD)
./build.sh
2023-03-20 15:58:00 +00:00
- uses: actions/upload-artifact@v3
with:
2023-03-20 16:48:21 +00:00
name: nxdumptool-rewrite_poc_${{ env.COMMIT }}.7z
2023-03-20 15:58:00 +00:00
path: nxdumptool-rewrite_poc_${{ env.COMMIT }}.7z
if-no-files-found: error
2023-03-20 15:58:00 +00:00
- uses: actions/upload-artifact@v3
with:
2023-03-20 16:48:21 +00:00
name: nxdumptool-rewrite_poc_${{ env.COMMIT }}-Debug_ELFs.7z
2023-03-20 15:58:00 +00:00
path: nxdumptool-rewrite_poc_${{ env.COMMIT }}-Debug_ELFs.7z
if-no-files-found: error