Skip to content

Check Ray version compatibility #335

Check Ray version compatibility

Check Ray version compatibility #335

# This workflow checks Daft against various versions of Ray nightly
name: Check Ray version compatibility
on:
schedule:
- cron: 59 23 * * *
workflow_dispatch:
env:
DAFT_ANALYTICS_ENABLED: '0'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ['3.9']
ray-version: [2.5.1, 2.4.0, 2.3.0, 2.2.0, 2.1.0, 2.0.0]
steps:
- uses: actions/checkout@v4
- uses: moonrepo/setup-rust@v0
with:
cache: false
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-build
cache-all-crates: 'true'
- 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: Upgrade Pip
run: pip install --upgrade pip
- name: Install to pin Ray versions
run: pip install ray[data,default]==${{ matrix.ray-version }}
# Ray requires a pinned protobuf<4.0 for versions of Ray <1.13 (see: https://github.com/ray-project/ray/pull/25211)
- name: Install to pin Protobuf version (for Ray <1.13)
if: ${{ matrix.ray-version == '1.12.0' || matrix.ray-version == '1.11.0' || matrix.ray-version == '1.10.0' }}
run: pip install protobuf==3.20.3
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build Rust Library
run: |
source activate
maturin develop
- name: Test with pytest
run: pytest
env:
DAFT_RUNNER: ray
- name: Send Slack notification on failure
uses: slackapi/[email protected]
if: failure()
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":rotating_light: [NIGHTLY] Ray Compatibility Checks <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|workflow> *FAILED* :rotating_light:"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK