|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http:/www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: main |
| 19 | +on: |
| 20 | + push: |
| 21 | + branches: [main] |
| 22 | + pull_request: |
| 23 | + branches: [main] |
| 24 | + |
| 25 | +#concurrency: |
| 26 | +# group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} |
| 27 | +#cancel-in-progress: true |
| 28 | + |
| 29 | +jobs: |
| 30 | + test-matrix: |
| 31 | + runs-on: ubuntu-latest |
| 32 | + strategy: |
| 33 | + fail-fast: false |
| 34 | + matrix: |
| 35 | + python-version: |
| 36 | + #- "3.10" |
| 37 | + #- "3.11" |
| 38 | + - "3.12" |
| 39 | + toolchain: |
| 40 | + - "stable" |
| 41 | + |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v4 |
| 44 | + |
| 45 | + - name: Setup Rust Toolchain |
| 46 | + uses: dtolnay/rust-toolchain@stable |
| 47 | + id: rust-toolchain |
| 48 | + with: |
| 49 | + components: clippy,rustfmt |
| 50 | + |
| 51 | + - name: Install Protoc |
| 52 | + uses: arduino/setup-protoc@v3 |
| 53 | + with: |
| 54 | + version: "27.4" |
| 55 | + repo-token: ${{ secrets.GITHUB_TOKEN }} |
| 56 | + |
| 57 | + - name: Cache Cargo |
| 58 | + uses: actions/cache@v4 |
| 59 | + with: |
| 60 | + path: ~/.cargo |
| 61 | + key: cargo-cache-${{ steps.rust-toolchain.outputs.cachekey }}-${{ hashFiles('Cargo.lock') }} |
| 62 | + |
| 63 | + - name: Install dependencies and build |
| 64 | + uses: astral-sh/setup-uv@v5 |
| 65 | + with: |
| 66 | + python-version: ${{ matrix.python-version }} |
| 67 | + enable-cache: true |
| 68 | + |
| 69 | + - name: Create virtual env |
| 70 | + run: | |
| 71 | + uv venv |
| 72 | +
|
| 73 | + - name: Cache the generated dataset |
| 74 | + id: cache-tpch-dataset |
| 75 | + uses: actions/cache@v4 |
| 76 | + with: |
| 77 | + path: ./testdata/tpch |
| 78 | + key: tpch-data |
| 79 | + |
| 80 | + - name: create the dataset |
| 81 | + if: ${{ steps.cache-tpch-dataset.outputs.cache-hit != 'true' }} |
| 82 | + run: | |
| 83 | + uv add duckdb |
| 84 | + uv run python tpch/make_data.py 1 testdata/tpch/ |
| 85 | +
|
| 86 | + - name: build and install datafusion-ray |
| 87 | + env: |
| 88 | + RUST_BACKTRACE: 1 |
| 89 | + run: | |
| 90 | + uv add 'ray[default]' |
| 91 | + uv run --no-project maturin develop --uv |
| 92 | +
|
| 93 | + - name: validate tpch |
| 94 | + env: |
| 95 | + DATAFUSION_RAY_LOG_LEVEL: debug |
| 96 | + RAY_COLOR_PREFIX: 1 |
| 97 | + RAY_DEDUP_LOGS: 0 |
| 98 | + run: | |
| 99 | + uv run python tpch/tpcbench.py \ |
| 100 | + --data='file:///${{ github.workspace }}/testdata/tpch/' \ |
| 101 | + --concurrency 3 \ |
| 102 | + --partitions-per-worker 2 \ |
| 103 | + --batch-size=8192 \ |
| 104 | + --worker-pool-min=20 \ |
| 105 | + --validate |
0 commit comments