1
- name : Multipy runtime nightly release
1
+ name : Multipy runtime nightly test + release
2
2
3
3
on :
4
4
schedule :
9
9
strategy :
10
10
matrix :
11
11
python-version : [3.8, 3.9, '3.10']
12
- platform : [linux.2xlarge]
13
- abi : [0,1]
12
+ platform : [ubuntu-18.04]
14
13
fail-fast : false
15
14
runs-on : ${{ matrix.platform }}
16
15
steps :
17
- - name : Update pip
18
- run : |
19
- sudo yum update -y
20
- sudo yum -y install git python3-pip
21
- sudo pip3 install --upgrade pip
22
-
23
- - name : Setup conda
24
- run : |
25
- wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ${RUNNER_TEMP}/miniconda.sh
26
- bash ${RUNNER_TEMP}/miniconda.sh -b -p ${RUNNER_TEMP}/miniconda
27
-
28
- - name : setup Path
29
- run : |
30
- echo "${RUNNER_TEMP}/miniconda/bin" >> $GITHUB_PATH
31
- echo "CONDA=${RUNNER_TEMP}/miniconda" >> $GITHUB_PATH
32
-
33
16
- name : Checkout MultiPy
34
17
uses : actions/checkout@v2
35
18
with :
@@ -40,94 +23,28 @@ jobs:
40
23
with :
41
24
github-secret : ${{ secrets.GITHUB_TOKEN }}
42
25
43
- - name : Install C++ toolchain
44
- run : |
45
- sudo yum -y install clang llvm
46
- export CC=clang
47
- export CXX=clang++
48
- sudo yum -y install xz-devel bzip2-devel libnsl2-devel readline-devel expat-devel gdbm-devel glibc-devel gmp-devel libffi-devel libGL-devel libX11-devel ncurses-devel openssl-devel sqlite-devel tcl-devel tix-devel tk-devel
49
- sudo yum -y install lzma
50
- sudo yum -y install uuid
51
- sudo yum -y install openmpi-devel
52
- sudo yum -y install zlib-devel
53
-
54
- - name : create conda env
55
- run : |
56
- conda create --name multipy_runtime_env python=${{ matrix.python-version }}
57
- conda info
58
-
59
- - name : Install python/pytorch dependencies
60
- shell : bash -l {0}
61
- env :
62
- PYTHON_VERSION : ${{ matrix.python-version }}
63
- run : |
64
- conda run -n multipy_runtime_env python -m pip install astunparse numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests dataclasses pytest
65
-
66
- - name : gen examples
67
- shell : bash -l {0}
68
- env :
69
- PYTHON_VERSION : ${{ matrix.python-version }}
70
- run : |
71
- # A minor hack to get the CI working as conda doesn't have torch,
72
- # fortunately we can remove this once we have a dynamically linked torch
73
- cd multipy/runtime/example
74
- conda create --name example_env python=${{ matrix.python-version }}
75
- conda run -n example_env python -m pip install torch torchvision torchaudio pathlib
76
- conda run -n example_env python generate_examples.py
77
-
78
- - name : Build pytorch with ABI=${{ matrix.abi }}
79
- shell : bash -l {0}
80
- env :
81
- PYTHON_VERSION : ${{ matrix.python-version }}
82
- run : |
83
- export GLIBCXX_USE_CXX11_ABI=${{ matrix.abi }}
84
- export CXXFLAGS="-D_GLIBCXX_USE_CXX11_ABI=${{ matrix.abi }}"
85
- export TORCH_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=${{ matrix.abi }}"
86
- cd multipy/runtime/third-party/pytorch
87
- export USE_DEPLOY=1
88
- conda run -n multipy_runtime_env python setup.py develop
89
-
90
- - name : Build multipy runtime with ABI=${{ matrix.abi }}
91
- shell : bash -l {0}
26
+ - name : Build
92
27
env :
93
- PYTHON_VERSION : ${{ matrix.python-version }}
94
- run : |
95
- cd multipy/runtime
96
- mkdir build
97
- cd build
98
- conda run -n multipy_runtime_env cmake -DABI_EQUALS_1=${{ matrix.abi }} ..
99
- conda run -n multipy_runtime_env cmake --build . --config Release
28
+ DOCKER_BUILDKIT : 1
29
+ run : docker build -t multipy --progress=plain --build-arg PYTHON_VERSION=${{ matrix.python-version }} .
100
30
101
- - name : install files
102
- shell : bash -l {0}
103
- env :
104
- PYTHON_VERSION : ${{ matrix.python-version }}
31
+ - name : Test
105
32
run : |
106
- cd multipy/runtime/build
107
- conda run -n multipy_runtime_env cmake --install . --prefix "."
108
-
109
- - name : Run unit tests with ABI=${{ matrix.abi }}
110
- shell : bash -l {0}
111
- env :
112
- PYTHON_VERSION : ${{ matrix.python-version }}
33
+ docker run --rm multipy multipy/runtime/build/test_deploy
34
+ - name : Compat Tests
113
35
run : |
114
- export PYTHONPATH=$PYTHONPATH:$(pwd)
115
- cd multipy/runtime/build
116
- ./test_deploy
36
+ docker run --rm multipy bash -c "pip install -r compat-requirements.txt && multipy/runtime/build/interactive_embedded_interpreter --pyscript multipy/runtime/test_compat.py"
117
37
118
- - name : create tarball [click me to get a list of files for the nightly release]
119
- shell : bash -l {0}
120
- env :
121
- PYTHON_VERSION : ${{ matrix.python-version }}
38
+ - name : Create Tarball
122
39
run : |
123
- cd multipy/runtime/build/ dist
124
- tar -czvf multipy_runtime .tar.gz multipy/
40
+ docker cp $(docker run -d multipy):/opt/ dist/multipy .
41
+ tar -czvf multipy_runtime_python${{ matrix.python-version }} .tar.gz multipy/
125
42
126
43
- name : Update nightly release
127
44
uses : pyTooling/Actions/releaser@main
128
45
with :
129
- tag : nightly-runtime-abi- ${{ matrix.abi }}
46
+ tag : nightly-runtime-python ${{ matrix.python-version }}
130
47
rm : true
131
48
token : ${{ secrets.GITHUB_TOKEN }}
132
49
files : |
133
- multipy/runtime/build/dist/multipy_runtime .tar.gz
50
+ multipy_runtime_python${{ matrix.python-version }} .tar.gz
0 commit comments