-
-
Notifications
You must be signed in to change notification settings - Fork 10
111 lines (98 loc) · 3.02 KB
/
ci.yml
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
---
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
FORCE_COLOR: "1" # Make tools pretty.
TOX_TESTENV_PASSENV: FORCE_COLOR
PYTHON_LATEST: "3.10"
SETUPTOOLS_SCM_PRETEND_VERSION: "1.0" # avoid warnings about shallow checkout
jobs:
tests:
name: tox on ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11.0-beta - 3.11"
- "pypy-3.7"
- "pypy-3.8"
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox tox-gh-actions
- run: python -m tox
system-package:
runs-on: ubuntu-latest
name: Install and test with system package of Argon2.
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
- name: Install dependencies
run: |
sudo apt-get install libargon2-0 libargon2-0-dev
# Ensure we cannot use our own Argon2 by accident.
rm -rf extras
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade virtualenv tox
- run: python -m tox -e system-argon2
package:
name: Build & verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: hynek/build-and-inspect-python-package@v1
id: baipp
# Smoke-check the wheel against argon2-cffi.
- run: python -m pip install ${{ steps.baipp.outputs.dist }}/*.whl
- run: python -m pip install --no-deps git+https://github.com/hynek/argon2-cffi.git
- run: python -m argon2 -n 1 -t 1 -m 8 -p 1
install-dev:
name: Verify dev env
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_LATEST}}
- run: python -m pip install --upgrade pip
- run: python -m pip install -e .[dev]
env:
ARCHFLAGS: -arch x86_64
- name: Import package
run: python -c 'from _argon2_cffi_bindings import ffi, lib; print(lib.ARGON2_VERSION_NUMBER)'
- run: otool -L src/_argon2_cffi_bindings/_ffi.abi3.so
if: startsWith(matrix.os , 'macos')
- run: ldd src/_argon2_cffi_bindings/_ffi.abi3.so
if: startsWith(matrix.os , 'ubuntu')