Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: pr
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check:
runs-on: ubuntu-latest
container:
image: ghcr.io/open-ead/ubuntu-builder
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
submodules: false
- uses: actions/checkout@v7
with:
persist-credentials: false
submodules: false
repository: open-ead/nnsdk
path: lib/nnsdk
- run: task pr
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ endfunction()
function(find_nnsdk)
if(NOT TARGET nnSdk)
if(DEFINED NNSDK_DIR)
message(STATUS "Found NintendoSDK: ${NNSDK_DIR}")
add_subdirectory(${NNSDK_DIR} ${NNSDK_DIR}/build)
if(IS_DIRECTORY "${NNSDK_DIR}")
message(STATUS "Found NintendoSDK: ${NNSDK_DIR}")
add_subdirectory(${NNSDK_DIR} ${NNSDK_DIR}/build)
else()
message(FATAL_ERROR "NNSDK_DIR is provided, but NintendoSDK is not found at: ${NNSDK_DIR}")
endif()
else()
message(FATAL_ERROR "NintendoSDK cannot be found. Ensure your project adds open-ead/nnsdk as a dependency (submodule), and your CMakeLists.txt contains `add_subdirectory(path/to/nnsdk)`")
endif()
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ Usage of the materials here outside of matching decompilation is not supported.
# Credits
- [Shadow](https://github.com/shadowninja108/) - For [Skyline](https://github.com/shadowninja108/Skyline), which was the primary inspiration and use case for this repo.
- [Shibbo](https://github.com/shibbo) - For [OdysseyReversed](https://github.com/shibbo/OdysseyReversed/), which most of these headers came from.

# Development
For running commands please install [task](https://taskfile.dev), CMake, Ninja and Clang/LLVM.
The Clang/LLVM toolchain version should match the [image used in the PR](https://github.com/open-ead/containers/blob/main/ubuntu-builder/Dockerfile)

Before you begin, run `task clone-deps` to clone dependencies.

Run `task pr` to run the same checks that the PR runs. Run `task fix` to fix the clang-format issues.


10 changes: 7 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ version: '3'
vars:
# Modules to check with clang-format/clang-tidy;
MODULES: atk,font,g3d,ui2d,vfx
_SOURCES1: ',{{.MODULES}}'
SOURCES: '{{._SOURCES1 | replace "," " lib/"}}'
_MODULES1: ',{{.MODULES}}'
_MODULES2: '^{{.MODULES}}$'
SOURCES: '{{._MODULES1 | replace "," " lib/"}}'
CLANG_TIDY_LIBS: '{{.MODULES | replace " " "" | replace "," "|" }}'

tasks:
clone-deps:
desc: Clone dependencies for development
cmds:
- rm -rf lib/nnsdk
- git clone https://github.com/open-ead/nnsdk lib/nnsdk

pr:
Expand All @@ -36,9 +38,11 @@ tasks:
-DNNSDK_DIR=$(pwd)/lib/nnsdk
build:
desc: Check the project builds
vars:
VERIFY_TARGETS: '{{._MODULES2 | replace " " "" | replace "," "$ ^" | replace "^" "--target nn_" | replace "$" "_verify_interface_header_sets"}}'
cmds:
- cmake --build build
- cmake --build build --target all_verify_header_sets
- cmake --build build {{.VERIFY_TARGETS}}

check:
desc: Run clang-format and clang-tidy checks
Expand Down
Loading