Skip to content

Commit

Permalink
Merge pull request #810 from tlsfuzzer/switch-ci
Browse files Browse the repository at this point in the history
Use case statement in CI config
  • Loading branch information
tomato42 committed Feb 23, 2023
2 parents 81adc57 + c972819 commit 2cf81a9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 32 deletions.
53 changes: 22 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,13 @@ jobs:
container: centos:6
python-version: 2.6
- name: py2.7
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 2.7
- name: py3.3
os: ubuntu-18.04
python-version: 3.3
- name: py3.4
os: ubuntu-18.04
python-version: 3.4
- name: py3.5
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.5
- name: py3.6
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.6
- name: py3.7
os: ubuntu-latest
Expand All @@ -50,23 +44,15 @@ jobs:
python-version: 2.6
opt-deps: ['extract']
- name: py2.7 with extract
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 2.7
opt-deps: ['extract']
- name: py3.3 with extract
os: ubuntu-18.04
python-version: 3.3
opt-deps: ['extract']
- name: py3.4 with extract
os: ubuntu-18.04
python-version: 3.4
opt-deps: ['extract']
- name: py3.5 with extract
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.5
opt-deps: ['extract']
- name: py3.6 with extract
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.6
opt-deps: ['extract']
- name: py3.7 with extract
Expand All @@ -87,7 +73,7 @@ jobs:
opt-deps: ['extract']
# also test with just analysis tooling installed
- name: py3.6 with analysis
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.6
opt-deps: ['analysis']
- name: py3.7 with analysis
Expand All @@ -108,7 +94,7 @@ jobs:
opt-deps: ['analysis']
# and with both extract and analysis
- name: py3.6 with extract and analysis
os: ubuntu-18.04
os: ubuntu-20.04
python-version: 3.6
opt-deps: ['extract', 'analysis']
- name: py3.7 with extract and analysis
Expand Down Expand Up @@ -338,15 +324,20 @@ jobs:
# more generally, it should be `1845 + len(sys.version.split()[0])`,
# as http.server uses `sys_version = "Python/" + sys.version.split()[0]`
# https://github.com/python/cpython/blob/2c050e52f1ccf5db03819e4ed70690521d67e9fa/Lib/http/server.py#L253
if [[ $PYTHON_VERSION == '2.7' || $PYTHON_VERSION == '3.4' || $PYTHON_VERSION == '3.5' || $PYTHON_VERSION == '3.6' || $PYTHON_VERSION == '3.7' || $PYTHON_VERSION == '3.8' || $PYTHON_VERSION == '3.9' ]]; then
export REPLY_SIZE=1850
elif [[ $PYTHON_VERSION == '3.10' ]]; then
export REPLY_SIZE=1851 # Server: SimpleHTTP/0.6 Python/3.10.10
elif [[ $PYTHON_VERSION == 'nightly' ]]; then
export REPLY_SIZE=1852 # Server: SimpleHTTP/0.6 Python/3.10.0a0
else
export REPLY_SIZE=1849 # Server: SimpleHTTP/0.6 Python/3.8.6
fi
case $PYTHON_VERSION in
2.7 | 3.4 | 3.5 | 3.6 | 3.7 | 3.8 | 3.9)
export REPLY_SIZE=1850
;;
3.10)
export REPLY_SIZE=1851 # Server: SimpleHTTP/0.6 Python/3.10.10
;;
nightly)
export REPLY_SIZE=1852 # Server: SimpleHTTP/0.6 Python/3.10.0a0
;;
*)
export REPLY_SIZE=1849 # Server: SimpleHTTP/0.6 Python/3.8.6
;;
esac
python tests/scripts_retention.py tests/tlslite-ng-random-subset.json `which tls.py` $REPLY_SIZE
- name: Linter
# pylint doesn't work on 2.6: https://bitbucket.org/logilab/pylint/issue/390/py26-compatiblity-broken
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ directory.

You'll need:

* Python 2.6 or later or Python 3.3 or later
* Python 2.6 or later or Python 3.5 or later
* [tlslite-ng](https://github.com/tlsfuzzer/tlslite-ng)
0.8.0-alpha40 or later (note that `tlslite` will *not* work and
they conflict with each other)
Expand Down

0 comments on commit 2cf81a9

Please sign in to comment.