Skip to content

Commit

Permalink
[CHORE] Refactor integration test to use wheel built for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Jun 23, 2023
1 parent 3a0ba3d commit 2cd7870
Showing 1 changed file with 28 additions and 16 deletions.
44 changes: 28 additions & 16 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,28 @@ jobs:
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
env:
package-name: getdaft
strategy:
fail-fast: false
matrix:
python-version: ['3.7']
daft-runner: [py, ray]
steps:
- uses: actions/checkout@v3
- uses: moonrepo/setup-rust@v0
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
with:
submodules: true
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- run: pip install -U twine toml
- run: python tools/patch_package_version.py
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v0

# Cache Rust builds
- uses: actions/cache@v3
env:
cache-name: cache-cargo
Expand All @@ -131,32 +143,32 @@ jobs:
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Virtual Env
run: |
python -m venv venv
echo "$GITHUB_WORKSPACE/venv/bin" >> $GITHUB_PATH
- name: Build wheels - x86
uses: messense/maturin-action@v1
with:
target: x86_64
manylinux: auto
args: --profile release-lto --out dist --sdist
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma

- name: Install dependencies
- name: Install Daft and dev dependencies
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
pip install dist/${{ env.package-name }}-*x86_64*.whl --force-reinstall
rm -rf daft
# Cache TPC-H data downloading
- uses: actions/cache@v3
env:
cache-name: cache-tpch-data
with:
path: data/tpch-dbgen
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('tests/integration/test_tpch.py', 'benchmarking/tpch/**') }}

- name: Build library in release mode and run TPCH integration tests
- name: Run TPCH integration tests
run: |
source activate
maturin develop --release
pytest tests/integration/ --durations=50
env:
DAFT_RUNNER: ${{ matrix.daft-runner }}
Expand Down

0 comments on commit 2cd7870

Please sign in to comment.