1515 strategy :
1616 matrix :
1717 PYTHON :
18- - {VERSION: "3.9", TOXENV: "pep8,packaging,docs", COVERAGE: "false"}
18+ - {VERSION: "3.9", TOXENV: "pep8,rust, packaging,docs", COVERAGE: "false"}
1919 - {VERSION: "pypy3", TOXENV: "pypy3"}
2020 - {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "openssl", VERSION: "1.1.0l"}}
2121 - {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "openssl", VERSION: "1.1.1i"}}
2626 - {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.1.5"}}
2727 - {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.2.3"}}
2828 - {VERSION: "3.9", TOXENV: "py39", OPENSSL: {TYPE: "libressl", VERSION: "3.3.1"}}
29+ RUST :
30+ - stable
2931 name : " ${{ matrix.PYTHON.TOXENV }} ${{ matrix.PYTHON.OPENSSL.TYPE }} ${{ matrix.PYTHON.OPENSSL.VERSION }} ${{ matrix.PYTHON.OPENSSL.CONFIG_FLAGS }}"
3032 timeout-minutes : 30
3133 steps :
3436 uses : actions/setup-python@v2.2.1
3537 with :
3638 python-version : ${{ matrix.PYTHON.VERSION }}
39+ - uses : actions-rs/toolchain@v1
40+ with :
41+ profile : minimal
42+ toolchain : ${{ matrix.RUST }}
43+ override : true
44+ default : true
3745 - run : git clone --depth=1 https://github.com/google/wycheproof
3846 - run : python -m pip install tox requests coverage
3947 - name : Compute config hash and set config vars
@@ -107,17 +115,56 @@ jobs:
107115 - run : ' tox -- --wycheproof-root="$HOME/wycheproof"'
108116 env :
109117 TOXENV : ${{ matrix.IMAGE.TOXENV }}
118+ RUSTUP_HOME : /root/.rustup
110119 - uses : ./.github/actions/upload-coverage
111120 with :
112121 name : " ${{ matrix.IMAGE.TOXENV }} on ${{ matrix.IMAGE.IMAGE }}"
113122
123+ linux-rust :
124+ runs-on : ubuntu-latest
125+ strategy :
126+ matrix :
127+ PYTHON :
128+ - {VERSION: "3.9", TOXENV: "py39"}
129+ RUST :
130+ # Cover MSRV and in-dev versions
131+ - 1.45.0
132+ - beta
133+ - nightly
134+ name : " ${{ matrix.PYTHON.TOXENV }} with Rust ${{ matrix.RUST }}"
135+ timeout-minutes : 30
136+ steps :
137+ - uses : actions/checkout@v2
138+ - name : Setup python
139+ uses : actions/setup-python@v2.2.1
140+ with :
141+ python-version : ${{ matrix.PYTHON.VERSION }}
142+ - uses : actions-rs/toolchain@v1
143+ with :
144+ profile : minimal
145+ toolchain : ${{ matrix.RUST }}
146+ override : true
147+ default : true
148+ - run : git clone --depth=1 https://github.com/google/wycheproof
149+ - run : python -m pip install tox coverage
150+ - name : Tests
151+ run : |
152+ tox -r -- --color=yes --wycheproof-root=wycheproof
153+ env :
154+ TOXENV : ${{ matrix.PYTHON.TOXENV }}
155+ - uses : ./.github/actions/upload-coverage
156+ with :
157+ name : " ${{ matrix.PYTHON.TOXENV }} with Rust ${{ matrix.RUST }}"
158+
114159 macos :
115160 runs-on : macos-latest
116161 strategy :
117162 matrix :
118163 PYTHON :
119164 - {VERSION: "3.6", TOXENV: "py36", EXTRA_CFLAGS: ""}
120165 - {VERSION: "3.9", TOXENV: "py39", EXTRA_CFLAGS: "-DUSE_OSRANDOM_RNG_FOR_TESTING"}
166+ RUST :
167+ - stable
121168 name : " ${{ matrix.PYTHON.TOXENV }} on macOS"
122169 timeout-minutes : 30
123170 steps :
@@ -126,6 +173,12 @@ jobs:
126173 uses : actions/setup-python@v2.2.1
127174 with :
128175 python-version : ${{ matrix.PYTHON.VERSION }}
176+ - uses : actions-rs/toolchain@v1
177+ with :
178+ profile : minimal
179+ toolchain : ${{ matrix.RUST }}
180+ override : true
181+ default : true
129182
130183 - run : python -m pip install tox requests coverage
131184
@@ -155,11 +208,13 @@ jobs:
155208 strategy :
156209 matrix :
157210 WINDOWS :
158- - {ARCH: 'x86', WINDOWS: 'win32'}
159- - {ARCH: 'x64', WINDOWS: 'win64'}
211+ - {ARCH: 'x86', WINDOWS: 'win32', RUST_TRIPLE: 'i686-pc-windows-msvc' }
212+ - {ARCH: 'x64', WINDOWS: 'win64', RUST_TRIPLE: 'x86_64-pc-windows-msvc' }
160213 PYTHON :
161214 - {VERSION: "3.6", TOXENV: "py36", MSVC_VERSION: "2019", CL_FLAGS: ""}
162215 - {VERSION: "3.9", TOXENV: "py39", MSVC_VERSION: "2019", CL_FLAGS: "/D USE_OSRANDOM_RNG_FOR_TESTING"}
216+ RUST :
217+ - stable
163218 JOB_NUMBER : [0, 1, 2, 3]
164219 name : " ${{ matrix.PYTHON.TOXENV }} on ${{ matrix.WINDOWS.WINDOWS }} (part ${{ matrix.JOB_NUMBER }})"
165220 timeout-minutes : 30
@@ -170,6 +225,13 @@ jobs:
170225 with :
171226 python-version : ${{ matrix.PYTHON.VERSION }}
172227 architecture : ${{ matrix.WINDOWS.ARCH }}
228+ - uses : actions-rs/toolchain@v1
229+ with :
230+ profile : minimal
231+ toolchain : ${{ matrix.RUST }}
232+ override : true
233+ default : true
234+ target : ${{ matrix.WINDOWS.RUST_TRIPLE }}
173235
174236 - run : python -m pip install tox requests coverage
175237 - name : Download OpenSSL
@@ -203,14 +265,24 @@ jobs:
203265 - dynamodb-encryption-sdk
204266 - certbot
205267 - certbot-josepy
268+ RUST :
269+ - stable
270+ PYTHON :
271+ - 3.7
206272 name : " Downstream tests for ${{ matrix.DOWNSTREAM }}"
207273 timeout-minutes : 30
208274 steps :
209275 - uses : actions/checkout@v2
210276 - name : Setup python
211277 uses : actions/setup-python@v2.2.1
212278 with :
213- python-version : 3.7
279+ python-version : ${{ matrix.PYTHON }}
280+ - uses : actions-rs/toolchain@v1
281+ with :
282+ profile : minimal
283+ toolchain : ${{ matrix.RUST }}
284+ override : true
285+ default : true
214286 - run : python -m pip install -U pip wheel
215287 - run : ./.github/downstream.d/${{ matrix.DOWNSTREAM }}.sh install
216288 - run : pip uninstall -y enum34
@@ -228,6 +300,12 @@ jobs:
228300 uses : actions/setup-python@v2.2.1
229301 with :
230302 python-version : 3.9
303+ - uses : actions-rs/toolchain@v1
304+ with :
305+ profile : minimal
306+ toolchain : stable
307+ override : true
308+ default : true
231309 - run : python -m pip install -U tox
232310 - run : tox -r -- --color=yes
233311 env :
0 commit comments