forked from NVIDIA-Merlin/models
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (126 loc) · 3.93 KB
/
tensorflow.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
name: tensorflow
on:
workflow_dispatch:
push:
branches: [ main ]
tags:
- v*
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.9.7]
os: [ubuntu-latest]
tensorflow-version: ["~=2.8.0", "~=2.9.0", "~=2.10.0"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
requirements/*.txt
- name: Install Ubuntu packages
run: |
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler pandoc
- name: Install Merlin dependencies
run: |
pip install "pandas>=1.2.0,<1.4.0dev0"
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git"
pip install "merlin-core@git+https://github.com/NVIDIA-Merlin/core.git"
- name: Install dependencies
run: |
python -m pip install "tensorflow${{ matrix.tensorflow-version }}"
python -m pip install .[tensorflow-dev]
- name: Build
run: |
python setup.py develop
- name: Run unittests
run: |
make tests-tf
- name: Generate package for pypi
run: |
python setup.py sdist
- name: Upload artifacts to github
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
- name: Store PR information
run: |
mkdir ./pr
echo ${{ github.event.number }} > ./pr/pr.txt
echo ${{ github.event.pull_request.merged }} > ./pr/merged.txt
echo ${{ github.event.action }} > ./pr/action.txt
- name: Upload PR information
uses: actions/upload-artifact@v2
with:
name: pr
path: pr/
examples:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.9.7 ]
os: [ ubuntu-latest ]
tensorflow-version: ["~=2.8.0", "~=2.9.0"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
requirements/*.txt
- uses: abbbi/github-actions-tune@v1
- name: Install Ubuntu packages
run: |
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler
- name: Install Merlin dependencies
run: |
pip install "pandas>=1.2.0,<1.4.0dev0"
pip install "NVTabular@git+https://github.com/NVIDIA-Merlin/NVTabular.git"
pip install "merlin-core@git+https://github.com/NVIDIA-Merlin/core.git"
- name: Install dependencies
run: |
python -m pip install "tensorflow${{ matrix.tensorflow-version }}"
python -m pip install .[tensorflow-dev]
- name: Build
run: |
python setup.py develop
- name: Run unittests
run: |
make tests-tf-examples
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [tests]
steps:
- uses: actions/download-artifact@v2
with:
name: dist
- name: Create GitHub Release
uses: fnkr/[email protected]
env:
GHR_PATH: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Push to PyPi
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install --upgrade wheel pip setuptools twine
twine upload *