-
Notifications
You must be signed in to change notification settings - Fork 163
94 lines (80 loc) · 2.61 KB
/
ray-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# 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@v3
- uses: moonrepo/setup-rust@v0
- uses: actions/cache@v3
env:
cache-name: cache-cargo
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ 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: 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