Skip to content

Commit 14e923a

Browse files
add tpcds-randomized-test to ci
This commit adds tpcds-randomized-test to ci. It relies on the duckdb cli for tpc-ds database generation. It also saves the artifacts if the test fails so we can reproduce issues.
1 parent 895fc9a commit 14e923a

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/actions/setup/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ runs:
1717
echo $HOME
1818
echo ${{ runner.os }}
1919
20+
- shell: bash
21+
run: |
22+
# Create target directory if CARGO_TARGET_DIR is set
23+
if [ -n "$CARGO_TARGET_DIR" ]; then
24+
sudo mkdir -p "$CARGO_TARGET_DIR" && sudo chown -R $USER:$USER "$CARGO_TARGET_DIR"
25+
fi
26+
2027
- uses: dtolnay/rust-toolchain@stable
2128
with:
2229
toolchain: stable

.github/workflows/ci.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
env:
1010
CARGO_TERM_COLOR: always
1111
RUST_BACKTRACE: 1
12+
CARGO_TARGET_DIR: /mnt/target # use larger disk
1213

1314
concurrency:
1415
group: ${{ github.ref }}
@@ -32,13 +33,67 @@ jobs:
3233
lfs: true
3334
- uses: ./.github/actions/setup
3435
- run: cargo test --features integration
36+
- name: Show disk usage
37+
if: always()
38+
run: |
39+
echo "=== df -h ==="
40+
df -h
41+
echo "=== Top directories in workspace ==="
42+
du -h . 2>/dev/null | sort -hr | head -n 20 || true
43+
echo "=== cargo dirs ==="
44+
du -sh ~/.cargo 2>/dev/null || true
45+
du -sh ~/.cargo/registry 2>/dev/null || true
46+
du -sh ~/.cargo/git 2>/dev/null || true
47+
du -sh /mnt/target 2>/dev/null || true
48+
du -sh target 2>/dev/null || true
49+
echo "=== target/debug/deps sizes ==="
50+
du -h /mnt/target/debug/deps 2>/dev/null | sort -hr | head -n 30 || true
51+
du -h target/debug/deps 2>/dev/null | sort -hr | head -n 30 || true
52+
echo "=== home directory ==="
53+
du -sh ~ 2>/dev/null | head -n 10 || true
3554
3655
tpch-test:
3756
runs-on: ubuntu-latest
3857
steps:
3958
- uses: actions/checkout@v4
4059
- uses: ./.github/actions/setup
4160
- run: cargo test --features tpch --test tpch_validation_test
61+
- name: Clean up test data
62+
run: |
63+
rm -rf testdata/tpch/data/*
64+
df -h
65+
66+
tpcds-randomized-test:
67+
runs-on: ubuntu-latest
68+
steps:
69+
- uses: actions/checkout@v4
70+
with:
71+
lfs: true
72+
- uses: ./.github/actions/setup
73+
- name: Install DuckDB CLI
74+
run: |
75+
curl https://install.duckdb.org | sh
76+
mkdir -p $HOME/.local/bin
77+
mv /home/runner/.duckdb/cli/latest/duckdb $HOME/.local/bin/
78+
echo "$HOME/.local/bin" >> $GITHUB_PATH
79+
- name: Run TPC-DS randomized test
80+
id: test
81+
run: cargo test --features tpcds --test tpc_ds_randomized
82+
continue-on-error: true
83+
- name: Upload test artifacts on failure
84+
if: failure() || steps.test.outcome == 'failure'
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: tpcds-test-artifacts-${{ github.run_id }}
88+
path: testdata/tpcds/data/**
89+
retention-days: 7
90+
if-no-files-found: ignore
91+
- name: Clean up test data
92+
run: |
93+
rm -rf testdata/tpcds/data/*
94+
rm -f $HOME/.local/bin/duckdb
95+
rm -rf /home/runner/.duckdb
96+
df -h
4297
4398
format-check:
4499
runs-on: ubuntu-latest
@@ -48,3 +103,4 @@ jobs:
48103
with:
49104
components: rustfmt
50105
- run: cargo fmt --all -- --check
106+

0 commit comments

Comments
 (0)