Skip to content

Commit 689866d

Browse files
committed
Extract libmongocrypt build to separate action
1 parent 35f66ff commit 689866d

File tree

2 files changed

+32
-8
lines changed

2 files changed

+32
-8
lines changed
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: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,16 @@ jobs:
1717
submodules: true
1818

1919
- name: "Build libmongoc"
20-
id: build-libmongoc
2120
uses: ./.github/actions/linux/build-libmongoc
2221
with:
2322
version: 2.0.1
2423

2524
- name: "Install libmongocrypt"
26-
shell: bash
27-
run: |
28-
sudo sh -c 'curl -s --location https://pgp.mongodb.com/libmongocrypt.asc | gpg --dearmor >/etc/apt/trusted.gpg.d/libmongocrypt.gpg'
29-
echo "deb https://libmongocrypt.s3.amazonaws.com/apt/ubuntu jammy/libmongocrypt/1.14 universe" | sudo tee /etc/apt/sources.list.d/libmongocrypt.list
30-
sudo apt-get update
31-
sudo apt-get install -y libmongocrypt-dev
25+
uses: ./.github/actions/linux/build-libmongocrypt
26+
with:
27+
version: 1.14
3228

3329
- name: "Build Driver"
34-
id: build-driver
3530
uses: ./.github/actions/linux/build
3631
with:
3732
version: "8.4"

0 commit comments

Comments
 (0)