Skip to content

Commit d4f7e1c

Browse files
committed
chore: Add nodejs 20.x to the list of CI targets.
1 parent f11cf79 commit d4f7e1c

File tree

5 files changed

+43
-32
lines changed

5 files changed

+43
-32
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/.git
2+
/Dockerfile

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919

2020
strategy:
2121
matrix:
22-
node-version: [12.x, 13.x]
22+
node-version: [12.x, 13.x, 20.x]
2323

2424
steps:
2525
- uses: actions/checkout@v2
@@ -47,8 +47,8 @@ jobs:
4747
- run: npm run doc
4848
- run: npm run test
4949
- run: npm run report-coverage
50-
- run: npm run format && git diff --exit-code
51-
if: ${{ matrix.node-version == '13.x' }}
50+
- run: npm run format && git checkout package-lock.json && git diff --exit-code
51+
if: ${{ matrix.node-version == '20.x' }}
5252

5353
docker:
5454
runs-on: ubuntu-latest

Dockerfile

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
1-
FROM ubuntu:22.04
1+
FROM alpine:3.19.0
22

3-
RUN apt-get update && \
4-
DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
5-
ca-certificates \
6-
build-essential \
7-
cmake \
8-
git \
9-
libopus-dev \
10-
libsodium-dev \
11-
libvpx-dev \
12-
ninja-build \
13-
nodejs \
14-
npm \
15-
pkg-config \
16-
&& apt-get clean \
17-
&& rm -rf /var/lib/apt/lists/*
3+
RUN ["apk", "add", "--no-cache", \
4+
"cmake", \
5+
"diffutils", \
6+
"g++", \
7+
"gcc", \
8+
"git", \
9+
"libsodium-dev", \
10+
"libvpx-dev", \
11+
"linux-headers", \
12+
"make", \
13+
"musl-dev", \
14+
"npm", \
15+
"opus-dev", \
16+
"pkgconfig", \
17+
"python3", \
18+
"samurai"]
1819

1920
WORKDIR /work/c-toxcore
20-
RUN git clone --depth=1 --recurse-submodules --shallow-submodules --branch=master https://github.com/TokTok/c-toxcore.git /work/c-toxcore
21-
RUN cmake -B_build -H. -GNinja
22-
RUN cmake --build _build --target install
21+
RUN ["git", "clone", "--depth=1", \
22+
"--recurse-submodules", "--shallow-submodules", \
23+
"--branch=master", \
24+
"https://github.com/TokTok/c-toxcore.git", "/work/c-toxcore"]
25+
RUN ["cmake", "-B_build", "-H.", "-GNinja", "-DBOOTSTRAP_DAEMON=OFF"]
26+
RUN ["cmake", "--build", "_build", "--target", "install"]
2327

2428
WORKDIR /work/js-toxcore-c
2529
COPY . /work/js-toxcore-c/
2630
ENV LD_LIBRARY_PATH=/usr/local/lib
27-
RUN ls -l /usr/local/lib/libtoxcore.so
28-
RUN npm install
29-
RUN npm run doc
30-
RUN npm run test
31-
RUN npm run coverage
32-
RUN npm run format
33-
#COPY . /work/js-toxcore-c.orig/
34-
#RUN diff -ru /work/js-toxcore-c /work/js-toxcore-c.orig
31+
RUN ["ls", "-lh", "/usr/local/lib/libtoxcore.so.2"]
32+
RUN ["npm", "install"]
33+
RUN ["npm", "run", "doc"]
34+
RUN ["npm", "run", "test"]
35+
RUN ["npm", "run", "coverage"]
36+
RUN ["npm", "run", "format"]
37+
COPY . /work/js-toxcore-c.orig/
38+
RUN rm -rf \
39+
/work/js-toxcore-c*/.nyc_output \
40+
/work/js-toxcore-c*/doc \
41+
/work/js-toxcore-c*/node_modules \
42+
/work/js-toxcore-c*/coverage.lcov \
43+
/work/js-toxcore-c*/package-lock.json
44+
RUN diff -ru /work/js-toxcore-c /work/js-toxcore-c.orig

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "js-toxcore-c",
3-
"version": "0.2.0",
3+
"version": "0.2.18",
44
"description": "Node bindings for libtoxcore",
55
"keywords": [
66
"im",

0 commit comments

Comments
 (0)