pantry/projects/duckdb.org/package.yml

61 lines
1.4 KiB
YAML
Raw Normal View History

2023-03-16 04:01:01 +03:00
distributable:
url: https://github.com/duckdb/duckdb/archive/refs/tags/v{{version}}.tar.gz
strip-components: 1
versions:
github: duckdb/duckdb/releases/tags
build:
dependencies:
cmake.org: ^3
2023-03-16 15:58:38 +03:00
git-scm.org: '*'
2024-04-17 18:07:59 +03:00
python.org: ^3
2023-03-16 04:01:01 +03:00
working-directory: build
2024-04-17 18:07:59 +03:00
script:
2023-03-16 15:58:38 +03:00
# duckdb uses git to get its version
2024-04-17 18:07:59 +03:00
- git init ..
- git config user.email "bot@pkgx.dev"
- git config user.name "pkgxbot"
- git commit --allow-empty -mnil
- git tag v{{version}}
2023-03-16 15:58:38 +03:00
2024-04-17 18:07:59 +03:00
- cmake ..
- make --jobs {{ hw.concurrency }}
- mkdir -p "{{prefix}}"/bin
- mv duckdb "{{prefix}}"/bin
2023-03-16 04:01:01 +03:00
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
test:
fixture: |
CREATE TABLE weather (temp INTEGER);
INSERT INTO weather (temp) VALUES (40), (45), (50);
SELECT AVG(temp) FROM weather;
2024-04-17 18:07:59 +03:00
script:
- out="$(duckdb < $FIXTURE)"
- |
exp=$(cat <<EOS
┌─────────────┐
│ avg("temp") │
│ double │
├─────────────┤
│ 45.0 │
└─────────────┘
EOS)
2023-03-16 04:01:01 +03:00
2024-04-17 18:07:59 +03:00
- test "$out" = "$exp"
2023-03-16 15:58:38 +03:00
2024-04-17 18:07:59 +03:00
- |
if [[ "$(duckdb --version)" != "v{{version}}"* ]]; then
echo "invalid version" >&2
exit 1
fi