-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a manylinux wheel for linux builds
- Loading branch information
Showing
6 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,9 +32,6 @@ jobs: | |
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 6.0 | ||
- name: Install libbson | ||
run: | | ||
LIBBSON_INSTALL_DIR=$(pwd)/libbson ./build-libbson.sh | ||
- name: Install Python dependencies | ||
run: | | ||
python -m pip install -U pip | ||
|
@@ -60,14 +57,15 @@ jobs: | |
# the current target that this PR will be merged into is HEAD^1. | ||
git update-ref refs/bm/merge-target $(git log -n 1 --pretty=format:"%H" main --) | ||
git checkout --force refs/bm/pr -- | ||
# Install the library | ||
LIBBSON_INSTALL_DIR=$(pwd)/libbson python -m pip install -e ".[test]" | ||
# Build and install the manylinux wheel | ||
bash ./build-manylinux-wheel.sh | ||
pip install dist/*.whl | ||
run_asv | ||
git checkout --force refs/bm/merge-target -- | ||
# Install the library | ||
LIBBSON_INSTALL_DIR=$(pwd)/libbson python -m pip install -e ".[test]" | ||
# Build and install the manylinux wheel | ||
bash ./build-manylinux-wheel.sh | ||
pip install dist/*.whl | ||
run_asv | ||
- name: Compare benchmarks | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,11 +28,10 @@ jobs: | |
extra_args: --all-files --hook-stage=manual | ||
|
||
build: | ||
# supercharge/mongodb-github-action requires containers so we don't test other platforms | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-20.04", "macos-latest", "windows-latest"] | ||
os: ["macos-latest", "windows-latest"] | ||
python-version: [3.8, 3.9, "3.10", "3.11"] | ||
fail-fast: false | ||
name: CPython ${{ matrix.python-version }}-${{ matrix.os }} | ||
|
@@ -49,12 +48,6 @@ jobs: | |
run: | | ||
echo "LIBBSON_INSTALL_DIR=$PWD/libbson" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=$PWD/libbson/lib" >> $GITHUB_ENV | ||
- name: Start MongoDB on Linux | ||
if: ${{ startsWith(runner.os, 'Linux') }} | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.4 | ||
mongodb-replica-set: test-rs | ||
- name: Start MongoDB on MacOS | ||
if: ${{ startsWith(runner.os, 'macOS') }} | ||
run: | | ||
|
@@ -89,13 +82,38 @@ jobs: | |
- name: Run the tests | ||
run: | | ||
python -m pytest -v | ||
build-linux: | ||
runs-on: ubuntu-latest | ||
name: CPython Ubuntu | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: 'pip' | ||
cache-dependency-path: 'bindings/python/pyproject.toml' | ||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.4 | ||
mongodb-replica-set: test-rs | ||
- name: Build and install package and test deps | ||
run: | | ||
bash build-manylinux-wheel.sh | ||
pip install dist/*.whl | ||
pip install pytz pytest | ||
- name: Run the tests | ||
run: | | ||
python -m pytest -v | ||
- name: Check the manifest | ||
run: | | ||
pip install check-manifest | ||
check-manifest -v | ||
docs: | ||
runs-on: ubuntu-latest | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache conda | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -ex | ||
cd /src | ||
LIBBSON_INSTALL_DIR=$(pwd)/libbson | ||
rm -rf $LIBBSON_INSTALL_DIR | ||
./build-libbson.sh | ||
rm -rf build dist | ||
PYTHON=/opt/python/cp311-cp311/bin/python | ||
$PYTHON -m pip install build | ||
$PYTHON -m build --wheel . | ||
rm -rf $LIBBSON_INSTALL_DIR | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash -ex | ||
|
||
set -o xtrace | ||
set -o errexit | ||
|
||
image="quay.io/pypa/manylinux2014_x86_64" | ||
docker pull $image | ||
docker run --rm -v "`pwd`:/src" $image /src/build-manylinux-wheel-internal.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters