Skip to content

Commit

Permalink
fix(NODE-6237): build against glibc 2.27 (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbbeeken committed Jun 25, 2024
1 parent ea1f4a6 commit 1c9b74a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
14 changes: 10 additions & 4 deletions .github/docker/Dockerfile.glibc
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
ARG NODE_BUILD_IMAGE=node:16.20.1-bullseye
FROM $NODE_BUILD_IMAGE AS build
FROM ubuntu:bionic AS build

# Possible values: s390x, arm64, x64
ARG NODE_ARCH
ADD https://nodejs.org/dist/v16.20.1/node-v16.20.1-linux-${NODE_ARCH}.tar.gz /
RUN mkdir -p /nodejs && tar -xzf /node-v16.20.1-linux-${NODE_ARCH}.tar.gz --strip-components=1 -C /nodejs
ENV PATH=$PATH:/nodejs/bin

WORKDIR /mongodb-client-encryption
COPY . .

RUN npm run install:libmongocrypt
RUN npm run test
RUN apt-get -qq update && apt-get -qq install -y python3 build-essential && ldd --version

RUN npm run install:libmongocrypt && npm run test

FROM scratch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Run Buildx
run: |
docker buildx create --name builder --bootstrap --use
docker buildx build --platform linux/${{ matrix.linux_arch }} --output type=local,dest=./prebuilds,platform-split=false -f ./.github/docker/Dockerfile.glibc .
docker buildx build --platform linux/${{ matrix.linux_arch }} --build-arg NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }} --output type=local,dest=./prebuilds,platform-split=false -f ./.github/docker/Dockerfile.glibc .
- id: upload
name: Upload prebuild
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 'lts/*'
cache: 'npm'

- name: "Build libmongocrypt"
shell: bash
run: |
npm run install:libmongocrypt
- if: matrix.lint-target == 'c++'
shell: bash
run: |
Expand Down
2 changes: 1 addition & 1 deletion test/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const REQUIRED_FILES = [
];

describe(`Release ${packFile}`, function () {
this.timeout(10000);
this.timeout(60000);

beforeEach(function () {
if (process.arch !== 'x64') {
Expand Down

0 comments on commit 1c9b74a

Please sign in to comment.