Skip to content

Commit 7c6ead7

Browse files
committed
Initial Commit
0 parents  commit 7c6ead7

44 files changed

Lines changed: 10073 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Bug Report
2+
description: Create a report to help us improve Zix
3+
title: "[Bug]: "
4+
labels: ["bug", "triage"]
5+
assignees:
6+
- muhammad-fiaz
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Bug Description
16+
description: A clear and concise description of what the bug is.
17+
placeholder: I am experiencing an issue where...
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: reproduction
22+
attributes:
23+
label: Reproduction Steps
24+
description: Steps to reproduce the behavior.
25+
placeholder: |
26+
1. Initialize app with `...`
27+
2. Run `...`
28+
3. Send request to `...`
29+
4. See error
30+
validations:
31+
required: true
32+
- type: textarea
33+
id: expected
34+
attributes:
35+
label: Expected Behavior
36+
description: A clear and concise description of what you expected to happen.
37+
validations:
38+
required: true
39+
- type: input
40+
id: version
41+
attributes:
42+
label: Zix Version
43+
description: What version of Zix are you using?
44+
placeholder: 0.0.1
45+
validations:
46+
required: true
47+
- type: input
48+
id: zig_version
49+
attributes:
50+
label: Zig Version
51+
description: What version of Zig are you using?
52+
placeholder: 0.13.0
53+
validations:
54+
required: true
55+
- type: dropdown
56+
id: os
57+
attributes:
58+
label: Operating System
59+
options:
60+
- Windows
61+
- Linux
62+
- macOS
63+
- Other
64+
validations:
65+
required: true
66+
- type: textarea
67+
id: logs
68+
attributes:
69+
label: Logs
70+
description: Please describe any relevant log output.
71+
render: shell

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Discussions
4+
url: https://github.com/muhammad-fiaz/zix/discussions
5+
about: Please ask and answer questions here.
6+
- name: Discord
7+
url: https://discord.gg/example
8+
about: Chat with the community.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Documentation Issue
2+
description: Report errors or missing information in documentation
3+
title: "[Docs]: "
4+
labels: ["documentation", "triage"]
5+
body:
6+
- type: textarea
7+
id: description
8+
attributes:
9+
label: Description
10+
description: What is wrong or missing in the documentation?
11+
validations:
12+
required: true
13+
- type: input
14+
id: url
15+
attributes:
16+
label: URL
17+
description: Link to the page with the issue
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Feature Request
2+
description: Suggest an idea for this project
3+
title: "[Feature]: "
4+
labels: ["enhancement", "triage"]
5+
body:
6+
- type: textarea
7+
id: pitch
8+
attributes:
9+
label: Pitch
10+
description: A clear and concise description of what the problem is and your proposed solution.
11+
validations:
12+
required: true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Help Wanted
2+
description: Ask a question or request help
3+
title: "[Help]: "
4+
labels: ["question", "triage"]
5+
body:
6+
- type: textarea
7+
id: question
8+
attributes:
9+
label: Question
10+
description: What do you need help with?
11+
validations:
12+
required: true

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Description
2+
3+
Please include a summary of the change and which issue is fixed.
4+
5+
## Type of change
6+
7+
- [ ] Bug fix
8+
- [ ] New feature
9+
- [ ] Breaking change
10+
- [ ] Documentation update
11+
12+
## Checklist
13+
14+
- [ ] My code follows the style guidelines of this project
15+
- [ ] I have performed a self-review of my own code
16+
- [ ] I have commented my code, particularly in hard-to-understand areas
17+
- [ ] I have made corresponding changes to the documentation
18+
- [ ] My changes generate no new warnings
19+
- [ ] I have added tests that prove my fix is effective or that my feature works
20+
- [ ] New and existing unit tests pass locally with my changes

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ci-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Zig
23+
uses: mlugg/setup-zig@v2
24+
with:
25+
version: 0.15.2
26+
27+
- name: Run Zig tests
28+
run: zig build test --summary all
29+
30+
- name: Build library (Debug)
31+
run: zig build -Doptimize=Debug
32+
33+
- name: Build library (ReleaseFast)
34+
run: zig build -Doptimize=ReleaseFast
35+
36+
37+
- name: Zig format check
38+
run: zig fmt --check src/ examples/
39+
40+
examples-run:
41+
name: Run Examples Matrix
42+
needs: build
43+
runs-on: ${{ matrix.os }}
44+
strategy:
45+
matrix:
46+
include:
47+
- os: ubuntu-latest
48+
target: x86_64-linux
49+
- os: macos-latest
50+
target: x86_64-macos
51+
- os: windows-latest
52+
target: x86_64-windows
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v5
56+
with:
57+
fetch-depth: 0
58+
59+
- name: Setup Zig
60+
uses: mlugg/setup-zig@v2
61+
with:
62+
version: 0.15.2
63+
64+
# Note: We build but caution against running servers indefinitely in CI without timeout or termination logic.
65+
# using run-all-examples step which we assume just builds or runs transient tasks.
66+
- name: Run examples
67+
run: zig build run-all-examples -Dtarget=${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Release
2+
permissions:
3+
contents: write
4+
5+
on:
6+
release:
7+
types: [published]
8+
9+
jobs:
10+
test:
11+
name: Test on ${{ matrix.os }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest, windows-latest, macos-latest]
16+
steps:
17+
- uses: actions/checkout@v5
18+
- uses: mlugg/setup-zig@v2
19+
with:
20+
version: 0.15.2
21+
- name: Run Tests
22+
run: zig build test
23+
24+
25+
build-library:
26+
name: Build Library (${{ matrix.target }})
27+
needs: test
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
target:
32+
- x86_64-windows
33+
- x86-windows
34+
- x86_64-linux
35+
- aarch64-linux
36+
- x86_64-macos
37+
- aarch64-macos
38+
steps:
39+
- uses: actions/checkout@v5
40+
- uses: mlugg/setup-zig@v2
41+
with:
42+
version: 0.15.2
43+
44+
- name: Build Library
45+
run: zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.target }}
46+
47+
- name: Prepare Release Artifacts
48+
run: |
49+
mkdir -p release
50+
touch release/placeholder-${{ matrix.target }}.txt
51+
52+
- name: Upload Release Artifacts
53+
run: |
54+
gh release upload "${{ github.event.release.tag_name }}" release/* --clobber || true
55+
env:
56+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
57+
58+
update-release:
59+
name: Update Release Description
60+
needs: [test]
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v5
64+
65+
- name: Get Release URL
66+
id: get_url
67+
run: echo "url=https://github.com/${{ github.repository }}/archive/refs/tags/${{ github.event.release.tag_name }}.tar.gz" >> $GITHUB_OUTPUT
68+
69+
- uses: mlugg/setup-zig@v2
70+
with:
71+
version: 0.15.2
72+
73+
- name: Calculate Hash
74+
id: calc_hash
75+
run: |
76+
HASH=$(zig fetch ${{ steps.get_url.outputs.url }})
77+
echo "hash=$HASH" >> $GITHUB_OUTPUT
78+
79+
- name: Update Release Body
80+
uses: softprops/action-gh-release@v1
81+
with:
82+
body: |
83+
${{ github.event.release.body }}
84+
85+
## 📃 Documentation
86+
https://muhammad-fiaz.github.io/zix/
87+
88+
## 📦 Installation
89+
```bash
90+
zig fetch --save https://github.com/${{ github.repository }}/archive/refs/tags/${{ github.event.release.tag_name }}.tar.gz
91+
```
92+
93+
Hash:
94+
```zig
95+
.hash = "${{ steps.calc_hash.outputs.hash }}"
96+
```
97+
98+

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Zig
2+
.zig-cache/
3+
zig-out/
4+
5+
# Node/VitePress
6+
docs/node_modules/
7+
docs/.vitepress/dist/
8+
docs/.vitepress/cache/
9+
10+
# OS
11+
.DS_Store
12+
Thumbs.db
13+
14+
# Logs
15+
*.log

0 commit comments

Comments
 (0)