crypto_box_easy support #513
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: {} | |
push: | |
branches: | |
- main | |
- '*.x' | |
tags: | |
- '*' | |
jobs: | |
linux: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
PYTHON: | |
- {VERSION: "3.12", TOXENV: "docs", COVERAGE: "false"} | |
- {VERSION: "3.12", TOXENV: "meta", COVERAGE: "false"} | |
- {VERSION: "3.12", TOXENV: "mypy", COVERAGE: "false"} | |
- {VERSION: "pypy-3.9", TOXENV: "pypy3"} | |
- {VERSION: "pypy-3.10", TOXENV: "pypy3"} | |
- {VERSION: "3.7", TOXENV: "py37"} | |
- {VERSION: "3.8", TOXENV: "py38"} | |
- {VERSION: "3.9", TOXENV: "py39"} | |
- {VERSION: "3.10", TOXENV: "py310"} | |
- {VERSION: "3.11", TOXENV: "py311"} | |
- {VERSION: "3.12", TOXENV: "py312"} | |
- {VERSION: "3.12", TOXENV: "py312", NOTE: "system", SODIUM_INSTALL: "system"} | |
- {VERSION: "3.12", TOXENV: "py312", NOTE: "minimal", SODIUM_INSTALL_MINIMAL: "1"} | |
name: "Linux ${{ matrix.PYTHON.TOXENV }} ${{ matrix.PYTHON.NOTE }}" | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.PYTHON.VERSION }} | |
- name: Install tox and coverage | |
run: pip install tox coverage | |
- name: Install libsodium (system install only) | |
run: | | |
wget --timeout=60 https://download.libsodium.org/libsodium/releases/LATEST.tar.gz || \ | |
wget --timeout=60 https://download.libsodium.org/libsodium/releases/LATEST.tar.gz | |
tar zxvf LATEST.tar.gz | |
cd libsodium-* | |
./configure ${SODIUM_INSTALL_MINIMAL:+--enable-minimal} | |
make | |
make check | |
sudo make install | |
sudo ldconfig | |
env: | |
SODIUM_INSTALL_MINIMAL: ${{ matrix.PYTHON.SODIUM_INSTALL_MINIMAL }} | |
if: matrix.PYTHON.SODIUM_INSTALL == 'system' | |
- name: Run tests | |
run: LIBSODIUM_MAKE_ARGS="-j$(nproc)" tox | |
env: | |
TOXENV: ${{ matrix.PYTHON.TOXENV }} | |
SODIUM_INSTALL_MINIMAL: ${{ matrix.PYTHON.SODIUM_INSTALL_MINIMAL }} | |
SODIUM_INSTALL: ${{ matrix.PYTHON.SODIUM_INSTALL }} | |
- name: Upload coverage | |
run: | | |
curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash | |
bash codecov.sh -n "Python ${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.NOTE }} on macOS" | |
if: matrix.PYTHON.COVERAGE != 'false' | |
macos: | |
runs-on: ${{ matrix.RUNNER }} | |
strategy: | |
matrix: | |
RUNNER: | |
- 'macos-13' | |
- 'macos-latest' | |
PYTHON: | |
- {VERSION: "3.7", TOXENV: "py37"} | |
- {VERSION: "3.12", TOXENV: "py312"} | |
- {VERSION: "3.12", TOXENV: "py312", NOTE: " (minimal build)", SODIUM_INSTALL_MINIMAL: "1"} | |
exclude: | |
- PYTHON: {VERSION: "3.7", TOXENV: "py37"} | |
RUNNER: macos-latest | |
name: "Python ${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.NOTE }} on ${{ matrix.RUNNER }}" | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.PYTHON.VERSION }} | |
- name: Install tox and coverage | |
run: pip install tox coverage | |
- name: Run tests | |
run: LIBSODIUM_MAKE_ARGS="-j$(sysctl -n hw.ncpu)" tox | |
env: | |
TOXENV: ${{ matrix.PYTHON.TOXENV }} | |
SODIUM_INSTALL_MINIMAL: ${{ matrix.PYTHON.SODIUM_INSTALL_MINIMAL }} | |
- name: Upload coverage | |
run: | | |
curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash | |
bash codecov.sh -n "Python ${{ matrix.PYTHON.VERSION }}${{ matrix.PYTHON.NOTE }} on macOS" | |
windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
WINDOWS: | |
- {ARCH: 'x86', SODIUM_ARCH: 'Win32'} | |
- {ARCH: 'x64', SODIUM_ARCH: 'x64'} | |
PYTHON: | |
- {VERSION: "3.7", TOXENV: "py37", SODIUM_MSVC_VERSION: "v142"} | |
- {VERSION: "3.8", TOXENV: "py38", SODIUM_MSVC_VERSION: "v142"} | |
- {VERSION: "3.9", TOXENV: "py39", SODIUM_MSVC_VERSION: "v142"} | |
- {VERSION: "3.10", TOXENV: "py310", SODIUM_MSVC_VERSION: "v142"} | |
- {VERSION: "3.11", TOXENV: "py311", SODIUM_MSVC_VERSION: "v142"} | |
- {VERSION: "3.12", TOXENV: "py312", SODIUM_MSVC_VERSION: "v142"} | |
name: "Python ${{ matrix.PYTHON.VERSION }} on Windows ${{ matrix.WINDOWS.ARCH }}" | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.PYTHON.VERSION }} | |
architecture: ${{ matrix.WINDOWS.ARCH }} | |
- name: 'Extract libsodium libraries' | |
run: | | |
Expand-Archive src/libsodium-1.0.20-stable-msvc.zip -DestinationPath c:\ | |
shell: powershell | |
- name: Install tox and coverage | |
run: pip install tox coverage | |
- name: Run tests | |
run: | | |
set PYNACL_SODIUM_LIBRARY_NAME=sodium | |
set PYNACL_SODIUM_STATIC=1 | |
set SODIUM_INSTALL=system | |
set INCLUDE=C:/libsodium/include;%INCLUDE% | |
set LIB=C:/libsodium/${{ matrix.WINDOWS.SODIUM_ARCH }}/release/${{ matrix.PYTHON.SODIUM_MSVC_VERSION }}/static;%LIB% | |
tox | |
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL% | |
env: | |
TOXENV: ${{ matrix.PYTHON.TOXENV }} | |
shell: cmd | |
- name: Upload coverage | |
run: | | |
curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash | |
bash codecov.sh -n "Python ${{ matrix.PYTHON.VERSION }} on Windows ${{ matrix.WINDOWS.ARCH }}" |