Skip to content

Ubuntu container with Python 2.7 #696

Ubuntu container with Python 2.7

Ubuntu container with Python 2.7 #696

Workflow file for this run

name: Integration test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11" ]
cffi: [ yes, no ]
os: [ ubuntu-20.04 ]
include:
- python-version: "3.11"
cffi: yes
os: macos-12
- python-version: "3.11"
cffi: no
os: windows-latest
- python-version: "3.11"
cffi: yes
os: windows-latest
- python-version: pypy2.7
cffi: no
os: ubuntu-latest
- python-version: pypy3.8
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 MSVC
# if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
# uses: ilammy/msvc-dev-cmd@v1
#- name: Prepare environmental variables
# if: matrix.os == 'windows-latest' && matrix.python-version == '2.7'
# shell: bash
# run: |
# echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
# echo "MSSdk=1" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install pycryptodome-test-vectors
- name: Test
run: |
python -bb setup.py test
build_python_27_ubuntu:
runs-on: ubuntu-20.04
container:
image: python:2.7.18-buster
strategy:
matrix:
cffi: [ yes, no ]
env:
CFLAGS: "-Wconversion"
steps:
- uses: actions/checkout@v3
- 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
run: |
pip install pycryptodome-test-vectors
- name: Test
run: |
python -bb setup.py test
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 pycryptodome-test-vectors
- name: Test
run: |
mypy 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.11"
uses: actions/setup-python@v4
with:
python-version: "3.11"
- 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