Skip to content

Commit

Permalink
chore: Fix CI; update package-lock.json to new format.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Jan 1, 2024
1 parent 7d0b826 commit e5eec1e
Show file tree
Hide file tree
Showing 6 changed files with 4,174 additions and 16 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.git
28 changes: 22 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
---
name: ci

# Run on push and once a week to keep the images from bitrotting and to
# identify issues while no commits are being pushed.
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 4 * * *' # Run at 04:00 every day.
- cron: "52 2 * * 0"

# Cancel old PR builds when pushing new commits.
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest

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

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -43,3 +49,13 @@ jobs:
- run: npm run report-coverage
- run: npm run format && git diff --exit-code
if: ${{ matrix.node-version == '13.x' }}

docker:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Docker Build
uses: docker/build-push-action@v2
with:
tags: toxchat/js-toxcore-c:latest
34 changes: 34 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ubuntu:22.04

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/*

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

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
Loading

0 comments on commit e5eec1e

Please sign in to comment.