Files
chatmail-core/scripts
Simon Laux c375c03d8e stdio jsonrpc server npm package (#5332)
- [x] figgure out how to build the packages (that it installs native
optional package automatically)
- [X] Make the gluecode
- [x] expose both the lowerlevel api that desktop uses (~~send objects
and receive objects~~, getting path of rpc-server is enough)
  - [X] and the higher level api needed for bots (jsonrpc client)
  - [X] typescript types
- [x] automatically pick the right binary from npm or allow getting it
from env var, or give out an error (throw error)
- [x] find out how to dev locally (use local built core in dc desktop) -
there is the question of how to link the typescript client and the task
to add a search in the cargo target folder for a debug build or a
different way, find out some good flow that we can use and document for
dc desktop + locally built core development
- [x] build the packages in ci
- [x] fix that deltachat-rpc-server is not executable

postponed:
- [ ] publish from ci
   - [ ] add key/token to deploy to npm 

Closes #4694

## Related prs
- https://github.com/deltachat-bot/echo/pull/69
- https://github.com/deltachat/deltachat-desktop/pull/3567

---------

Co-authored-by: link2xt <link2xt@testrun.org>
2024-05-11 20:54:11 +02:00
..
2024-05-03 02:11:07 +00:00
2023-01-20 16:53:21 +00:00
2024-03-01 02:00:53 +00:00
2022-07-07 00:31:57 +00:00

Continuous Integration Scripts for Delta Chat

Continuous Integration, run through GitHub Actions and an own build machine.

Description of scripts

  • clippy.sh runs cargo clippy for all Rust code in the project.

  • deny.sh runs cargo deny for all Rust code in the project.

  • codespell.sh spellchecks the source code using codespell tool.

  • ../.github/workflows contains jobs run by GitHub Actions.

  • run-python-test.sh runs CFFI Python tests.

  • run-rpc-test.sh runs JSON-RPC Python tests.

  • make-python-testenv.sh creates a local python test development environment with CFFI bindings. Reusing the same environment is faster than running run-python-test.sh which always recreates environment from scratch and runs additional lints.

  • make-rpc-testenv.sh creates a local python development environment with JSON-RPC bindings, i.e. deltachat-rpc-client and deltachat-rpc-server.

  • remote_tests_python.sh rsyncs to a build machine and runs run-python-test.sh remotely on the build machine.

  • remote_tests_rust.sh rsyncs to the build machine and runs run-rust-test.sh remotely on the build machine.

  • run-doxygen.sh generates C-docs which are then uploaded to https://c.delta.chat/

  • run_all.sh builds Python wheels

  • android-rpc-server.sh compiles binaries of deltachat-rpc-server using Android NDK.

Triggering runs on the build machine locally (fast!)

There is experimental support for triggering a remote Python or Rust test run from your local checkout/branch. You will need to be authorized to login to the build machine (ask your friendly sysadmin on #deltachat Libera Chat) to type:

scripts/manual_remote_tests.sh rust
scripts/manual_remote_tests.sh python

This will rsync your current checkout to the remote build machine (no need to commit before) and then run either rust or python tests.

coredeps Dockerfile

coredeps/Dockerfile specifies an image that contains all of Delta Chat's core dependencies. It is used to build python wheels (binary packages for Python).

You can build the docker images yourself locally to avoid the relatively large download:

cd scripts  # where all CI things are 
docker build -t deltachat/coredeps coredeps

Additionally, you can install qemu and build arm64 docker image on x86_64 machine: apt-get install qemu binfmt-support qemu-user-static docker build -t deltachat/coredeps-arm64 --build-arg BASEIMAGE=quay.io/pypa/manylinux2014_aarch64 coredeps