Skip to content
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

chore: Add nodejs 20.x to the list of CI targets. #185

Merged
merged 1 commit into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/.git
/Dockerfile
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
node-version: [12.x, 13.x]
node-version: [12.x, 13.x, 20.x]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -47,8 +47,8 @@ jobs:
- run: npm run doc
- run: npm run test
- run: npm run report-coverage
- run: npm run format && git diff --exit-code
if: ${{ matrix.node-version == '13.x' }}
- run: npm run format && git checkout package-lock.json && git diff --exit-code
if: ${{ matrix.node-version == '20.x' }}

docker:
runs-on: ubuntu-latest
Expand Down
64 changes: 37 additions & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,44 @@
FROM ubuntu:22.04
FROM alpine:3.19.0

RUN apt-get update && \
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
ca-certificates \
build-essential \
cmake \
git \
libopus-dev \
libsodium-dev \
libvpx-dev \
ninja-build \
nodejs \
npm \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN ["apk", "add", "--no-cache", \
"cmake", \
"diffutils", \
"g++", \
"gcc", \
"git", \
"libsodium-dev", \
"libvpx-dev", \
"linux-headers", \
"make", \
"musl-dev", \
"npm", \
"opus-dev", \
"pkgconfig", \
"python3", \
"samurai"]

WORKDIR /work/c-toxcore
RUN git clone --depth=1 --recurse-submodules --shallow-submodules --branch=master https://github.com/TokTok/c-toxcore.git /work/c-toxcore
RUN cmake -B_build -H. -GNinja
RUN cmake --build _build --target install
RUN ["git", "clone", "--depth=1", \
"--recurse-submodules", "--shallow-submodules", \
"--branch=master", \
"https://github.com/TokTok/c-toxcore.git", "/work/c-toxcore"]
RUN ["cmake", "-B_build", "-H.", "-GNinja", "-DBOOTSTRAP_DAEMON=OFF"]
RUN ["cmake", "--build", "_build", "--target", "install"]

WORKDIR /work/js-toxcore-c
COPY . /work/js-toxcore-c/
ENV LD_LIBRARY_PATH=/usr/local/lib
RUN ls -l /usr/local/lib/libtoxcore.so
RUN npm install
RUN npm run doc
RUN npm run test
RUN npm run coverage
RUN npm run format
#COPY . /work/js-toxcore-c.orig/
#RUN diff -ru /work/js-toxcore-c /work/js-toxcore-c.orig
RUN ["ls", "-lh", "/usr/local/lib/libtoxcore.so.2"]
RUN ["npm", "install"]
RUN ["npm", "run", "doc"]
RUN ["npm", "run", "test"]
RUN ["npm", "run", "coverage"]
RUN ["npm", "run", "format"]
COPY . /work/js-toxcore-c.orig/
RUN rm -rf \
/work/js-toxcore-c*/.nyc_output \
/work/js-toxcore-c*/doc \
/work/js-toxcore-c*/node_modules \
/work/js-toxcore-c*/coverage.lcov \
/work/js-toxcore-c*/package-lock.json
RUN diff -ru /work/js-toxcore-c /work/js-toxcore-c.orig
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "js-toxcore-c",
"version": "0.2.0",
"version": "0.2.18",
"description": "Node bindings for libtoxcore",
"keywords": [
"im",
Expand Down
Loading