mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
Build armv7 deltachat-rpc-server binaries without NDK
This commit is contained in:
15
.github/workflows/deltachat-rpc-server.yml
vendored
15
.github/workflows/deltachat-rpc-server.yml
vendored
@@ -35,22 +35,29 @@ jobs:
|
|||||||
path: target/x86_64-unknown-linux-musl/release/deltachat-rpc-server
|
path: target/x86_64-unknown-linux-musl/release/deltachat-rpc-server
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
build_aarch64_linux:
|
build_linux:
|
||||||
name: Cross-compile deltachat-rpc-server for aarch64 Linux
|
name: Cross-compile deltachat-rpc-server for aarch64 and armv7 Linux
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: sh scripts/aarch64-unknown-linux-musl.sh
|
run: sh scripts/zig-rpc-server.sh
|
||||||
|
|
||||||
- name: Upload binary
|
- name: Upload aarch64 binary
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: deltachat-rpc-server-aarch64
|
name: deltachat-rpc-server-aarch64
|
||||||
path: target/aarch64-unknown-linux-musl/release/deltachat-rpc-server
|
path: target/aarch64-unknown-linux-musl/release/deltachat-rpc-server
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
|
- name: Upload armv7 binary
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: deltachat-rpc-server-armv7
|
||||||
|
path: target/armv7-unknown-linux-musleabihf/release/deltachat-rpc-server
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
build_android:
|
build_android:
|
||||||
name: Cross-compile deltachat-rpc-server for Android (armeabi-v7a, arm64-v8a, x86 and x86_64)
|
name: Cross-compile deltachat-rpc-server for Android (armeabi-v7a, arm64-v8a, x86 and x86_64)
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|||||||
@@ -20,7 +20,9 @@ and an own build machine.
|
|||||||
|
|
||||||
- `run_all.sh` builds Python wheels
|
- `run_all.sh` builds Python wheels
|
||||||
|
|
||||||
- `aarch64-unknown-linux-musl.sh` cross-compiles static `deltachat-rpc-server` for aarch64
|
- `zig-rpc-server.sh` compiles binaries of `deltachat-rpc-server` using Zig toolchain statically linked against musl libc.
|
||||||
|
|
||||||
|
- `android-rpc-server.sh` compiles binaries of `deltachat-rpc-server` using Android NDK.
|
||||||
|
|
||||||
## Triggering runs on the build machine locally (fast!)
|
## Triggering runs on the build machine locally (fast!)
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Build statically linked deltachat-rpc-server for aarch64-unknown-linux-musl.
|
|
||||||
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Download Zig
|
|
||||||
rm -fr zig-linux-x86_64-0.10.1 zig-linux-x86_64-0.10.1.tar.xz
|
|
||||||
wget https://ziglang.org/download/0.10.1/zig-linux-x86_64-0.10.1.tar.xz
|
|
||||||
tar xf zig-linux-x86_64-0.10.1.tar.xz
|
|
||||||
export PATH="$PATH:$PWD/zig-linux-x86_64-0.10.1"
|
|
||||||
|
|
||||||
cargo install cargo-zigbuild
|
|
||||||
|
|
||||||
rustup target add aarch64-unknown-linux-musl
|
|
||||||
|
|
||||||
cargo zigbuild --release --target aarch64-unknown-linux-musl -p deltachat-rpc-server --features vendored
|
|
||||||
23
scripts/zig-rpc-server.sh
Executable file
23
scripts/zig-rpc-server.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Build statically linked deltachat-rpc-server using cargo-zigbuild.
|
||||||
|
|
||||||
|
set -x
|
||||||
|
set -e
|
||||||
|
|
||||||
|
unset RUSTFLAGS
|
||||||
|
|
||||||
|
ZIG_VERSION=0.11.0-dev.1935+1d96a17af
|
||||||
|
|
||||||
|
# Download Zig
|
||||||
|
rm -fr "$ZIG_VERSION" "ZIG_VERSION.tar.xz"
|
||||||
|
wget "https://ziglang.org/builds/zig-linux-x86_64-$ZIG_VERSION.tar.xz"
|
||||||
|
tar xf "zig-linux-x86_64-$ZIG_VERSION.tar.xz"
|
||||||
|
export PATH="$PWD/zig-linux-x86_64-$ZIG_VERSION:$PATH"
|
||||||
|
|
||||||
|
cargo install cargo-zigbuild
|
||||||
|
|
||||||
|
for TARGET in aarch64-unknown-linux-musl armv7-unknown-linux-musleabihf; do
|
||||||
|
rustup target add "$TARGET"
|
||||||
|
cargo zigbuild --release --target "$TARGET" -p deltachat-rpc-server --features vendored
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user