Skip to content

Commit 56a9c27

Browse files
committed
Merge branch 'v2.x' into merge-v2.1-into-v2.x-1769595501524
* v2.x: (40 commits) PHPC-2664: Drop Windows x86 builds (#1911) Bump tests/drivers-evergreen-tools from `61cb4e9` to `5514d6a` (#1908) Bump tests/drivers-evergreen-tools from `514927f` to `61cb4e9` (#1906) Bump tests/drivers-evergreen-tools from `ebe98d0` to `514927f` (#1905) PHPC-2649: Update to libmongocrypt 1.17.0 (#1904) PHPC-2654: Update to libmongoc 2.2.1 (#1900) Bump tests/drivers-evergreen-tools from `c92d062` to `ebe98d0` (#1903) Bump actions/cache from 4 to 5 (#1902) Bump tests/drivers-evergreen-tools from `c83e428` to `c92d062` (#1899) Bump tests/drivers-evergreen-tools from `cb019f7` to `c83e428` (#1898) Bump actions/checkout from 5 to 6 (#1895) Bump tests/drivers-evergreen-tools from `f8ab2a5` to `cb019f7` (#1896) PHPC-2634: Binary vector corpus tests (#1892) Bump tests/drivers-evergreen-tools from `1dcbfe4` to `f8ab2a5` (#1891) PHPC-2638 and PHPC-2630: Bump to libmongoc 2.1.2 and libmongocrypt 1.16.0 (#1868) Fix git submodule command in CONTRIBUTING.md PHPC-2627: Use appropriate return type for zend_object_iterator_funcs.valid (#1890) Bump github/codeql-action from 3 to 4 (#1889) Bump tests/drivers-evergreen-tools from `3b3f081` to `1dcbfe4` (#1878) PHPC-2474: Support Binary vector subtype (#1853) ...
2 parents 37cf913 + 9bc8570 commit 56a9c27

138 files changed

Lines changed: 2542 additions & 378 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.evergreen/compile-unix.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ if [ -n "$LIBMONGOC_VERSION" ]; then
7272
echo "Finding Python3 binary... done."
7373

7474
php scripts/update-submodule-sources.php
75-
76-
# We invoke python manually as it may not be in the path
77-
pushd src/libmongoc/
78-
$PYTHON build/calc_release_version.py > ../LIBMONGOC_VERSION_CURRENT
79-
popd
8075
fi
8176

8277
phpize

.evergreen/config/functions.yml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ functions:
140140
echo "Checking out libmongoc version: ${LIBMONGOC_VERSION}"
141141
git fetch
142142
git checkout ${LIBMONGOC_VERSION}
143-
# Note: compile-unix.sh will run `make libmongoc-version-current`
144143
fi
145144
- command: subprocess.exec
146145
type: test
@@ -160,6 +159,26 @@ functions:
160159
- command: attach.results
161160
params:
162161
file_location: "${DRIVERS_TOOLS}/results.json"
162+
- command: shell.exec
163+
params:
164+
working_dir: src
165+
script: |
166+
${PREPARE_SHELL}
167+
if [ -f test-results.xml ]; then
168+
curl -Os https://cli.codecov.io/latest/linux/codecov
169+
curl -Os https://cli.codecov.io/latest/linux/codecov.SHA256SUM
170+
shasum -a 256 -c codecov.SHA256SUM
171+
sudo chmod +x codecov
172+
./codecov upload-process \
173+
--report-type test_results \
174+
--disable-search \
175+
--fail-on-error \
176+
--token ${CODECOV_TOKEN} \
177+
--flag "${MONGODB_VERSION}-${TOPOLOGY}" \
178+
--file test-results.xml
179+
else
180+
echo "Skipping codecov test result upload"
181+
fi
163182
164183
"bootstrap mongo-orchestration":
165184
- command: shell.exec
@@ -177,6 +196,15 @@ functions:
177196
${PREPARE_SHELL}
178197
SKIP_LEGACY_SHELL=true \
179198
bash ${DRIVERS_TOOLS}/.evergreen/run-orchestration.sh
199+
- command: shell.exec
200+
params:
201+
include_expansions_in_env:
202+
- MONGODB_VERSION
203+
- TOPOLOGY
204+
script: |
205+
printf "\n" >> mo-expansion.yml
206+
printf "MONGODB_VERSION: '%s'\n" "${MONGODB_VERSION}" >> mo-expansion.yml
207+
printf "TOPOLOGY: '%s'\n" "${TOPOLOGY}" >> mo-expansion.yml
180208
# run-orchestration generates expansion file with MONGODB_URI and CRYPT_SHARED_LIB_PATH
181209
- command: expansions.update
182210
params:

.evergreen/config/generate-config.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
'4.2',
2222
];
2323

24-
// TODO: Change when PHP 8.4 is stable
25-
// $latestPhpVersion = max($phpVersions);
26-
$latestPhpVersion = '8.3';
24+
$latestPhpVersion = max($phpVersions);
2725

2826
// Only test the latest PHP version for libmongoc
2927
$libmongocBuildPhpVersions = [ $latestPhpVersion ];

.evergreen/config/generated/build/build-libmongoc.yml

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/generated/test-variant/libmongoc.yml

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.evergreen/config/templates/build/build-libmongoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- func: "compile driver"
1111
vars:
1212
PHP_VERSION: "%phpVersion%"
13-
LIBMONGOC_VERSION: "1.30.6"
13+
LIBMONGOC_VERSION: "2.2.1"
1414
- func: "upload build"
1515

1616
- name: "build-php-%phpVersion%-libmongoc-next-stable"
@@ -19,7 +19,7 @@
1919
- func: "compile driver"
2020
vars:
2121
PHP_VERSION: "%phpVersion%"
22-
LIBMONGOC_VERSION: "r1.30"
22+
LIBMONGOC_VERSION: "r2.2"
2323
- func: "upload build"
2424

2525
- name: "build-php-%phpVersion%-libmongoc-latest"
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Build libmongoc"
2+
description: "Builds and install libmongoc"
3+
inputs:
4+
prefix:
5+
description: "Prefix to install libmongoc to"
6+
default: "/usr/local"
7+
version:
8+
description: "Libmongoc version to build (major.minor)"
9+
required: true
10+
runs:
11+
using: composite
12+
13+
steps:
14+
- name: Download libmongoc
15+
shell: bash
16+
working-directory: /tmp
17+
run: wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/${LIBMONGOC_VERSION}.tar.gz" --output-document="mongo-c-driver.tar.gz"
18+
env:
19+
LIBMONGOC_VERSION: ${{ inputs.version }}
20+
21+
- name: Extract libmongoc
22+
shell: bash
23+
working-directory: /tmp
24+
run: tar xf "mongo-c-driver.tar.gz"
25+
26+
- name: Configure cmake
27+
shell: bash
28+
working-directory: /tmp
29+
run: |
30+
cmake \
31+
-S "mongo-c-driver-${LIBMONGOC_VERSION}" \
32+
-B _build \
33+
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
34+
-D BUILD_VERSION="${LIBMONGOC_VERSION}" \
35+
-D ENABLE_MONGOC=ON \
36+
-D ENABLE_TRACING=ON \
37+
-D ENABLE_CLIENT_SIDE_ENCRYPTION=ON
38+
env:
39+
LIBMONGOC_VERSION: ${{ inputs.version }}
40+
41+
- name: Build libmongoc
42+
shell: bash
43+
working-directory: /tmp
44+
run: cmake --build _build --config RelWithDebInfo --parallel
45+
46+
- name: Install libmongoc
47+
shell: bash
48+
working-directory: /tmp
49+
run: sudo cmake --install _build --prefix "${PREFIX}" --config RelWithDebInfo
50+
env:
51+
PREFIX: ${{ inputs.prefix }}
52+
53+
- name: Check pkg-config availability
54+
shell: bash
55+
run: pkg-config --modversion mongoc2
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Build libmongocrypt"
2+
description: "Installs libmongocrypt"
3+
inputs:
4+
version:
5+
description: "Libmongocrypt version to install (major.minor)"
6+
required: true
7+
runs:
8+
using: composite
9+
10+
steps:
11+
- name: Add repository key
12+
shell: bash
13+
run: sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg'
14+
15+
- name: Add repository
16+
shell: bash
17+
working-directory: /tmp
18+
run: echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu noble/libmongocrypt/${LIBMONGOCRYPT_VERSION} universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
19+
env:
20+
LIBMONGOCRYPT_VERSION: ${{ inputs.version }}
21+
22+
- name: Update apt sources
23+
shell: bash
24+
run: sudo apt-get update
25+
26+
- name: Install libmongocrypt
27+
shell: bash
28+
run: sudo apt-get install -y libmongocrypt-dev

.github/actions/linux/build/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ inputs:
44
version:
55
description: "PHP version to build for"
66
required: true
7+
configureOpts:
8+
description: "Extra options to use for the call to ./configure"
9+
default: ""
10+
711
runs:
812
using: composite
913
steps:
@@ -17,6 +21,8 @@ runs:
1721
- name: "Configure driver"
1822
run: .github/workflows/configure.sh
1923
shell: bash
24+
env:
25+
CONFIGURE_OPTS: ${{ inputs.configureOpts }}
2026

2127
- name: "Build driver"
2228
run: "make all"

.github/actions/windows/build/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ inputs:
44
php-version:
55
description: "PHP version to build for"
66
required: true
7-
arch:
8-
description: "The architecture to build for (x64 or x86)"
9-
required: true
107
ts:
118
description: "Thread-safety (nts or ts)"
129
required: true
@@ -21,7 +18,7 @@ runs:
2118
uses: php/php-windows-builder/extension@1.6.0
2219
with:
2320
php-version: ${{ inputs.php-version }}
24-
arch: ${{ inputs.arch }}
21+
arch: x64
2522
ts: ${{ inputs.ts }}
2623
run-tests: ${{ inputs.run-tests == 'true' && true || false }}
2724
test-runner-args: "--show-diff"

0 commit comments

Comments
 (0)