Newer
Older
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
#!/bin/bash
set -e -x
cd /io
mkdir -p deps
cd deps
yum install -y git cmake yum wget
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar -xvf ruby-2.1.2.tar.gz
cd ruby-2.1.2
./configure
make -j4
make install
cd ..
rm -rf ruby-2.1.2
git clone --branch v2.2.12 https://github.com/OCL-dev/ocl-icd
cd ocl-icd
wget https://raw.githubusercontent.com/conda-forge/ocl-icd-feedstock/master/recipe/install-headers.patch --no-check-certificate
git apply install-headers.patch
autoreconf -i
chmod +x configure
./configure --prefix=/usr
make -j4
make install
cd /io
# Compile wheels
for PYBIN in /opt/python/*/bin; do
"${PYBIN}/pip" install numpy pybind11 mako
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/pyopencl*.whl; do
auditwheel repair "$whl" -w /io/wheelhouse/
done
# Bundle license files
/opt/python/cp37-cp37m/bin/pip install delocate
/opt/python/cp37-cp37m/bin/python /io/travis/fix-wheel.py /io/deps/ocl-icd/COPYING
/opt/python/cp37-cp37m/bin/pip install twine
for WHEEL in /io/wheelhouse/pyopencl*.whl; do
# dev
# /opt/python/cp37-cp37m/bin/twine upload \
# --skip-existing \
# --repository-url https://test.pypi.org/legacy/ \
# -u "${TWINE_USERNAME}" -p "${TWINE_PASSWORD}" \
# "${WHEEL}"
# prod
/opt/python/cp37-cp37m/bin/twine upload \
--skip-existing \
-u "${TWINE_USERNAME}" -p "${TWINE_PASSWORD}" \
"${WHEEL}"
done