diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 999cf60..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: karnkaul - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Environment (please complete the following information):** - - OS: [e.g. Manjaro] - - GPU: [e.g. Nvidia GTX 2070] - - Version [e.g. 0.2.1] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 524940e..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[FR]" -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51f7449..d09bd60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,8 +99,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v4 - - name: init - run: choco install ninja - name: configure run: cmake -S . --preset=ninja-clang -B clang - name: build debug diff --git a/lib/docs/building.md b/lib/docs/build.md similarity index 97% rename from lib/docs/building.md rename to lib/docs/build.md index 5d48be2..a32203b 100644 --- a/lib/docs/building.md +++ b/lib/docs/build.md @@ -1,4 +1,4 @@ -## Building +## Build ### Requirements diff --git a/tests/test_files.cpp b/tests/test_files.cpp index d6b2338..bb777b9 100644 --- a/tests/test_files.cpp +++ b/tests/test_files.cpp @@ -7,10 +7,19 @@ namespace { namespace fs = std::filesystem; -auto get_paths() { +auto locate_jsons_dir() -> fs::path { + auto err = std::error_code{}; + for (auto dir = fs::current_path(); !dir.empty() && dir.has_parent_path(); dir = dir.parent_path()) { + auto const ret = dir / "tests/jsons"; + if (fs::is_directory(ret, err)) { return ret; } + } + return {}; +} + +auto get_paths(fs::path const& dir) -> std::vector { auto ret = std::vector{}; auto err = std::error_code{}; - for (auto const& it : fs::directory_iterator{"tests/jsons", err}) { + for (auto const& it : fs::directory_iterator{dir, err}) { if (!it.is_regular_file(err)) { continue; } auto const& path = it.path(); if (path.extension().generic_string() != ".json") { continue; } @@ -20,8 +29,17 @@ auto get_paths() { } TEST(test_files) { - auto const paths = get_paths(); - EXPECT(!paths.empty()); + auto const jsons_dir = locate_jsons_dir(); + if (jsons_dir.empty()) { + std::println("skipping test: could not locate 'tests/jsons' directory"); + return; + } + + auto const paths = get_paths(jsons_dir); + if (paths.empty()) { + std::println("skipping test: no JSON files found in '{}'", jsons_dir.generic_string()); + return; + } for (auto const& path : paths) { std::println("-- {}", path.filename().generic_string()); diff --git a/version.cmake b/version.cmake index 2f3448a..0bcad20 100644 --- a/version.cmake +++ b/version.cmake @@ -1 +1 @@ -set(djson_version "3.1.1") +set(djson_version "3.1.2")