-
Notifications
You must be signed in to change notification settings - Fork 892
160 lines (131 loc) · 5.35 KB
/
merge.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
name: darts PR merge workflow
on:
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python 3.10"
uses: actions/setup-python@v1
with:
python-version: '3.10'
# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "4. Lint"
run: |
./gradlew lint
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-13, ubuntu-latest]
python-version: ['3.8', '3.10']
flavour: ['core', 'torch', 'all']
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "4. Setup pip"
run: |
./gradlew setupPip
- name: "5. Install libomp (for LightGBM)"
run: |
./.github/scripts/libomp-${{ runner.os }}.sh
- name: "6. Tests"
run: |
./gradlew "test_${{matrix.flavour}}"
- name: "7. Codecov upload"
if: ${{ matrix.flavour == 'all' }}
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
check-examples:
runs-on: ubuntu-latest
strategy:
matrix:
example-name: [00-quickstart.ipynb, 01-multi-time-series-and-covariates.ipynb, 02-data-processing.ipynb, 03-FFT-examples.ipynb, 04-RNN-examples.ipynb, 05-TCN-examples.ipynb, 06-Transformer-examples.ipynb, 07-NBEATS-examples.ipynb, 08-DeepAR-examples.ipynb, 09-DeepTCN-examples.ipynb, 10-Kalman-filter-examples.ipynb, 11-GP-filter-examples.ipynb, 12-Dynamic-Time-Warping-example.ipynb, 13-TFT-examples.ipynb, 15-static-covariates.ipynb, 16-hierarchical-reconciliation.ipynb, 18-TiDE-examples.ipynb, 19-EnsembleModel-examples.ipynb, 20-RegressionModel-examples.ipynb, 21-TSMixer-examples.ipynb, 22-anomaly-detection-examples.ipynb]
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
with:
python-version: '3.9'
# downloading gradle multiple times in parallel can yield to connection errors
- name: "3. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: "3.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
# TODO: why is this a matrix? there is no pip caching, and we restart this for each item in the matrix
- name: "4. Run examples ${{matrix.example-name}}"
run: |
./gradlew checkExample -PexampleName=${{matrix.example-name}}
docs:
runs-on: ubuntu-latest
steps:
- name: "1. Clone repository"
uses: actions/checkout@v2
- name: "2. Set up Python 3.9"
uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: "3. Install pandoc"
run: |
sudo apt-get install -y pandoc
# downloading gradle multiple times in parallel can yield to connection errors
- name: "4. Cache gradle distribution"
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper/dists
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: "4.1 Cache gradle packages"
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: tests-${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties', 'build.gradle') }}
- name: "5. Setup pip"
run: |
./gradlew setupPip
- name: "6. Attach cache for pip"
uses: actions/cache@v1
id: cache
with:
path: ~/.cache/pip
key: release-${{ runner.os }}-3.9-pip-${{ hashFiles('requirements/core.txt', 'requirements/release.txt') }}
- name: "7. Build docs"
run: |
./gradlew buildDocs