Skip to content

Commit eee4030

Browse files
committed
Merge branch 'main' into 0.15
We just made main the 0.15.2 release. Let's merge it into the 0.15 branch so that branch is current.
2 parents bd94614 + 1b841cf commit eee4030

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+10053
-5407
lines changed

.cargo/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.x86_64-apple-darwin]
2+
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]

.github/workflows/external-zstd.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
pull_request:
4+
schedule:
5+
- cron: '13 4 * * *'
6+
jobs:
7+
linux:
8+
runs-on: 'ubuntu-20.04'
9+
env:
10+
# Make all compile warnings fatal.
11+
ZSTD_WARNINGS_AS_ERRORS: '1'
12+
# Activate Python development mode so we get warnings.
13+
PYTHONDEVMODE: '1'
14+
15+
steps:
16+
- name: System Setup
17+
run: |
18+
sudo apt-get install -y libzstd1 libzstd-dev python3-cffi
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: '3.9'
24+
25+
- uses: actions/checkout@v2
26+
27+
- name: Build
28+
run: |
29+
python setup.py --system-zstd install
30+
31+
macOS:
32+
runs-on: 'macos-10.15'
33+
env:
34+
# Make all compile warnings fatal.
35+
ZSTD_WARNINGS_AS_ERRORS: '1'
36+
# Activate Python development mode so we get warnings.
37+
PYTHONDEVMODE: '1'
38+
39+
steps:
40+
- name: Set up Python
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: '3.9'
44+
45+
- name: System Setup
46+
run: |
47+
brew install -v zstd
48+
python -m pip install cffi
49+
50+
- uses: actions/checkout@v2
51+
52+
- name: Build
53+
run: |
54+
python setup.py --system-zstd install

.github/workflows/pypy.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
on:
2+
push:
3+
pull_request:
4+
schedule:
5+
- cron: '13 4 * * *'
6+
jobs:
7+
wheel:
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os:
12+
- 'ubuntu-20.04'
13+
- 'macos-10.15'
14+
- 'windows-2019'
15+
py:
16+
- 'pypy-3.6'
17+
- 'pypy-3.7'
18+
arch:
19+
- 'x86'
20+
- 'x64'
21+
exclude:
22+
- os: 'ubuntu-20.04'
23+
arch: 'x86'
24+
- os: 'macos-10.15'
25+
arch: 'x86'
26+
runs-on: ${{ matrix.os }}
27+
env:
28+
# Make all compile warnings fatal.
29+
ZSTD_WARNINGS_AS_ERRORS: '1'
30+
# Activate Python development mode so we get warnings.
31+
PYTHONDEVMODE: '1'
32+
steps:
33+
- name: Set up Python
34+
uses: actions/setup-python@v2
35+
with:
36+
python-version: ${{ matrix.py }}
37+
architecture: ${{ matrix.arch }}
38+
39+
- uses: actions/checkout@v2
40+
41+
- name: Build
42+
run: |
43+
python setup.py install
44+
45+
test:
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os:
50+
- 'ubuntu-20.04'
51+
- 'macos-10.15'
52+
- 'windows-2019'
53+
py:
54+
- 'pypy-3.6'
55+
- 'pypy-3.7'
56+
arch:
57+
- 'x86'
58+
- 'x64'
59+
exclude:
60+
- os: 'ubuntu-20.04'
61+
arch: 'x86'
62+
- os: 'macos-10.15'
63+
arch: 'x86'
64+
runs-on: ${{ matrix.os }}
65+
env:
66+
# Enable fuzzing tests, other expensive tests.
67+
ZSTD_SLOW_TESTS: '1'
68+
# Make all compile warnings fatal.
69+
ZSTD_WARNINGS_AS_ERRORS: '1'
70+
# More thorough fuzzing coverage.
71+
HYPOTHESIS_PROFILE: 'ci'
72+
# Activate Python development mode so we get warnings.
73+
PYTHONDEVMODE: '1'
74+
steps:
75+
- name: Set up Python
76+
uses: actions/setup-python@v2
77+
with:
78+
python-version: ${{ matrix.py }}
79+
architecture: ${{ matrix.arch }}
80+
81+
- uses: actions/checkout@v2
82+
83+
- name: Install Dependencies
84+
run: |
85+
pip install --require-hashes -r ci/requirements.pypy.txt
86+
87+
- name: Build
88+
run: |
89+
python setup.py develop
90+
91+
- name: Test
92+
run: |
93+
pytest --numprocesses=auto -v tests/

.github/workflows/test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,27 @@ jobs:
4444
python-version: ${{ matrix.py }}
4545
architecture: ${{ matrix.arch }}
4646

47+
- name: Install Rust
48+
if: matrix.py != '3.5' && matrix.arch == 'x64'
49+
uses: actions-rs/toolchain@v1
50+
with:
51+
toolchain: stable
52+
default: true
53+
profile: minimal
54+
4755
- uses: actions/checkout@v2
4856

4957
- name: Install Dependencies
5058
run: |
5159
pip install --require-hashes -r ci/requirements.txt
5260
53-
- name: Build
61+
- name: Build (Rust)
62+
if: matrix.py != '3.5' && matrix.arch == 'x64'
63+
run: |
64+
python setup.py --rust-backend develop
65+
66+
- name: Build (No Rust)
67+
if: matrix.py == '3.5' || matrix.arch != 'x64'
5468
run: |
5569
python setup.py develop
5670
@@ -63,3 +77,10 @@ jobs:
6377
PYTHON_ZSTANDARD_IMPORT_POLICY: 'cffi'
6478
run: |
6579
pytest --numprocesses=auto -v tests/
80+
81+
- name: Test Rust Backend
82+
if: matrix.py != '3.5' && matrix.arch == 'x64'
83+
env:
84+
PYTHON_ZSTANDARD_IMPORT_POLICY: 'rust'
85+
run: |
86+
pytest --numprocesses=auto -v tests/

.github/workflows/wheel.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ jobs:
4242
- 'cp37-*'
4343
- 'cp38-*'
4444
- 'cp39-*'
45+
arch: ['x86_64']
46+
include:
47+
- py: 'cp38-*'
48+
arch: 'arm64'
49+
- py: 'cp39-*'
50+
arch: 'arm64'
4551
runs-on: 'macos-10.15'
4652
env:
53+
CIBW_ARCHS: ${{ matrix.arch }}
4754
CIBW_BUILD: ${{ matrix.py }}
4855
CIBW_BUILD_VERBOSITY: '1'
4956
ZSTD_WARNINGS_AS_ERRORS: '1'
@@ -52,16 +59,35 @@ jobs:
5259
uses: actions/setup-python@v2
5360
with:
5461
python-version: '3.8'
62+
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}
5563

5664
- uses: actions/checkout@v2
5765

5866
- name: Install Dependencies
5967
run: |
6068
pip install --require-hashes -r ci/requirements.macoswheels.txt
69+
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}
70+
71+
- name: Install Dependencies
72+
run: |
73+
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user --require-hashes -r ci/requirements.macoswheels.txt
74+
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user wheel
75+
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }}
6176

6277
- name: Build Wheel
6378
run: |
6479
cibuildwheel --output-dir dist
80+
if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }}
81+
82+
- name: Build Wheel
83+
run: |
84+
/Applications/Xcode_12.2.app/Contents/Developer/usr/bin/python3 setup.py bdist_wheel
85+
env:
86+
_PYTHON_HOST_PLATFORM: 'macosx-11.0-arm64'
87+
ARCHFLAGS: '-arch arm64'
88+
MACOSX_DEPLOYMENT_TARGET: '11.0'
89+
SDKROOT: '/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk'
90+
if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }}
6591

6692
- name: Upload Wheel
6793
uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)