From c3da4b734dbca616903e2ab9432104844e19d2fd Mon Sep 17 00:00:00 2001 From: Pistonight Date: Tue, 22 Sep 2026 22:17:33 -0700 Subject: [PATCH 1/3] ci: enable workflow --- .github/workflows/pr.yml | 17 +++++++++++++++++ README.md | 10 ++++++++++ Taskfile.yml | 1 + 3 files changed, 28 insertions(+) create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000..9d45a47c --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,17 @@ +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 + - run: task pr diff --git a/README.md b/README.md index 23fdd86d..fd44ec71 100644 --- a/README.md +++ b/README.md @@ -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. + + diff --git a/Taskfile.yml b/Taskfile.yml index 4e65cb5c..e6cb12bb 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -13,6 +13,7 @@ tasks: clone-deps: desc: Clone dependencies for development cmds: + - rm -rf lib/nnsdk - git clone https://github.com/open-ead/nnsdk lib/nnsdk pr: From 52872620b99bff241b290d122183652ef2fad81e Mon Sep 17 00:00:00 2001 From: Pistonight Date: Tue, 22 Sep 2026 22:32:31 -0700 Subject: [PATCH 2/3] only verify ware headers --- .github/workflows/pr.yml | 6 ++++++ CMakeLists.txt | 8 ++++++-- Taskfile.yml | 9 ++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 9d45a47c..384aabc7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,4 +14,10 @@ jobs: with: persist-credentials: false submodules: false + - uses: actions/checkout@v7 + with: + persist-credentials: false + submodules: false + repo: open-ead/nnsdk + path: lib/nnsdk - run: task pr diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e255a47..235874da 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() diff --git a/Taskfile.yml b/Taskfile.yml index e6cb12bb..27e6ea2f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -5,8 +5,9 @@ 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: @@ -37,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 From a27bb481b1dc8dcfe450ef99067dceda5dadb6ea Mon Sep 17 00:00:00 2001 From: Pistonight Date: Tue, 22 Sep 2026 22:33:14 -0700 Subject: [PATCH 3/3] long word --- .github/workflows/pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 384aabc7..15b06f88 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -18,6 +18,6 @@ jobs: with: persist-credentials: false submodules: false - repo: open-ead/nnsdk + repository: open-ead/nnsdk path: lib/nnsdk - run: task pr