-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-2435: Support libmongoc 2.0 #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
b5f3c8e
71510e2
adfedd2
6c715e9
51cdb21
9090d84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: "Build libmongoc" | ||
description: "Builds and install libmongoc" | ||
inputs: | ||
prefix: | ||
description: "Prefix to install libmongoc to" | ||
default: "/usr/local" | ||
version: | ||
description: "Libmongoc version to build" | ||
required: true | ||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Download libmongoc | ||
shell: bash | ||
working-directory: /tmp | ||
run: wget "https://github.com/mongodb/mongo-c-driver/archive/refs/tags/${LIBMONGOC_VERSION}.tar.gz" --output-document="mongo-c-driver.tar.gz" | ||
env: | ||
LIBMONGOC_VERSION: ${{ inputs.version }} | ||
|
||
- name: Extract libmongoc | ||
shell: bash | ||
working-directory: /tmp | ||
run: tar xf "mongo-c-driver.tar.gz" | ||
|
||
- name: Configure cmake | ||
shell: bash | ||
working-directory: /tmp | ||
run: | | ||
cmake \ | ||
-S "mongo-c-driver-${LIBMONGOC_VERSION}" \ | ||
-B _build \ | ||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \ | ||
-D BUILD_VERSION="${LIBMONGOC_VERSION}" \ | ||
-D ENABLE_MONGOC=ON \ | ||
-D ENABLE_TRACING=ON \ | ||
-D ENABLE_CLIENT_SIDE_ENCRYPTION=ON | ||
env: | ||
LIBMONGOC_VERSION: ${{ inputs.version }} | ||
|
||
- name: Build libmongoc | ||
shell: bash | ||
working-directory: /tmp | ||
run: cmake --build _build --config RelWithDebInfo --parallel | ||
|
||
- name: Install libmongoc | ||
shell: bash | ||
working-directory: /tmp | ||
run: sudo cmake --install _build --prefix "${PREFIX}" --config RelWithDebInfo | ||
env: | ||
PREFIX: ${{ inputs.prefix }} | ||
|
||
- name: Check pkg-config availability | ||
shell: bash | ||
run: pkg-config --modversion mongoc2 |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||
name: "Build libmongocrypt" | ||||||
description: "Installs libmongocrypt" | ||||||
inputs: | ||||||
version: | ||||||
description: "Libmongocrypt version to install (major.minor)" | ||||||
required: true | ||||||
runs: | ||||||
using: composite | ||||||
|
||||||
steps: | ||||||
- name: Add repository key | ||||||
shell: bash | ||||||
run: sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg' | ||||||
|
||||||
- name: Add repository | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a particular reason that libmongocrypt is installed as a package, while libmongoc is compiled for source? Wouldn't the approach here assume that the build is running on an Ubuntu or Debian OS? I suppose that's OK since |
||||||
shell: bash | ||||||
working-directory: /tmp | ||||||
# Note: no packages for Ubuntu 24.04 noble exist, so we use those for 22.04 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Aside: MONGOCRYPT-813 is planned for the next 1.14.1 patch release. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you, I'll update this alongside 1.14.1 then :) |
||||||
run: echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu jammy/libmongocrypt/${LIBMONGOCRYPT_VERSION} universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list | ||||||
env: | ||||||
LIBMONGOCRYPT_VERSION: ${{ inputs.version }} | ||||||
|
||||||
- name: Update apt sources | ||||||
shell: bash | ||||||
run: sudo apt-get update | ||||||
|
||||||
- name: Install libmongocrypt | ||||||
shell: bash | ||||||
run: sudo apt-get install -y libmongocrypt-dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted that the description here is missing "(major.minor)", which you had in the build-libmongocrypt action.