Skip to content

Commit c7fb838

Browse files
committed
WIP
1 parent 2b650b1 commit c7fb838

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+10002
-46
lines changed

.editorconfig

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# Top-most EditorConfig file
4+
root = true
5+
6+
# Global settings (applicable to all files unless overridden)
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_style = space
11+
indent_size = 4
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
# Rust files
16+
[*.rs]
17+
max_line_length = 100
18+
19+
# Markdown files
20+
[*.md]
21+
max_line_length = 120
22+
trim_trailing_whitespace = false
23+
24+
# Bash scripts
25+
[*.sh]
26+
indent_size = 2
27+
28+
# YAML files
29+
[*.{yaml,yml}]
30+
indent_size = 2
31+
32+
# C & C++ files
33+
[*.{c,cpp,h,hpp}]
34+
indent_size = 2
35+
max_line_length = 100

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [ habedi ]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
1.
17+
18+
**Expected behavior**
19+
A clear and concise description of what you expected to happen.
20+
21+
**Logs**
22+
If applicable, add logs to help explain your problem.
23+
24+
**Additional context**
25+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discussions
4+
url: https://github.com/CogitatorTech/gaggle/discussions
5+
about: Please ask and answer general questions here
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Build Extension Binaries
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- '**.md'
9+
- 'docs/**'
10+
- '.github/**'
11+
push:
12+
tags:
13+
- 'v*'
14+
15+
permissions:
16+
contents: read
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
20+
cancel-in-progress: true
21+
22+
jobs:
23+
duckdb-next-stable-build:
24+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
25+
with:
26+
duckdb_version: main
27+
ci_tools_version: main
28+
extension_name: gaggle
29+
enable_rust: true
30+
exclude_archs: "windows_amd64_mingw;osx_amd64;wasm_mvp;wasm_eh;wasm_threads"
31+
32+
duckdb-stable-build:
33+
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@v1.4.3
34+
with:
35+
duckdb_version: v1.4.3
36+
ci_tools_version: v1.4.3
37+
extension_name: gaggle
38+
enable_rust: true
39+
exclude_archs: "windows_amd64_mingw;osx_amd64;wasm_mvp;wasm_eh;wasm_threads"
40+
41+
create-release-draft:
42+
name: Create Draft Release with Built Binaries
43+
needs:
44+
- duckdb-stable-build
45+
if: startsWith(github.ref, 'refs/tags/')
46+
runs-on: ubuntu-latest
47+
permissions:
48+
contents: write
49+
steps:
50+
- name: Download All Build Artifacts
51+
uses: actions/download-artifact@v4
52+
with:
53+
path: dist
54+
merge-multiple: true
55+
- name: List Artifacts
56+
run: |
57+
echo "Downloaded artifacts to: $(pwd)/dist"
58+
ls -la dist || true
59+
find dist -type f -maxdepth 2 -print || true
60+
- name: Create Draft Release and Upload Assets
61+
uses: softprops/action-gh-release@v2
62+
with:
63+
draft: true
64+
name: Gaggle ${{ github.ref_name }}
65+
tag_name: ${{ github.ref_name }}
66+
generate_release_notes: true
67+
files: |
68+
dist/**
69+
env:
70+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/lints.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Run Rust Linters
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- '**.md'
10+
- 'docs/**'
11+
- '.github/**'
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
rust-lints:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout Code
22+
uses: actions/checkout@v4
23+
with:
24+
submodules: recursive
25+
26+
- name: Set up Rust
27+
uses: actions-rust-lang/setup-rust-toolchain@v1
28+
29+
- name: Install Dependencies
30+
run: |
31+
sudo apt-get update && sudo apt-get upgrade -y
32+
sudo apt-get install -y gcc curl pkg-config libssl-dev make
33+
34+
- name: Run Linters
35+
run: make rust-lint

.github/workflows/tests.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Run Tests
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
paths-ignore:
9+
- '**.md'
10+
- 'docs/**'
11+
- '.github/**'
12+
push:
13+
branches:
14+
- main
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
rust-tests:
21+
name: Rust Tests and Code Coverage
22+
runs-on: ubuntu-latest
23+
env:
24+
CARGO_TERM_COLOR: always
25+
steps:
26+
- name: Checkout Code
27+
uses: actions/checkout@v4
28+
with:
29+
submodules: recursive
30+
31+
- name: Set up Rust
32+
uses: actions-rust-lang/setup-rust-toolchain@v1
33+
34+
- name: Cache Cargo
35+
uses: actions/cache@v4
36+
with:
37+
path: |
38+
~/.cargo/registry
39+
~/.cargo/git
40+
gaggle/target
41+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
42+
restore-keys: |
43+
${{ runner.os }}-cargo-
44+
45+
- name: Install System Dependencies
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y gcc curl pkg-config libssl-dev make liblzma-dev
49+
cargo install cargo-tarpaulin --locked || true
50+
51+
- name: Run Rust Tests
52+
run: |
53+
make rust-test
54+
55+
- name: Generate Coverage (using Tarpaulin)
56+
run: |
57+
make rust-coverage
58+
59+
- name: Upload Coverage Reports to Codecov
60+
uses: codecov/codecov-action@v5
61+
with:
62+
token: ${{ secrets.CODECOV_TOKEN }}
63+
continue-on-error: false
64+
65+
sqllogictest:
66+
name: Sqllogictest Tests
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout Code
70+
uses: actions/checkout@v4
71+
with:
72+
submodules: recursive
73+
74+
- name: Set up Rust
75+
uses: actions-rust-lang/setup-rust-toolchain@v1
76+
77+
- name: Install System Dependencies
78+
run: |
79+
sudo apt-get update
80+
sudo apt-get install -y gcc curl pkg-config libssl-dev make liblzma-dev
81+
82+
- name: Build Extension & Run SQL Tests
83+
run: |
84+
make release
85+
make test

.gitmodules

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[submodule "external/duckdb"]
2+
path = external/duckdb
3+
url = https://github.com/duckdb/duckdb
4+
branch = main
5+
[submodule "external/extension-ci-tools"]
6+
path = external/extension-ci-tools
7+
url = https://github.com/duckdb/extension-ci-tools
8+
branch = main

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
default_stages: [ pre-push ]
2+
fail_fast: false
3+
exclude: '(^external/)'
4+
5+
repos:
6+
- repo: https://github.com/pre-commit/pre-commit-hooks
7+
rev: v5.0.0
8+
hooks:
9+
- id: trailing-whitespace
10+
args: [ --markdown-linebreak-ext=md ]
11+
- id: end-of-file-fixer
12+
- id: mixed-line-ending
13+
- id: check-merge-conflict
14+
- id: check-added-large-files
15+
- id: detect-private-key
16+
- id: check-yaml
17+
- id: check-toml
18+
- id: check-json
19+
- id: check-docstring-first
20+
- id: pretty-format-json
21+
args: [ --autofix, --no-sort-keys ]
22+
23+
- repo: local
24+
hooks:
25+
- id: format
26+
name: Format Code
27+
entry: make rust-format
28+
language: system
29+
pass_filenames: false
30+
stages: [ pre-commit ]
31+
32+
- id: lint
33+
name: Check Code Style
34+
entry: make rust-lint
35+
language: system
36+
pass_filenames: false
37+
stages: [ pre-commit ]
38+
39+
- id: test
40+
name: Run Tests
41+
entry: make rust-test
42+
language: system
43+
pass_filenames: false

0 commit comments

Comments
 (0)