pantry/projects/duckdb.org/package.yml
2023-03-16 10:34:01 -04:00

62 lines
1.5 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

distributable:
url: https://github.com/duckdb/duckdb/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
# if theres a github then we can parse the versions
versions:
github: duckdb/duckdb/releases/tags
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
cmake.org: ^3
git-scm.org: '*'
working-directory: build
script: |
# duckdb uses git to get its version
git init ..
git config user.email "bot@tea.xyz"
git config user.name "teabot"
git commit --allow-empty -mnil
git tag v{{version}}
cmake ..
make --jobs {{ hw.concurrency }}
mkdir -p "{{prefix}}"/bin
mv duckdb "{{prefix}}"/bin
env:
ARGS:
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_ICU_EXTENSION=1
- -DBUILD_JSON_EXTENSION=1
- -DBUILD_PARQUET_EXTENSION=1
provides:
- bin/duckdb
# ^^ specify the binaries or tea magic wont work
test:
fixture: |
CREATE TABLE weather (temp INTEGER);
INSERT INTO weather (temp) VALUES (40), (45), (50);
SELECT AVG(temp) FROM weather;
script: |
out="$(duckdb < $FIXTURE)"
exp=$(cat <<EOS
┌─────────────┐
│ avg("temp") │
│ double │
├─────────────┤
│ 45.0 │
└─────────────┘
EOS)
test "$out" = "$exp"
if [[ "$(duckdb --version)" != "v{{version}}"* ]]; then
echo "invalid version" >&2
exit 1
fi