mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-07-29 17:39:49 +03:00
Try again
This commit is contained in:
parent
eba27a50b5
commit
9fee3079b5
2
.github/workflows/m1.yml
vendored
2
.github/workflows/m1.yml
vendored
|
@ -39,7 +39,7 @@ jobs:
|
||||||
name: packages_macos_arm64
|
name: packages_macos_arm64
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
prjdir="$( cd "${dir}/../.." && pwd )"
|
prjdir="$(cd "${dir}/../.." && pwd)"
|
||||||
|
|
||||||
brew install gnu-sed postgresql@13
|
brew install gnu-sed postgresql@13
|
||||||
|
|
||||||
|
@ -17,13 +17,13 @@ brew install gnu-sed postgresql@13
|
||||||
brew services start postgresql
|
brew services start postgresql
|
||||||
|
|
||||||
for i in $(seq 10 -1 0); do
|
for i in $(seq 10 -1 0); do
|
||||||
eval pg_isready && break
|
eval pg_isready && break
|
||||||
if [ $i == 0 ]; then
|
if [ $i == 0 ]; then
|
||||||
echo "PostgreSQL service not ready, giving up"
|
echo "PostgreSQL service not ready, giving up"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "PostgreSQL service not ready, waiting a bit, attempts left: $i"
|
echo "PostgreSQL service not ready, waiting a bit, attempts left: $i"
|
||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
# Find psycopg version
|
# Find psycopg version
|
||||||
|
@ -57,21 +57,24 @@ cp ${wheeldir}/*.whl ${distdir}
|
||||||
# kill the libpq to make sure tests don't depend on it
|
# kill the libpq to make sure tests don't depend on it
|
||||||
mv "$LIBPQ" "${LIBPQ}-bye"
|
mv "$LIBPQ" "${LIBPQ}-bye"
|
||||||
|
|
||||||
# Install and test the built wheel
|
# XXX: Move this code into a test script
|
||||||
pip install ${PACKAGE_NAME:-psycopg2} --no-index -f "$distdir"
|
if [[ $(uname -m) != 'arm64' ]]; then
|
||||||
|
# Install and test the built wheel
|
||||||
|
pip install ${PACKAGE_NAME:-psycopg2} --no-index -f "$distdir"
|
||||||
|
|
||||||
# Print psycopg and libpq versions
|
# Print psycopg and libpq versions
|
||||||
python -c "import psycopg2; print(psycopg2.__version__)"
|
python -c "import psycopg2; print(psycopg2.__version__)"
|
||||||
python -c "import psycopg2; print(psycopg2.__libpq_version__)"
|
python -c "import psycopg2; print(psycopg2.__libpq_version__)"
|
||||||
python -c "import psycopg2; print(psycopg2.extensions.libpq_version())"
|
python -c "import psycopg2; print(psycopg2.extensions.libpq_version())"
|
||||||
|
|
||||||
# fail if we are not using the expected libpq library
|
# fail if we are not using the expected libpq library
|
||||||
# Disabled as we just use what's available on the system on macOS
|
# Disabled as we just use what's available on the system on macOS
|
||||||
# if [[ "${WANT_LIBPQ:-}" ]]; then
|
# if [[ "${WANT_LIBPQ:-}" ]]; then
|
||||||
# python -c "import psycopg2, sys; sys.exit(${WANT_LIBPQ} != psycopg2.extensions.libpq_version())"
|
# python -c "import psycopg2, sys; sys.exit(${WANT_LIBPQ} != psycopg2.extensions.libpq_version())"
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
python -c "import tests; tests.unittest.main(defaultTest='tests.test_suite')"
|
||||||
|
fi
|
||||||
|
|
||||||
# just because I'm a boy scout
|
# just because I'm a boy scout
|
||||||
mv "${LIBPQ}-bye" "$LIBPQ"
|
mv "${LIBPQ}-bye" "$LIBPQ"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user