forked from ParallelSSH/ssh-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-manylinux.sh
More file actions
executable file
·60 lines (55 loc) · 2.71 KB
/
build-manylinux.sh
File metadata and controls
executable file
·60 lines (55 loc) · 2.71 KB
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
#!/bin/bash -xe
# This file is part of ssh-python.
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
docker_repo="parallelssh/ssh-manylinux"
docker_files=(
"ci/docker/manylinux/Dockerfile"
"ci/docker/manylinux/Dockerfile.2014_x86_64"
"ci/docker/manylinux/Dockerfile.manylinux_2_24_x86_64"
"ci/docker/manylinux/Dockerfile.manylinux_2_28_x86_64"
)
rm -rf local build ssh/libssh.* ssh/*.so
python ci/appveyor/fix_version.py .
if [[ $(uname -m) == "aarch64" ]]; then
docker_files=(
"ci/docker/manylinux/Dockerfile.aarch64"
"ci/docker/manylinux/Dockerfile.aarch64_2_24"
"ci/docker/manylinux/Dockerfile.aarch64_2_28"
)
fi
for docker_file in "${docker_files[@]}"; do
if [[ ${docker_file} == "ci/docker/manylinux/Dockerfile_2014_x86_64" ]]; then
docker_tag="${docker_repo}:2014_x86_64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile" ]]; then
docker_tag="${docker_repo}:2010_x86_64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile.manylinux_2_24_x86_64" ]]; then
docker_tag="${docker_repo}:2_24_x86_64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile.manylinux_2_28_x86_64" ]]; then
docker_tag="${docker_repo}:2_28_x86_64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile.aarch64" ]]; then
docker_tag="${docker_repo}:2014_aarch64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile.aarch64_2_24" ]]; then
docker_tag="${docker_repo}:2_24_aarch64"
elif [[ ${docker_file} == "ci/docker/manylinux/Dockerfile.aarch64_2_28" ]]; then
docker_tag="${docker_repo}:2_28_aarch64"
fi
echo "Docker tag is ${docker_tag}"
docker pull $docker_tag || echo
docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f "${docker_file}"
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then docker push $docker_tag; fi
docker run --rm -v "$(pwd)":/io $docker_tag /io/ci/build-wheels.sh
ls wheelhouse/
done