Skip to content

Commit 5e3ebf1

Browse files
committed
Merge branch 'master' of github.com:mongodb/mongo-python-driver
2 parents f7d4743 + 77087dd commit 5e3ebf1

20 files changed

+476
-240
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ task_groups:
962962
- ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/delete-vm.sh
963963
- func: "upload test results"
964964
setup_group_can_fail_task: true
965-
teardown_group_can_fail_task: true
965+
teardown_task_can_fail_task: true
966966
setup_group_timeout_secs: 1800
967967
tasks:
968968
- testazurekms-task
@@ -2220,9 +2220,9 @@ axes:
22202220
display_name: "RHEL 8.x"
22212221
run_on: rhel87-small
22222222
batchtime: 10080 # 7 days
2223-
- id: rhel80-fips
2224-
display_name: "RHEL 8.0 FIPS"
2225-
run_on: rhel80-fips
2223+
- id: rhel92-fips
2224+
display_name: "RHEL 9.2 FIPS"
2225+
run_on: rhel92-fips
22262226
batchtime: 10080 # 7 days
22272227
- id: ubuntu-22.04
22282228
display_name: "Ubuntu 22.04"
@@ -2596,7 +2596,7 @@ buildvariants:
25962596
- matrix_name: "tests-fips"
25972597
matrix_spec:
25982598
platform:
2599-
- rhel80-fips
2599+
- rhel92-fips
26002600
auth: "auth"
26012601
ssl: "ssl"
26022602
display_name: "${platform} ${auth} ${ssl}"

.github/workflows/codeql.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
branches: [ "master", "v*"]
66
tags: ['*']
77
pull_request:
8+
workflow_call:
9+
inputs:
10+
ref:
11+
required: true
12+
type: string
813
schedule:
914
- cron: '17 10 * * 2'
1015

@@ -35,6 +40,8 @@ jobs:
3540
steps:
3641
- name: Checkout repository
3742
uses: actions/checkout@v4
43+
with:
44+
ref: ${{ inputs.ref }}
3845
- uses: actions/setup-python@v3
3946

4047
# Initializes the CodeQL tools for scanning.

.github/workflows/dist.yml

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Python Dist
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+.[0-9]+"
7+
- "[0-9]+.[0-9]+.[0-9]+.post[0-9]+"
8+
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+"
9+
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
10+
workflow_dispatch:
11+
pull_request:
12+
workflow_call:
13+
14+
concurrency:
15+
group: dist-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
defaults:
19+
run:
20+
shell: bash -eux {0}
21+
22+
jobs:
23+
build_wheels:
24+
name: Build wheels for ${{ matrix.buildplat[1] }}
25+
runs-on: ${{ matrix.buildplat[0] }}
26+
strategy:
27+
# Ensure that a wheel builder finishes even if another fails
28+
fail-fast: false
29+
matrix:
30+
# Github Actions doesn't support pairing matrix values together, let's improvise
31+
# https://github.com/github/feedback/discussions/7835#discussioncomment-1769026
32+
buildplat:
33+
- [ubuntu-20.04, "manylinux_x86_64", "cp3*-manylinux_x86_64"]
34+
- [ubuntu-20.04, "manylinux_aarch64", "cp3*-manylinux_aarch64"]
35+
- [ubuntu-20.04, "manylinux_ppc64le", "cp3*-manylinux_ppc64le"]
36+
- [ubuntu-20.04, "manylinux_s390x", "cp3*-manylinux_s390x"]
37+
- [ubuntu-20.04, "manylinux_i686", "cp3*-manylinux_i686"]
38+
- [windows-2019, "win_amd6", "cp3*-win_amd64"]
39+
- [windows-2019, "win32", "cp3*-win32"]
40+
- [macos-14, "macos", "cp*-macosx_*"]
41+
42+
steps:
43+
- name: Checkout pymongo
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
47+
48+
- uses: actions/setup-python@v5
49+
with:
50+
cache: 'pip'
51+
python-version: 3.8
52+
cache-dependency-path: 'pyproject.toml'
53+
allow-prereleases: true
54+
55+
- name: Set up QEMU
56+
if: runner.os == 'Linux'
57+
uses: docker/setup-qemu-action@v3
58+
with:
59+
platforms: all
60+
61+
- name: Install cibuildwheel
62+
# Note: the default manylinux is manylinux2014
63+
run: |
64+
python -m pip install -U pip
65+
python -m pip install "cibuildwheel>=2.17,<3"
66+
67+
- name: Build wheels
68+
env:
69+
CIBW_BUILD: ${{ matrix.buildplat[2] }}
70+
run: python -m cibuildwheel --output-dir wheelhouse
71+
72+
- name: Build manylinux1 wheels
73+
if: ${{ matrix.buildplat[1] == 'manylinux_x86_64' || matrix.buildplat[1] == 'manylinux_i686' }}
74+
env:
75+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
76+
CIBW_MANYLINUX_I686_IMAGE: manylinux1
77+
CIBW_BUILD: "cp38-${{ matrix.buildplat[1] }} cp39-${{ matrix.buildplat[1] }}"
78+
run: python -m cibuildwheel --output-dir wheelhouse
79+
80+
- name: Assert all versions in wheelhouse
81+
if: ${{ ! startsWith(matrix.buildplat[1], 'macos') }}
82+
run: |
83+
ls wheelhouse/*cp38*.whl
84+
ls wheelhouse/*cp39*.whl
85+
ls wheelhouse/*cp310*.whl
86+
ls wheelhouse/*cp311*.whl
87+
ls wheelhouse/*cp312*.whl
88+
89+
- uses: actions/upload-artifact@v4
90+
with:
91+
name: wheel-${{ matrix.buildplat[1] }}
92+
path: ./wheelhouse/*.whl
93+
if-no-files-found: error
94+
95+
make_sdist:
96+
name: Make SDist
97+
runs-on: macos-13
98+
steps:
99+
- uses: actions/checkout@v4
100+
with:
101+
fetch-depth: 0
102+
103+
- uses: actions/setup-python@v5
104+
with:
105+
# Build sdist on lowest supported Python
106+
python-version: '3.8'
107+
108+
- name: Build SDist
109+
run: |
110+
set -ex
111+
python -m pip install -U pip build
112+
python -m build --sdist .
113+
114+
- name: Test SDist
115+
run: |
116+
python -m pip install dist/*.gz
117+
cd ..
118+
python -c "from pymongo import has_c; assert has_c()"
119+
120+
- uses: actions/upload-artifact@v4
121+
with:
122+
name: "sdist"
123+
path: ./dist/*.tar.gz
124+
125+
collect_dist:
126+
runs-on: ubuntu-latest
127+
needs: [build_wheels, make_sdist]
128+
name: Download Wheels
129+
steps:
130+
- name: Download all workflow run artifacts
131+
uses: actions/download-artifact@v4
132+
- name: Flatten directory
133+
working-directory: .
134+
run: |
135+
find . -mindepth 2 -type f -exec mv {} . \;
136+
find . -type d -empty -delete
137+
- uses: actions/upload-artifact@v4
138+
with:
139+
name: all-dist-${{ github.run_id }}
140+
path: "./*"

0 commit comments

Comments
 (0)