.github/workflows/test.yml #1198
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
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '30 13 * * *' | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'ubuntu-22.04' | |
- 'macos-12' | |
- 'windows-2022' | |
py: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
arch: | |
- 'x86' | |
- 'x64' | |
exclude: | |
- os: 'ubuntu-22.04' | |
arch: 'x86' | |
- os: 'macos-12' | |
arch: 'x86' | |
runs-on: ${{ matrix.os }} | |
env: | |
# Enable fuzzing tests, other expensive tests. | |
ZSTD_SLOW_TESTS: '1' | |
# Make all compile warnings fatal. | |
ZSTD_WARNINGS_AS_ERRORS: '1' | |
# More thorough fuzzing coverage. | |
HYPOTHESIS_PROFILE: 'ci' | |
# Activate Python development mode so we get warnings. | |
PYTHONDEVMODE: '1' | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.py }} | |
architecture: ${{ matrix.arch }} | |
- name: Install Rust | |
if: matrix.arch == 'x64' | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies | |
shell: bash | |
run: | | |
python -m pip install --require-hashes -r ci/requirements.txt | |
- name: Build (Rust) | |
if: matrix.arch == 'x64' | |
run: | | |
python setup.py --rust-backend develop | |
- name: Build (No Rust) | |
if: matrix.arch != 'x64' | |
run: | | |
python setup.py develop | |
- name: Test C Backend | |
run: | | |
pytest --numprocesses=auto -v tests/ | |
- name: Test CFFI Backend | |
env: | |
PYTHON_ZSTANDARD_IMPORT_POLICY: 'cffi' | |
run: | | |
pytest --numprocesses=auto -v tests/ | |
- name: Test Rust Backend | |
if: matrix.arch == 'x64' | |
# Rust backend is currently experimental. So ignore failures in it. | |
continue-on-error: true | |
env: | |
PYTHON_ZSTANDARD_IMPORT_POLICY: 'rust' | |
run: | | |
pytest --numprocesses=auto -v tests/ |