Skip to content

Commit

Permalink
Adjust auditwheel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Sep 17, 2021
1 parent 64db2a6 commit 4c21688
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,12 @@ jobs:
entrypoint: /bin/bash
args: -c "PATH=/github/workspace/.cargo/bin:$PATH tests/manylinux_compliant.sh ${{ matrix.manylinux }}"

- name: Incompliant Build
if: matrix.manylinux == '2010'
uses: docker://quay.io/pypa/manylinux2010_x86_64
with:
entrypoint: /bin/bash
args: -c "PATH=/github/workspace/.cargo/bin:$PATH tests/manylinux_incompliant.sh ${{ matrix.manylinux }}"
- name: Incompliant Build
if: matrix.manylinux == '2014'
uses: docker://quay.io/pypa/manylinux2014_x86_64
Expand Down
38 changes: 21 additions & 17 deletions tests/manylinux_incompliant.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
#!/bin/bash

# Fail because we're running in manylinux2014, which can't build for manylinux 2010
for PYBIN in /opt/python/cp3[6]*/bin; do
if cargo run -- build --no-sdist -m test-crates/pyo3-mixed/Cargo.toml -i "${PYBIN}/python" --manylinux 2010 -o dist; then
echo "maturin build unexpectedly succeeded"
exit 1
else
echo "maturin build failed as expected"
fi
done
if [[ "$1" == "2014" ]]; then
for PYBIN in /opt/python/cp3[6]*/bin; do
if cargo run -- build --no-sdist -m test-crates/pyo3-mixed/Cargo.toml -i "${PYBIN}/python" --manylinux 2010 -o dist; then
echo "maturin build unexpectedly succeeded"
exit 1
else
echo "maturin build failed as expected"
fi
done
fi

# Fail because we're linking zlib, which is not allowed in manylinux
yum install -y zlib-devel
for PYBIN in /opt/python/cp3[6]*/bin; do
if cargo run -- build --no-sdist -m test-crates/lib_with_disallowed_lib/Cargo.toml -i "${PYBIN}/python" --manylinux 2014 -o dist; then
echo "maturin build unexpectedly succeeded"
exit 1
else
echo "maturin build failed as expected"
fi
done
if [[ "$1" == "2010" ]]; then
yum install -y zlib-devel
for PYBIN in /opt/python/cp3[6]*/bin; do
if cargo run -- build --no-sdist -m test-crates/lib_with_disallowed_lib/Cargo.toml -i "${PYBIN}/python" --manylinux 2010 -o dist; then
echo "maturin build unexpectedly succeeded"
exit 1
else
echo "maturin build failed as expected"
fi
done
fi

0 comments on commit 4c21688

Please sign in to comment.