Skip to content

Use sudo

Use sudo #8

Workflow file for this run

name: "System library tests"
on:
push:
branches:
- "build-system-libs"
env:
LIBMONGOC_VERSION: "2.0.1"
jobs:
tests:
name: "Build"
runs-on: "ubuntu-24.04"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
submodules: true
- 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"
- 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
- 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 "/usr/local" --config RelWithDebInfo
- name: Check pkg-config availability
shell: bash
run: pkg-config --modversion mongoc2