aboutsummaryrefslogtreecommitdiff
path: root/ldcg-python-manylinux-tensorflow/build.sh
blob: 4e88a086d65e6008b9143b622f973250ab191597 (plain)
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
#!/bin/bash

set -xe

cd $WORKSPACE

rm -rf *.sh configs wheels cache_upload

mkdir wheels cache_upload

git clone --depth 1 https://git.linaro.org/ci/job/configs.git

cd configs; git log --pretty=oneline -1; cd ..

if [ "$build212" = "true" ]; then
    echo '  - "2.12"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$build213" = "true" ]; then
    echo '  - "2.13"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$build214" = "true" ]; then
    echo '  - "2.14"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$build215" = "true" ]; then
    echo '  - "2.15"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$build216" = "true" ]; then
    echo '  - "2.16"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$buildgit" = "true" ]; then
    echo '  - "git"' >> configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$buildonednn" = "true" ]; then
    sed -i -e '/onednn_build/s/false/true/' configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$buildonednnopt" = "true" ]; then
    sed -i -e '/onednn_enable_opt/s/false/true/' -e '/extra_test_options/s/0/1/' configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$prebuild" = "true" ]; then
    sed -i -e '/prebuild_release/s/false/true/' configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
    sed -i -e "/prebuild_hash/s/\"\"/\"${prebuild_hash}\"/" configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi
if [ "$useclang" = "true" ]; then
    sed -i -e '/clang_build/s/false/true/' configs/ldcg-python-manylinux-tensorflow/ansible/vars/vars.yml
fi

ansible-galaxy collection install community.docker

cd configs/ldcg-python-manylinux-tensorflow/ansible/
sed -i -e"s+/tmp/workspace+${WORKSPACE}+g" vars/vars.yml

ansible-playbook playbooks/build-tf-dual-abi.yml

# To be in sync with upstream we keep wheels outside of wheels/ while we
# loop on Python versions. Now let move them back so publishing script
# would not require changes.
cd $WORKSPACE
mv ml_wheels/tensorflow_aarch64-*.whl wheels/

# drop files we do not want/need to publish
rm wheels/audit.txt wheels/profile.json.gz