From 7a09759fe3eefe057e9fb6fd17fcd50c683f614c Mon Sep 17 00:00:00 2001 From: omdxp Date: Sat, 20 Apr 2024 22:53:07 +0200 Subject: [PATCH 1/4] setup kuliya package --- d/.gitignore | 17 +++++++++++++++++ d/dub.json | 4 ++++ d/source/kuliya/kuliya.d | 6 ++++++ d/source/kuliya/package.d | 3 +++ dub.json | 10 ++++++++++ 5 files changed, 40 insertions(+) create mode 100644 d/.gitignore create mode 100644 d/dub.json create mode 100644 d/source/kuliya/kuliya.d create mode 100644 d/source/kuliya/package.d create mode 100644 dub.json diff --git a/d/.gitignore b/d/.gitignore new file mode 100644 index 0000000..901d17c --- /dev/null +++ b/d/.gitignore @@ -0,0 +1,17 @@ +.dub +docs.json +__dummy.html +docs/ +/kuliya +kuliya.so +kuliya.dylib +kuliya.dll +kuliya.a +kuliya.lib +kuliya-test-* +*.exe +*.pdb +*.o +*.obj +*.lst +d-test-library diff --git a/d/dub.json b/d/dub.json new file mode 100644 index 0000000..a7bb226 --- /dev/null +++ b/d/dub.json @@ -0,0 +1,4 @@ +{ + "name": "d", + "targetType": "library" +} diff --git a/d/source/kuliya/kuliya.d b/d/source/kuliya/kuliya.d new file mode 100644 index 0000000..49f70f5 --- /dev/null +++ b/d/source/kuliya/kuliya.d @@ -0,0 +1,6 @@ +module kuliya.kuliya; + +unittest +{ + assert(1 == 1); +} diff --git a/d/source/kuliya/package.d b/d/source/kuliya/package.d new file mode 100644 index 0000000..777b20e --- /dev/null +++ b/d/source/kuliya/package.d @@ -0,0 +1,3 @@ +module kuliya; + +public import kuliya.kuliya; diff --git a/dub.json b/dub.json new file mode 100644 index 0000000..d35ac37 --- /dev/null +++ b/dub.json @@ -0,0 +1,10 @@ +{ + "authors": ["Omar Belghaouti"], + "copyright": "Copyright © 2024, dzCode.io", + "description": "Algeria's college hierarchy dataset as a D package.", + "license": "MIT", + "name": "kuliya", + "sourcePaths": ["d/source"], + "targetType": "library", + "subPackages": ["d"] +} From e0703adeda9e4f10857a406105f8fa6c015a031a Mon Sep 17 00:00:00 2001 From: omdxp Date: Sat, 20 Apr 2024 22:56:10 +0200 Subject: [PATCH 2/4] setup d checks action --- .github/workflows/d-checks.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/d-checks.yml diff --git a/.github/workflows/d-checks.yml b/.github/workflows/d-checks.yml new file mode 100644 index 0000000..aaa56a5 --- /dev/null +++ b/.github/workflows/d-checks.yml @@ -0,0 +1,21 @@ +name: D Checks + +on: + pull_request: + paths: + - ".github/workflows/d-checks.yml" + - "d/**" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dlang-community/setup-dlang@4c99aa991ce7d19dd3064de0a4f2f6b2f152e2d7 + + - name: Build & Test + run: | + cd d + dub build --compiler=$DC + dub test --compiler=$DC From 7628f33074f83570052426ace85c760d662a3f97 Mon Sep 17 00:00:00 2001 From: omdxp Date: Sat, 20 Apr 2024 23:14:57 +0200 Subject: [PATCH 3/4] add d readme --- README.md | 1 + d/.gitignore | 13 ++++++------- d/README.md | 26 ++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 d/README.md diff --git a/README.md b/README.md index 2fc8617..3468cee 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ You can find more about each language by clicking on the language name | [C#](./csharp) | n/a | n/a | n/a | n/a | | [Rust](./rust) | WIP | WIP | WIP | n/a | | [C](./c) | ![](https://img.shields.io/conan/v/kuliya) | ![](https://github.com/dzcode-io/kuliya/actions/workflows/c-checks.yml/badge.svg) | WIP | n/a | +| [D](./d) | WIP | WIP | WIP | n/a | ## Contributing diff --git a/d/.gitignore b/d/.gitignore index 901d17c..0158b86 100644 --- a/d/.gitignore +++ b/d/.gitignore @@ -3,15 +3,14 @@ docs.json __dummy.html docs/ /kuliya -kuliya.so -kuliya.dylib -kuliya.dll -kuliya.a -kuliya.lib -kuliya-test-* +*.so +*.dylib +*.dll +*.a +*.lib +d-test-* *.exe *.pdb *.o *.obj *.lst -d-test-library diff --git a/d/README.md b/d/README.md new file mode 100644 index 0000000..bb4782f --- /dev/null +++ b/d/README.md @@ -0,0 +1,26 @@ +# kuliya for D + +Algeria's college hierarchy dataset as a D package + +# Prerequisites +- One of these compilers: + - [DMD](https://dlang.org/download.html#dmd) official compiler (works fine with dub) + - [GDC](https://gdcproject.org/downloads) GCC based compiler + - [LDC](https://github.com/ldc-developers/ldc#installation) LLVM based compiler +- [DUB](https://dub.pm/getting-started/install/) package manager + - Note: you might need install the x86_64 arch for Apple silicon machines: + ```sh + arch -x86_64 /usr/local/bin/brew install dub + ``` +- Any IDE out there, preferably [VSCode](https://code.visualstudio.com/download) with [code-d](https://marketplace.visualstudio.com/items?itemName=webfreak.code-d) extension + +# Get Started + +- Run test: +```sh +cd d && dub test +``` + +# Contribute + +Feel free to ask for help in [#kuliya](https://dzcode.slack.com/archives/C01C0155CKC) group chat From 586e4154821eb94cf999ae61c10287a205955bcd Mon Sep 17 00:00:00 2001 From: omdxp Date: Sat, 20 Apr 2024 23:20:19 +0200 Subject: [PATCH 4/4] add d label to labeler --- .github/labeler.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 10765ee..a8383ad 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -33,3 +33,7 @@ rust: c: - changed-files: - any-glob-to-any-file: "c/**" + +d: + - changed-files: + - any-glob-to-any-file: "d/**"