Skip to content

Commit

Permalink
Merge branch 'main' into 0.15
Browse files Browse the repository at this point in the history
We just made main the 0.15.2 release. Let's merge it into the 0.15
branch so that branch is current.
  • Loading branch information
indygreg committed Feb 27, 2021
2 parents bd94614 + 1b841cf commit eee4030
Show file tree
Hide file tree
Showing 65 changed files with 10,053 additions and 5,407 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-apple-darwin]
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
54 changes: 54 additions & 0 deletions .github/workflows/external-zstd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on:
push:
pull_request:
schedule:
- cron: '13 4 * * *'
jobs:
linux:
runs-on: 'ubuntu-20.04'
env:
# Make all compile warnings fatal.
ZSTD_WARNINGS_AS_ERRORS: '1'
# Activate Python development mode so we get warnings.
PYTHONDEVMODE: '1'

steps:
- name: System Setup
run: |
sudo apt-get install -y libzstd1 libzstd-dev python3-cffi
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- uses: actions/checkout@v2

- name: Build
run: |
python setup.py --system-zstd install
macOS:
runs-on: 'macos-10.15'
env:
# Make all compile warnings fatal.
ZSTD_WARNINGS_AS_ERRORS: '1'
# Activate Python development mode so we get warnings.
PYTHONDEVMODE: '1'

steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: System Setup
run: |
brew install -v zstd
python -m pip install cffi
- uses: actions/checkout@v2

- name: Build
run: |
python setup.py --system-zstd install
93 changes: 93 additions & 0 deletions .github/workflows/pypy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
on:
push:
pull_request:
schedule:
- cron: '13 4 * * *'
jobs:
wheel:
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-20.04'
- 'macos-10.15'
- 'windows-2019'
py:
- 'pypy-3.6'
- 'pypy-3.7'
arch:
- 'x86'
- 'x64'
exclude:
- os: 'ubuntu-20.04'
arch: 'x86'
- os: 'macos-10.15'
arch: 'x86'
runs-on: ${{ matrix.os }}
env:
# Make all compile warnings fatal.
ZSTD_WARNINGS_AS_ERRORS: '1'
# Activate Python development mode so we get warnings.
PYTHONDEVMODE: '1'
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
architecture: ${{ matrix.arch }}

- uses: actions/checkout@v2

- name: Build
run: |
python setup.py install
test:
strategy:
fail-fast: false
matrix:
os:
- 'ubuntu-20.04'
- 'macos-10.15'
- 'windows-2019'
py:
- 'pypy-3.6'
- 'pypy-3.7'
arch:
- 'x86'
- 'x64'
exclude:
- os: 'ubuntu-20.04'
arch: 'x86'
- os: 'macos-10.15'
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@v2
with:
python-version: ${{ matrix.py }}
architecture: ${{ matrix.arch }}

- uses: actions/checkout@v2

- name: Install Dependencies
run: |
pip install --require-hashes -r ci/requirements.pypy.txt
- name: Build
run: |
python setup.py develop
- name: Test
run: |
pytest --numprocesses=auto -v tests/
23 changes: 22 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,27 @@ jobs:
python-version: ${{ matrix.py }}
architecture: ${{ matrix.arch }}

- name: Install Rust
if: matrix.py != '3.5' && matrix.arch == 'x64'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
profile: minimal

- uses: actions/checkout@v2

- name: Install Dependencies
run: |
pip install --require-hashes -r ci/requirements.txt
- name: Build
- name: Build (Rust)
if: matrix.py != '3.5' && matrix.arch == 'x64'
run: |
python setup.py --rust-backend develop
- name: Build (No Rust)
if: matrix.py == '3.5' || matrix.arch != 'x64'
run: |
python setup.py develop
Expand All @@ -63,3 +77,10 @@ jobs:
PYTHON_ZSTANDARD_IMPORT_POLICY: 'cffi'
run: |
pytest --numprocesses=auto -v tests/
- name: Test Rust Backend
if: matrix.py != '3.5' && matrix.arch == 'x64'
env:
PYTHON_ZSTANDARD_IMPORT_POLICY: 'rust'
run: |
pytest --numprocesses=auto -v tests/
26 changes: 26 additions & 0 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,15 @@ jobs:
- 'cp37-*'
- 'cp38-*'
- 'cp39-*'
arch: ['x86_64']
include:
- py: 'cp38-*'
arch: 'arm64'
- py: 'cp39-*'
arch: 'arm64'
runs-on: 'macos-10.15'
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BUILD: ${{ matrix.py }}
CIBW_BUILD_VERBOSITY: '1'
ZSTD_WARNINGS_AS_ERRORS: '1'
Expand All @@ -52,16 +59,35 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.8'
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}

- uses: actions/checkout@v2

- name: Install Dependencies
run: |
pip install --require-hashes -r ci/requirements.macoswheels.txt
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}

- name: Install Dependencies
run: |
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user --require-hashes -r ci/requirements.macoswheels.txt
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user wheel
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }}

- name: Build Wheel
run: |
cibuildwheel --output-dir dist
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}

- name: Build Wheel
run: |
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/python3 setup.py bdist_wheel
env:
_PYTHON_HOST_PLATFORM: 'macosx-11.0-arm64'
ARCHFLAGS: '-arch arm64'
MACOSX_DEPLOYMENT_TARGET: '11.0'
SDKROOT: '/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk'
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }}

- name: Upload Wheel
uses: actions/upload-artifact@v2
Expand Down
Loading

0 comments on commit eee4030

Please sign in to comment.