Skip to content

Commit 7d9140e

Browse files
committed
Install libmongocrypt as system library
1 parent 4cf84bd commit 7d9140e

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ runs:
3333
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
3434
-D BUILD_VERSION="${LIBMONGOC_VERSION}" \
3535
-D ENABLE_MONGOC=ON \
36-
-D ENABLE_TRACING=ON
36+
-D ENABLE_TRACING=ON \
37+
-D ENABLE_CLIENT_SIDE_ENCRYPTION=ON
3738
env:
3839
LIBMONGOC_VERSION: ${{ inputs.version }}
3940

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
# Note: no packages for Ubuntu 24.04 noble exist, so we use those for 22.04
19+
run: echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu jammy/libmongocrypt/${LIBMONGOCRYPT_VERSION} universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
20+
env:
21+
LIBMONGOCRYPT_VERSION: ${{ inputs.version }}
22+
23+
- name: Update apt sources
24+
shell: bash
25+
run: sudo apt-get update
26+
27+
- name: Install libmongocrypt
28+
shell: bash
29+
run: sudo apt-get install -y libmongocrypt-dev

.github/workflows/system-libs.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ jobs:
1616
with:
1717
submodules: true
1818

19+
- name: "Install libmongocrypt"
20+
uses: ./.github/actions/linux/build-libmongocrypt
21+
with:
22+
version: 1.14
23+
1924
- name: "Build libmongoc"
20-
id: build-libmongoc
2125
uses: ./.github/actions/linux/build-libmongoc
2226
with:
2327
version: 2.0.1
2428

2529
- name: "Build Driver"
26-
id: build-driver
2730
uses: ./.github/actions/linux/build
2831
with:
2932
version: "8.4"

0 commit comments

Comments
 (0)