xqdb 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xqdb-0.1.1/.github/workflows/CI.yml +221 -0
- xqdb-0.1.1/.github/workflows/JS.yml +208 -0
- xqdb-0.1.1/.github/workflows/NPM.yml +360 -0
- xqdb-0.1.1/.github/workflows/Quality.yml +114 -0
- xqdb-0.1.1/.gitignore +23 -0
- xqdb-0.1.1/Cargo.lock +4220 -0
- xqdb-0.1.1/Cargo.toml +38 -0
- xqdb-0.1.1/LICENSE +28 -0
- xqdb-0.1.1/PKG-INFO +354 -0
- xqdb-0.1.1/README.md +116 -0
- xqdb-0.1.1/Taskfile.yml +177 -0
- xqdb-0.1.1/bindings/napi-xqdb/Cargo.toml +24 -0
- xqdb-0.1.1/bindings/napi-xqdb/build.rs +3 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/arrow.rs +84 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/dto.rs +1294 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/error.rs +114 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/lib.rs +9 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/utility.rs +189 -0
- xqdb-0.1.1/bindings/napi-xqdb/src/worker.rs +917 -0
- xqdb-0.1.1/crates/xqdb/Cargo.toml +46 -0
- xqdb-0.1.1/crates/xqdb/src/connector.rs +843 -0
- xqdb-0.1.1/crates/xqdb/src/errors.rs +71 -0
- xqdb-0.1.1/crates/xqdb/src/io.rs +556 -0
- xqdb-0.1.1/crates/xqdb/src/lib.rs +5 -0
- xqdb-0.1.1/crates/xqdb/src/serde6.rs +3671 -0
- xqdb-0.1.1/crates/xqdb/src/types.rs +753 -0
- xqdb-0.1.1/js-xqdb/.gitignore +7 -0
- xqdb-0.1.1/js-xqdb/LICENSE +28 -0
- xqdb-0.1.1/js-xqdb/README.md +221 -0
- xqdb-0.1.1/js-xqdb/benchmarks/compare-jkdb.mjs +685 -0
- xqdb-0.1.1/js-xqdb/benchmarks/results/windows-x64-node26-100k.json +8553 -0
- xqdb-0.1.1/js-xqdb/npm/darwin-arm64/LICENSE +28 -0
- xqdb-0.1.1/js-xqdb/npm/darwin-arm64/package.json +22 -0
- xqdb-0.1.1/js-xqdb/npm/linux-x64-gnu/LICENSE +28 -0
- xqdb-0.1.1/js-xqdb/npm/linux-x64-gnu/package.json +23 -0
- xqdb-0.1.1/js-xqdb/npm/win32-x64-msvc/LICENSE +28 -0
- xqdb-0.1.1/js-xqdb/npm/win32-x64-msvc/package.json +22 -0
- xqdb-0.1.1/js-xqdb/package-lock.json +3643 -0
- xqdb-0.1.1/js-xqdb/package.json +80 -0
- xqdb-0.1.1/js-xqdb/src/conversion.ts +309 -0
- xqdb-0.1.1/js-xqdb/src/errors.ts +54 -0
- xqdb-0.1.1/js-xqdb/src/helpers.ts +47 -0
- xqdb-0.1.1/js-xqdb/src/index.ts +15 -0
- xqdb-0.1.1/js-xqdb/src/native-contract.ts +58 -0
- xqdb-0.1.1/js-xqdb/src/native-loader.ts +45 -0
- xqdb-0.1.1/js-xqdb/src/q.ts +135 -0
- xqdb-0.1.1/js-xqdb/src/types.ts +276 -0
- xqdb-0.1.1/js-xqdb/test/conversion.test.ts +280 -0
- xqdb-0.1.1/js-xqdb/test/errors.test.ts +57 -0
- xqdb-0.1.1/js-xqdb/test/helpers.test.ts +61 -0
- xqdb-0.1.1/js-xqdb/test/live-ipc.test.ts +245 -0
- xqdb-0.1.1/js-xqdb/test/native-loader.test.ts +56 -0
- xqdb-0.1.1/js-xqdb/test/package.test.ts +117 -0
- xqdb-0.1.1/js-xqdb/test/public-api.test.ts +22 -0
- xqdb-0.1.1/js-xqdb/test/q.test.ts +191 -0
- xqdb-0.1.1/js-xqdb/tsconfig.build.json +13 -0
- xqdb-0.1.1/js-xqdb/tsconfig.json +23 -0
- xqdb-0.1.1/js-xqdb/vitest.config.ts +8 -0
- xqdb-0.1.1/pixi.toml +51 -0
- xqdb-0.1.1/py-xqdb/Cargo.toml +22 -0
- xqdb-0.1.1/py-xqdb/LICENSE +28 -0
- xqdb-0.1.1/py-xqdb/README.md +331 -0
- xqdb-0.1.1/py-xqdb/benchmarks/bench_ipc.py +225 -0
- xqdb-0.1.1/py-xqdb/ruff.toml +1 -0
- xqdb-0.1.1/py-xqdb/rust-toolchain.toml +2 -0
- xqdb-0.1.1/py-xqdb/src/arrow.rs +435 -0
- xqdb-0.1.1/py-xqdb/src/connector.rs +473 -0
- xqdb-0.1.1/py-xqdb/src/error.rs +39 -0
- xqdb-0.1.1/py-xqdb/src/lib.rs +25 -0
- xqdb-0.1.1/py-xqdb/test/__init__.py +0 -0
- xqdb-0.1.1/py-xqdb/test/conftest.py +152 -0
- xqdb-0.1.1/py-xqdb/test/test_ipc.py +724 -0
- xqdb-0.1.1/py-xqdb/xqdb/__init__.py +37 -0
- xqdb-0.1.1/py-xqdb/xqdb/_conversion.py +137 -0
- xqdb-0.1.1/py-xqdb/xqdb/exceptions.py +3 -0
- xqdb-0.1.1/py-xqdb/xqdb/py.typed +0 -0
- xqdb-0.1.1/py-xqdb/xqdb/q.py +109 -0
- xqdb-0.1.1/py-xqdb/xqdb/util.py +27 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/PKG-INFO +354 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/SOURCES.txt +93 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/dependency_links.txt +1 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/requires.txt +2 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/scm_file_list.json +90 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/scm_version.json +8 -0
- xqdb-0.1.1/py-xqdb/xqdb.egg-info/top_level.txt +1 -0
- xqdb-0.1.1/pyproject.toml +54 -0
- xqdb-0.1.1/rust-toolchain.toml +2 -0
- xqdb-0.1.1/setup.cfg +7 -0
- xqdb-0.1.1/testing/kdb/.containerignore +3 -0
- xqdb-0.1.1/testing/kdb/Containerfile +84 -0
- xqdb-0.1.1/testing/kdb/entrypoint.sh +20 -0
- xqdb-0.1.1/testing/kdb/init.q +28 -0
- xqdb-0.1.1/testing/kdb/manage.ps1 +467 -0
- xqdb-0.1.1/uv.lock +715 -0
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
name: XQDB CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
# Commit to build. If omitted, use the workflow-dispatch ref.
|
|
7
|
+
sha:
|
|
8
|
+
description: Commit SHA
|
|
9
|
+
type: string
|
|
10
|
+
# Create the sdist and build the wheels, but do not publish to PyPI / GitHub.
|
|
11
|
+
dry-run:
|
|
12
|
+
description: Dry run
|
|
13
|
+
type: boolean
|
|
14
|
+
default: true
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
concurrency:
|
|
20
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
21
|
+
cancel-in-progress: false
|
|
22
|
+
|
|
23
|
+
defaults:
|
|
24
|
+
run:
|
|
25
|
+
shell: bash
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
source:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
timeout-minutes: 10
|
|
31
|
+
outputs:
|
|
32
|
+
commit: ${{ steps.commit.outputs.sha }}
|
|
33
|
+
steps:
|
|
34
|
+
- name: Validate live release source
|
|
35
|
+
if: inputs.dry-run == false
|
|
36
|
+
env:
|
|
37
|
+
REQUESTED_SHA: ${{ inputs.sha }}
|
|
38
|
+
DISPATCH_REF: ${{ github.ref }}
|
|
39
|
+
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
|
40
|
+
run: |
|
|
41
|
+
if [[ -n "$REQUESTED_SHA" || "$DISPATCH_REF" != "refs/heads/$DEFAULT_BRANCH" ]]; then
|
|
42
|
+
echo "Live releases must be dispatched from the default branch without a SHA override." >&2
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
46
|
+
with:
|
|
47
|
+
ref: ${{ inputs.dry-run && inputs.sha || github.sha }}
|
|
48
|
+
fetch-depth: 0
|
|
49
|
+
- name: Resolve immutable source commit
|
|
50
|
+
id: commit
|
|
51
|
+
env:
|
|
52
|
+
LIVE_RELEASE: ${{ inputs.dry-run == false }}
|
|
53
|
+
run: |
|
|
54
|
+
sha="$(git rev-parse HEAD)"
|
|
55
|
+
echo "sha=$sha" >> "$GITHUB_OUTPUT"
|
|
56
|
+
if [[ "$LIVE_RELEASE" == "true" ]]; then
|
|
57
|
+
version="$(python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["workspace"]["package"]["version"])')"
|
|
58
|
+
expected_tag="v$version"
|
|
59
|
+
if ! actual_tag="$(git describe --tags --exact-match --match 'v[0-9]*')"; then
|
|
60
|
+
echo "Live releases require an exact v-prefixed version tag on the source commit." >&2
|
|
61
|
+
exit 1
|
|
62
|
+
fi
|
|
63
|
+
if [[ "$actual_tag" != "$expected_tag" ]]; then
|
|
64
|
+
echo "Release tag $actual_tag does not match workspace version $version." >&2
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
linux:
|
|
70
|
+
needs: source
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
container: quay.io/pypa/manylinux_2_28_x86_64@sha256:4dc41da7df20400310c80d162a2fe2d2c2f3d9734d8dec20f6b9843711618deb
|
|
73
|
+
timeout-minutes: 60
|
|
74
|
+
env:
|
|
75
|
+
UV_PYTHON: /opt/python/cp312-cp312/bin/python
|
|
76
|
+
SETUPTOOLS_RUST_CARGO_PROFILE: release
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
79
|
+
with:
|
|
80
|
+
ref: ${{ needs.source.outputs.commit }}
|
|
81
|
+
fetch-depth: 0
|
|
82
|
+
- name: Setup Rust
|
|
83
|
+
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
|
84
|
+
- name: Setup uv
|
|
85
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
86
|
+
with:
|
|
87
|
+
version: latest-known
|
|
88
|
+
- name: Build wheel
|
|
89
|
+
run: uv build --wheel --out-dir build-wheel
|
|
90
|
+
- name: Repair manylinux wheel
|
|
91
|
+
run: auditwheel repair build-wheel/*.whl --plat manylinux_2_28_x86_64 --wheel-dir dist
|
|
92
|
+
- name: Smoke-test wheel
|
|
93
|
+
run: |
|
|
94
|
+
uv venv smoke --python "$UV_PYTHON"
|
|
95
|
+
python="$PWD/smoke/bin/python"
|
|
96
|
+
uv pip install --python "$python" dist/*.whl
|
|
97
|
+
"$python" -c 'import xqdb; data = xqdb.serialize_as_ipc_bytes6("sync", False, 42); assert data'
|
|
98
|
+
- name: Upload wheel
|
|
99
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
100
|
+
with:
|
|
101
|
+
name: wheels-linux-x86_64
|
|
102
|
+
path: dist
|
|
103
|
+
|
|
104
|
+
windows:
|
|
105
|
+
needs: source
|
|
106
|
+
runs-on: windows-latest
|
|
107
|
+
timeout-minutes: 60
|
|
108
|
+
env:
|
|
109
|
+
SETUPTOOLS_RUST_CARGO_PROFILE: release
|
|
110
|
+
steps:
|
|
111
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
112
|
+
with:
|
|
113
|
+
ref: ${{ needs.source.outputs.commit }}
|
|
114
|
+
fetch-depth: 0
|
|
115
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
116
|
+
with:
|
|
117
|
+
python-version: "3.12"
|
|
118
|
+
- name: Setup Rust
|
|
119
|
+
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
|
120
|
+
- name: Setup uv
|
|
121
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
122
|
+
with:
|
|
123
|
+
version: latest-known
|
|
124
|
+
- name: Build wheel
|
|
125
|
+
run: uv build --wheel --out-dir dist
|
|
126
|
+
- name: Smoke-test wheel
|
|
127
|
+
run: |
|
|
128
|
+
uv venv smoke --python 3.12
|
|
129
|
+
python="$PWD/smoke/Scripts/python.exe"
|
|
130
|
+
uv pip install --python "$python" dist/*.whl
|
|
131
|
+
"$python" -c 'import xqdb; data = xqdb.serialize_as_ipc_bytes6("sync", False, 42); assert data'
|
|
132
|
+
- name: Upload wheel
|
|
133
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
134
|
+
with:
|
|
135
|
+
name: wheels-windows-x86_64
|
|
136
|
+
path: dist
|
|
137
|
+
|
|
138
|
+
macos:
|
|
139
|
+
needs: source
|
|
140
|
+
runs-on: macos-15
|
|
141
|
+
timeout-minutes: 60
|
|
142
|
+
env:
|
|
143
|
+
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
|
144
|
+
SETUPTOOLS_RUST_CARGO_PROFILE: release
|
|
145
|
+
_PYTHON_HOST_PLATFORM: macosx-11.0-arm64
|
|
146
|
+
steps:
|
|
147
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
148
|
+
with:
|
|
149
|
+
ref: ${{ needs.source.outputs.commit }}
|
|
150
|
+
fetch-depth: 0
|
|
151
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
|
|
152
|
+
with:
|
|
153
|
+
python-version: "3.12"
|
|
154
|
+
- name: Setup Rust
|
|
155
|
+
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1
|
|
156
|
+
- name: Setup uv
|
|
157
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
158
|
+
with:
|
|
159
|
+
version: latest-known
|
|
160
|
+
- name: Build wheel
|
|
161
|
+
run: uv build --wheel --out-dir dist
|
|
162
|
+
- name: Verify wheel platform tag
|
|
163
|
+
run: |
|
|
164
|
+
wheel=(dist/*.whl)
|
|
165
|
+
[[ ${#wheel[@]} -eq 1 && ${wheel[0]} == *-macosx_11_0_arm64.whl ]]
|
|
166
|
+
- name: Smoke-test wheel
|
|
167
|
+
run: |
|
|
168
|
+
uv venv smoke --python 3.12
|
|
169
|
+
python="$PWD/smoke/bin/python"
|
|
170
|
+
uv pip install --python "$python" dist/*.whl
|
|
171
|
+
"$python" -c 'import xqdb; data = xqdb.serialize_as_ipc_bytes6("sync", False, 42); assert data'
|
|
172
|
+
- name: Upload wheel
|
|
173
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
174
|
+
with:
|
|
175
|
+
name: wheels-macos-arm64
|
|
176
|
+
path: dist
|
|
177
|
+
|
|
178
|
+
sdist:
|
|
179
|
+
runs-on: ubuntu-latest
|
|
180
|
+
needs: source
|
|
181
|
+
timeout-minutes: 60
|
|
182
|
+
steps:
|
|
183
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
184
|
+
with:
|
|
185
|
+
ref: ${{ needs.source.outputs.commit }}
|
|
186
|
+
fetch-depth: 0
|
|
187
|
+
- name: Setup uv
|
|
188
|
+
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
|
|
189
|
+
with:
|
|
190
|
+
version: latest-known
|
|
191
|
+
- name: Build sdist
|
|
192
|
+
run: uv build --sdist --out-dir dist
|
|
193
|
+
- name: Upload sdist
|
|
194
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
195
|
+
with:
|
|
196
|
+
name: wheels-sdist
|
|
197
|
+
path: dist
|
|
198
|
+
|
|
199
|
+
release:
|
|
200
|
+
name: Release
|
|
201
|
+
if: inputs.dry-run == false && inputs.sha == '' && github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
|
|
202
|
+
runs-on: ubuntu-latest
|
|
203
|
+
timeout-minutes: 15
|
|
204
|
+
needs: [linux, windows, macos, sdist]
|
|
205
|
+
environment:
|
|
206
|
+
name: pypi
|
|
207
|
+
url: https://pypi.org/project/xqdb
|
|
208
|
+
permissions:
|
|
209
|
+
contents: read
|
|
210
|
+
id-token: write
|
|
211
|
+
steps:
|
|
212
|
+
- name: Download artifacts
|
|
213
|
+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
|
|
214
|
+
with:
|
|
215
|
+
path: dist
|
|
216
|
+
merge-multiple: true
|
|
217
|
+
|
|
218
|
+
- name: Publish with provenance attestations
|
|
219
|
+
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2
|
|
220
|
+
with:
|
|
221
|
+
attestations: true
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
name: JavaScript CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- "**"
|
|
7
|
+
paths:
|
|
8
|
+
- ".github/workflows/JS.yml"
|
|
9
|
+
- "Cargo.toml"
|
|
10
|
+
- "Cargo.lock"
|
|
11
|
+
- "rust-toolchain.toml"
|
|
12
|
+
- "crates/xqdb/**"
|
|
13
|
+
- "bindings/napi-xqdb/**"
|
|
14
|
+
- "js-xqdb/**"
|
|
15
|
+
pull_request:
|
|
16
|
+
paths:
|
|
17
|
+
- ".github/workflows/JS.yml"
|
|
18
|
+
- "Cargo.toml"
|
|
19
|
+
- "Cargo.lock"
|
|
20
|
+
- "rust-toolchain.toml"
|
|
21
|
+
- "crates/xqdb/**"
|
|
22
|
+
- "bindings/napi-xqdb/**"
|
|
23
|
+
- "js-xqdb/**"
|
|
24
|
+
workflow_dispatch:
|
|
25
|
+
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
|
|
29
|
+
concurrency:
|
|
30
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
31
|
+
cancel-in-progress: true
|
|
32
|
+
|
|
33
|
+
jobs:
|
|
34
|
+
windows-x64-msvc:
|
|
35
|
+
name: Windows x64 MSVC
|
|
36
|
+
runs-on: windows-latest
|
|
37
|
+
timeout-minutes: 30
|
|
38
|
+
defaults:
|
|
39
|
+
run:
|
|
40
|
+
shell: pwsh
|
|
41
|
+
working-directory: js-xqdb
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
44
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
|
45
|
+
with:
|
|
46
|
+
node-version: 24
|
|
47
|
+
cache: npm
|
|
48
|
+
cache-dependency-path: js-xqdb/package-lock.json
|
|
49
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
50
|
+
with:
|
|
51
|
+
toolchain: 1.98.0
|
|
52
|
+
targets: x86_64-pc-windows-msvc
|
|
53
|
+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
54
|
+
|
|
55
|
+
- name: Install JavaScript dependencies
|
|
56
|
+
run: npm install --no-audit --no-fund
|
|
57
|
+
- name: Build release native addon
|
|
58
|
+
run: npm run build:native:release -- --target x86_64-pc-windows-msvc
|
|
59
|
+
- name: Build TypeScript
|
|
60
|
+
run: npm run build:ts
|
|
61
|
+
- name: Run Vitest
|
|
62
|
+
run: npm test
|
|
63
|
+
- name: Stage and pack packages
|
|
64
|
+
run: |
|
|
65
|
+
New-Item -ItemType Directory -Force artifacts | Out-Null
|
|
66
|
+
Copy-Item xqdb.win32-x64-msvc.node npm/win32-x64-msvc/xqdb.win32-x64-msvc.node
|
|
67
|
+
npm pack --pack-destination artifacts
|
|
68
|
+
npm pack ./npm/win32-x64-msvc --pack-destination artifacts
|
|
69
|
+
- name: Smoke-test packed installation
|
|
70
|
+
run: |
|
|
71
|
+
$version = node -p "require('./package.json').version"
|
|
72
|
+
$platformVersion = node -p "require('./npm/win32-x64-msvc/package.json').version"
|
|
73
|
+
$rootTarball = (Resolve-Path "artifacts/xqdb-$version.tgz").Path
|
|
74
|
+
$platformTarball = (Resolve-Path "artifacts/xqdb-win32-x64-msvc-$platformVersion.tgz").Path
|
|
75
|
+
$smokeDir = Join-Path $env:RUNNER_TEMP "xqdb-smoke-$env:GITHUB_RUN_ID-$env:GITHUB_RUN_ATTEMPT"
|
|
76
|
+
New-Item -ItemType Directory $smokeDir | Out-Null
|
|
77
|
+
Set-Location $smokeDir
|
|
78
|
+
npm init -y
|
|
79
|
+
npm install --omit=optional --no-audit --no-fund $rootTarball $platformTarball
|
|
80
|
+
node --input-type=module -e 'const { serializeAsIpcBytes6 } = await import("xqdb"); const bytes = await serializeAsIpcBytes6("sync", false, 42); if (!Buffer.isBuffer(bytes) || bytes.length === 0) throw new Error("native serialization returned no bytes");'
|
|
81
|
+
- name: Upload packed packages and native addon
|
|
82
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
83
|
+
with:
|
|
84
|
+
name: xqdb-win32-x64-msvc
|
|
85
|
+
if-no-files-found: error
|
|
86
|
+
retention-days: 7
|
|
87
|
+
path: |
|
|
88
|
+
js-xqdb/artifacts/*.tgz
|
|
89
|
+
js-xqdb/xqdb.win32-x64-msvc.node
|
|
90
|
+
|
|
91
|
+
linux-x64-gnu:
|
|
92
|
+
name: Linux x64 GNU (glibc 2.28)
|
|
93
|
+
runs-on: ubuntu-22.04
|
|
94
|
+
timeout-minutes: 30
|
|
95
|
+
container:
|
|
96
|
+
image: quay.io/pypa/manylinux_2_28_x86_64@sha256:4dc41da7df20400310c80d162a2fe2d2c2f3d9734d8dec20f6b9843711618deb
|
|
97
|
+
defaults:
|
|
98
|
+
run:
|
|
99
|
+
shell: bash
|
|
100
|
+
working-directory: js-xqdb
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
103
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
|
104
|
+
with:
|
|
105
|
+
node-version: 24
|
|
106
|
+
cache: npm
|
|
107
|
+
cache-dependency-path: js-xqdb/package-lock.json
|
|
108
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
109
|
+
with:
|
|
110
|
+
toolchain: 1.98.0
|
|
111
|
+
targets: x86_64-unknown-linux-gnu
|
|
112
|
+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
113
|
+
- name: Run Rust unit tests
|
|
114
|
+
working-directory: .
|
|
115
|
+
run: cargo test --locked -p xqdb -p napi-xqdb
|
|
116
|
+
|
|
117
|
+
- name: Install JavaScript dependencies
|
|
118
|
+
run: npm install --no-audit --no-fund
|
|
119
|
+
- name: Build release native addon
|
|
120
|
+
run: npm run build:native:release -- --target x86_64-unknown-linux-gnu
|
|
121
|
+
- name: Build TypeScript
|
|
122
|
+
run: npm run build:ts
|
|
123
|
+
- name: Run Vitest
|
|
124
|
+
run: npm test
|
|
125
|
+
- name: Stage and pack packages
|
|
126
|
+
run: |
|
|
127
|
+
mkdir -p artifacts
|
|
128
|
+
cp xqdb.linux-x64-gnu.node npm/linux-x64-gnu/xqdb.linux-x64-gnu.node
|
|
129
|
+
npm pack --pack-destination artifacts
|
|
130
|
+
npm pack ./npm/linux-x64-gnu --pack-destination artifacts
|
|
131
|
+
- name: Smoke-test packed installation on glibc 2.28
|
|
132
|
+
run: |
|
|
133
|
+
version="$(node -p "require('./package.json').version")"
|
|
134
|
+
platform_version="$(node -p "require('./npm/linux-x64-gnu/package.json').version")"
|
|
135
|
+
root_tarball="$PWD/artifacts/xqdb-$version.tgz"
|
|
136
|
+
platform_tarball="$PWD/artifacts/xqdb-linux-x64-gnu-$platform_version.tgz"
|
|
137
|
+
smoke_dir="$RUNNER_TEMP/xqdb-smoke-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
|
|
138
|
+
mkdir "$smoke_dir"
|
|
139
|
+
cd "$smoke_dir"
|
|
140
|
+
npm init -y
|
|
141
|
+
npm install --omit=optional --no-audit --no-fund "$root_tarball" "$platform_tarball"
|
|
142
|
+
node --input-type=module -e 'const { serializeAsIpcBytes6 } = await import("xqdb"); const bytes = await serializeAsIpcBytes6("sync", false, 42); if (!Buffer.isBuffer(bytes) || bytes.length === 0) throw new Error("native serialization returned no bytes");'
|
|
143
|
+
- name: Upload packed packages and native addon
|
|
144
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
145
|
+
with:
|
|
146
|
+
name: xqdb-linux-x64-gnu
|
|
147
|
+
if-no-files-found: error
|
|
148
|
+
retention-days: 7
|
|
149
|
+
path: |
|
|
150
|
+
js-xqdb/artifacts/*.tgz
|
|
151
|
+
js-xqdb/xqdb.linux-x64-gnu.node
|
|
152
|
+
|
|
153
|
+
macos-arm64:
|
|
154
|
+
name: macOS arm64
|
|
155
|
+
runs-on: macos-15
|
|
156
|
+
timeout-minutes: 30
|
|
157
|
+
defaults:
|
|
158
|
+
run:
|
|
159
|
+
shell: bash
|
|
160
|
+
working-directory: js-xqdb
|
|
161
|
+
steps:
|
|
162
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
163
|
+
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
|
|
164
|
+
with:
|
|
165
|
+
node-version: 24
|
|
166
|
+
cache: npm
|
|
167
|
+
cache-dependency-path: js-xqdb/package-lock.json
|
|
168
|
+
- uses: dtolnay/rust-toolchain@4360b52568e2003a75bf9bc1d59f33a8e3fc893c # stable
|
|
169
|
+
with:
|
|
170
|
+
toolchain: 1.98.0
|
|
171
|
+
targets: aarch64-apple-darwin
|
|
172
|
+
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
|
|
173
|
+
|
|
174
|
+
- name: Install JavaScript dependencies
|
|
175
|
+
run: npm install --no-audit --no-fund
|
|
176
|
+
- name: Build release native addon
|
|
177
|
+
run: npm run build:native:release -- --target aarch64-apple-darwin
|
|
178
|
+
- name: Build TypeScript
|
|
179
|
+
run: npm run build:ts
|
|
180
|
+
- name: Run Vitest
|
|
181
|
+
run: npm test
|
|
182
|
+
- name: Stage and pack packages
|
|
183
|
+
run: |
|
|
184
|
+
mkdir -p artifacts
|
|
185
|
+
cp xqdb.darwin-arm64.node npm/darwin-arm64/xqdb.darwin-arm64.node
|
|
186
|
+
npm pack --pack-destination artifacts
|
|
187
|
+
npm pack ./npm/darwin-arm64 --pack-destination artifacts
|
|
188
|
+
- name: Smoke-test packed installation
|
|
189
|
+
run: |
|
|
190
|
+
version="$(node -p "require('./package.json').version")"
|
|
191
|
+
platform_version="$(node -p "require('./npm/darwin-arm64/package.json').version")"
|
|
192
|
+
root_tarball="$PWD/artifacts/xqdb-$version.tgz"
|
|
193
|
+
platform_tarball="$PWD/artifacts/xqdb-darwin-arm64-$platform_version.tgz"
|
|
194
|
+
smoke_dir="$RUNNER_TEMP/xqdb-smoke-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
|
|
195
|
+
mkdir "$smoke_dir"
|
|
196
|
+
cd "$smoke_dir"
|
|
197
|
+
npm init -y
|
|
198
|
+
npm install --omit=optional --no-audit --no-fund "$root_tarball" "$platform_tarball"
|
|
199
|
+
node --input-type=module -e 'const { serializeAsIpcBytes6 } = await import("xqdb"); const bytes = await serializeAsIpcBytes6("sync", false, 42); if (!Buffer.isBuffer(bytes) || bytes.length === 0) throw new Error("native serialization returned no bytes");'
|
|
200
|
+
- name: Upload packed packages and native addon
|
|
201
|
+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
202
|
+
with:
|
|
203
|
+
name: xqdb-darwin-arm64
|
|
204
|
+
if-no-files-found: error
|
|
205
|
+
retention-days: 7
|
|
206
|
+
path: |
|
|
207
|
+
js-xqdb/artifacts/*.tgz
|
|
208
|
+
js-xqdb/xqdb.darwin-arm64.node
|