-
Notifications
You must be signed in to change notification settings - Fork 504
211 lines (186 loc) · 5.16 KB
/
integration.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
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
name: Integration test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9, "3.10", "3.11", "3.12", "3.13-dev" ]
cffi: [ yes, no ]
os: [ ubuntu-20.04 ]
include:
- python-version: "3.12"
cffi: yes
os: macos-12
- python-version: "3.12"
cffi: no
os: windows-latest
- python-version: "3.12"
cffi: yes
os: windows-latest
- python-version: pypy2.7
cffi: no
os: ubuntu-latest
- python-version: pypy3.9
cffi: no
os: ubuntu-latest
env:
CFLAGS: "-Wconversion"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "from __future__ import print_function; import sys; print(sys.version)"
- name: Install CFFI
if: matrix.cffi == 'yes'
run: pip install cffi
- name: Install dependencies (testing only)
run: |
pip install -r requirements-test.txt
- name: Install package
run: |
pip install -v .
- name: Test
shell: bash
run: |
if [[ -f .separate_namespace ]]; then
python -m Cryptodome.SelfTest
else
python -m Crypto.SelfTest
fi
build_python_27:
# GitHub Actions will not setup Python 2.7 since June 2023
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest]
cffi: [ yes, no ]
include:
- os: ubuntu-20.04
container: python:2.7.18-buster
container:
image: ${{ matrix.container }}
env:
CFLAGS: "-Wconversion"
steps:
- uses: actions/checkout@v3
- name: Install Python 2
if: matrix.os == 'windows-latest'
run: |
choco install python2
- name: Install MSVC
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Prepare environmental variables
if: matrix.os == 'windows-latest'
shell: bash
run: |
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV
echo "C:\\Python27;$(cat $GITHUB_PATH)" >> $GITHUB_PATH
cat $GITHUB_PATH
- name: Display Python version
run: python -c "from __future__ import print_function; import sys; print(sys.version)"
- name: Install CFFI
if: matrix.cffi == 'yes'
run: python -m pip install cffi
- name: Install dependencies (testing only)
run: |
python -m pip install -r requirements-test.txt
- name: Install package
run: |
python -m pip install -v .
- name: Test
shell: bash
run: |
if [[ -f .separate_namespace ]]; then
python -m Cryptodome.SelfTest
else
python -m Crypto.SelfTest
fi
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install mypy -r requirements-test.txt
- name: Test
run: |
mypy --enable-incomplete-feature=Unpack lib/
test_c_linux:
runs-on: ubuntu-latest
strategy:
matrix:
sse: [0, 1]
arch: [x64, x32]
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libc6-dev-i386 libubsan1
- name: Test Linux x32 and x64
run: |
cd src/test
mkdir build
GCC_M32_TOOLCHAIN=${{ github.workspace }}/.github/workflows/gcc_m32_toolchain.txt
EXTRA=$([ ${{ matrix.arch }} = x32 ] && echo "-DCMAKE_TOOLCHAIN_FILE=$GCC_M32_TOOLCHAIN" || true)
cmake -B build -DSSE=${{ matrix.sse }} $EXTRA
make -C build all test
test_c_windows:
runs-on: windows-latest
strategy:
matrix:
arch:
- x64
- win32
steps:
- uses: actions/checkout@v3
- name: Set up Python "3.12"
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install MSVC
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Test Windows 32 and 64
run: |
cd src/test
mkdir build
cmake -B build -G "NMake Makefiles"
cd build
nmake all test
python_no_gil:
runs-on: ubuntu-latest
env:
CFLAGS: "-Wconversion"
steps:
- uses: actions/checkout@v2
- name: No-GIL Python
uses: deadsnakes/[email protected]
with:
python-version: "3.13-dev"
nogil: true
- name: Install dependencies (testing only)
run: |
pip install -r requirements-test.txt
- name: Install package
run: |
pip install -v .
- name: Test
shell: bash
run: |
if [[ -f .separate_namespace ]]; then
python -m Cryptodome.SelfTest
else
python -m Crypto.SelfTest
fi