##// END OF EJS Templates
fuzz: extract some common utilities and use modern C++ idioms...
fuzz: extract some common utilities and use modern C++ idioms Alex Gaynor suggested we should probably copy the left and right sides of diffs to new blocks so we can detect over-reads in the diffing code, and I agree. Once I got into that, I realized we should do things with C++17 idioms rather than keep using malloc() and free(). This change is the result. I tried to split it more than this and failed. Everything still compiles and works in the oss-fuzz container, so I think we can count on C++17 being available! Differential Revision: https://phab.mercurial-scm.org/D3675

File last commit:

r38031:6f5b4cee default
r38191:fa0ddd5e default
Show More
build-linux-wheels.sh
34 lines | 1.1 KiB | application/x-sh | BashLexer
#!/bin/bash
# This file is directly inspired by
# https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh
set -e -x
PYTHON_TARGETS=$(ls -d /opt/python/cp27*/bin)
# Create an user for the tests
useradd hgbuilder
# Bypass uid/gid problems
cp -R /src /io && chown -R hgbuilder:hgbuilder /io
# Compile wheels for Python 2.X
for PYBIN in $PYTHON_TARGETS; do
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels with
# auditwheel (https://github.com/pypa/auditwheel) repair.
# It also fix the ABI tag on the wheel making it pip installable.
for whl in wheelhouse/*.whl; do
auditwheel repair "$whl" -w /src/wheelhouse/
done
# Install packages and run the tests for all Python versions
cd /io/tests/
for PYBIN in $PYTHON_TARGETS; do
# Install mercurial wheel as root
"${PYBIN}/pip" install mercurial --no-index -f /src/wheelhouse
# But run tests as hgbuilder user (non-root)
su hgbuilder -c "\"${PYBIN}/python\" /io/tests/run-tests.py --with-hg=\"${PYBIN}/hg\" --blacklist=/io/contrib/packaging/linux-wheel-centos5-blacklist"
done