mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
parent
70b651a393
commit
95cbd91a02
1 changed files with 28 additions and 25 deletions
|
@ -9,19 +9,20 @@ build:
|
||||||
dependencies:
|
dependencies:
|
||||||
cmake.org: ^3
|
cmake.org: ^3
|
||||||
git-scm.org: '*'
|
git-scm.org: '*'
|
||||||
|
python.org: ^3
|
||||||
working-directory: build
|
working-directory: build
|
||||||
script: |
|
script:
|
||||||
# duckdb uses git to get its version
|
# duckdb uses git to get its version
|
||||||
git init ..
|
- git init ..
|
||||||
git config user.email "bot@pkgx.dev"
|
- git config user.email "bot@pkgx.dev"
|
||||||
git config user.name "pkgxbot"
|
- git config user.name "pkgxbot"
|
||||||
git commit --allow-empty -mnil
|
- git commit --allow-empty -mnil
|
||||||
git tag v{{version}}
|
- git tag v{{version}}
|
||||||
|
|
||||||
cmake ..
|
- cmake ..
|
||||||
make --jobs {{ hw.concurrency }}
|
- make --jobs {{ hw.concurrency }}
|
||||||
mkdir -p "{{prefix}}"/bin
|
- mkdir -p "{{prefix}}"/bin
|
||||||
mv duckdb "{{prefix}}"/bin
|
- mv duckdb "{{prefix}}"/bin
|
||||||
env:
|
env:
|
||||||
ARGS:
|
ARGS:
|
||||||
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
- -DCMAKE_INSTALL_PREFIX="{{prefix}}"
|
||||||
|
@ -38,20 +39,22 @@ test:
|
||||||
CREATE TABLE weather (temp INTEGER);
|
CREATE TABLE weather (temp INTEGER);
|
||||||
INSERT INTO weather (temp) VALUES (40), (45), (50);
|
INSERT INTO weather (temp) VALUES (40), (45), (50);
|
||||||
SELECT AVG(temp) FROM weather;
|
SELECT AVG(temp) FROM weather;
|
||||||
script: |
|
script:
|
||||||
out="$(duckdb < $FIXTURE)"
|
- out="$(duckdb < $FIXTURE)"
|
||||||
exp=$(cat <<EOS
|
- |
|
||||||
┌─────────────┐
|
exp=$(cat <<EOS
|
||||||
│ avg("temp") │
|
┌─────────────┐
|
||||||
│ double │
|
│ avg("temp") │
|
||||||
├─────────────┤
|
│ double │
|
||||||
│ 45.0 │
|
├─────────────┤
|
||||||
└─────────────┘
|
│ 45.0 │
|
||||||
EOS)
|
└─────────────┘
|
||||||
|
EOS)
|
||||||
|
|
||||||
test "$out" = "$exp"
|
- test "$out" = "$exp"
|
||||||
|
|
||||||
if [[ "$(duckdb --version)" != "v{{version}}"* ]]; then
|
- |
|
||||||
echo "invalid version" >&2
|
if [[ "$(duckdb --version)" != "v{{version}}"* ]]; then
|
||||||
exit 1
|
echo "invalid version" >&2
|
||||||
fi
|
exit 1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue