forked from ParallelSSH/ssh2-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
174 lines (168 loc) · 4.89 KB
/
config.yml
File metadata and controls
174 lines (168 loc) · 4.89 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# This file is part of ssh2-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
version: 2.1
orbs:
python: circleci/python@0.3.2
jobs:
python_test:
parameters:
python_ver:
type: string
default: "3.6"
docker:
- image: circleci/python:<< parameters.python_ver >>
steps:
- checkout
- python/load-cache:
dependency-file: requirements_dev.txt
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
- run:
name: Deps
command: |
sudo apt-get update
sudo apt-get install cmake openssh-server
pip install -r requirements_dev.txt
- python/save-cache:
dependency-file: requirements_dev.txt
key: depsv3-{{ .Branch }}.{{ arch }}-PY<< parameters.python_ver >>
- run:
command: |
python setup.py build_ext --inplace
eval "$(ssh-agent -s)"
name: Build
- run:
command: |
set -x
ls -lhtr ssh2/
pwd
pytest tests
flake8 ssh2
python setup.py sdist
cd dist; pip install *; python -c 'from ssh2.session import Session; Session()'; cd ..
cd doc
make html
cd ..
name: Test
osx:
parameters:
xcode_ver:
type: string
default: "11.6.0"
macos:
xcode: << parameters.xcode_ver >>
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
SYSTEM_LIBSSH2: 1
steps:
- checkout
- run:
name: deps
command: |
brew install cmake git-lfs python libssh2
pip3 install twine
which twine
- run:
name: Build Wheel
command: |
./ci/osx-wheel.sh
- store_artifacts:
path: wheels
- run:
name: Upload Wheel
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
manylinux-x86_64:
machine:
image: ubuntu-2004:202201-02
steps: &manylinux-steps
- checkout
- python/load-cache:
key: manylinuxdepsv6-{{ .Branch }}.{{ arch }}
dependency-file: requirements_dev.txt
- run:
name: Git LFS
command: |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
git lfs pull
- run:
name: Deps
command: |
sudo apt-get install python3-pip
pip install -U pip
pip install twine
which twine
which python
which python3
- python/save-cache:
key: manylinuxdepsv6-{{ .Branch }}.{{ arch }}
dependency-file: requirements_dev.txt
- run:
name: Build Wheels
command: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin;
fi
./ci/build-manylinux.sh
- run:
name: sdist
command: |
sudo chown circleci -R *
python3 setup.py sdist
- run:
name: Upload Wheels
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*
manylinux2014-aarch64:
machine:
image: ubuntu-2004:202101-01
resource_class: arm.medium
steps: *manylinux-steps
workflows:
version: 2.1
main:
jobs:
- python_test:
matrix:
parameters:
python_ver:
- "3.6"
- "3.8"
- "3.9"
- "3.10"
filters:
tags:
ignore: /.*/
- manylinux-x86_64: &manylinux-wf
context: Docker
filters:
tags:
only: /.*/
branches:
ignore: /.*/
- manylinux2014-aarch64: *manylinux-wf
- osx:
matrix:
parameters:
xcode_ver:
- "14.0.0"
- "13.1.0"
filters:
tags:
only: /.*/
branches:
ignore: /.*/