Skip to content

Commit

Permalink
Merge pull request #100 from dzcode-io/95-setup-d-package
Browse files Browse the repository at this point in the history
  • Loading branch information
omdxp authored Apr 21, 2024
2 parents 6daf572 + 586e415 commit 5aba71d
Show file tree
Hide file tree
Showing 9 changed files with 91 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,7 @@ rust:
c:
- changed-files:
- any-glob-to-any-file: "c/**"

d:
- changed-files:
- any-glob-to-any-file: "d/**"
21 changes: 21 additions & 0 deletions .github/workflows/d-checks.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 16 additions & 0 deletions d/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.dub
docs.json
__dummy.html
docs/
/kuliya
*.so
*.dylib
*.dll
*.a
*.lib
d-test-*
*.exe
*.pdb
*.o
*.obj
*.lst
26 changes: 26 additions & 0 deletions d/README.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions d/dub.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "d",
"targetType": "library"
}
6 changes: 6 additions & 0 deletions d/source/kuliya/kuliya.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module kuliya.kuliya;

unittest
{
assert(1 == 1);
}
3 changes: 3 additions & 0 deletions d/source/kuliya/package.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module kuliya;

public import kuliya.kuliya;
10 changes: 10 additions & 0 deletions dub.json
Original file line number Diff line number Diff line change
@@ -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"]
}

0 comments on commit 5aba71d

Please sign in to comment.