Skip to content

Commit

Permalink
chore(ci): remove android cross stuff, bump ubuntu to 20.04 and fix s…
Browse files Browse the repository at this point in the history
…cripts for missing make deps
  • Loading branch information
leet4tari committed Sep 12, 2024
1 parent 5ae45a8 commit 9ca2227
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
47 changes: 9 additions & 38 deletions Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,46 +21,12 @@ passthrough = [
"TARI_NETWORK_DIR",
]

[target.x86_64-linux-android]
image = "ghcr.io/cross-rs/x86_64-linux-android:edge"
pre-build = [ """
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get --assume-yes --no-install-recommends install \
curl unzip && \
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip && \
unzip -o protoc-26.1-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]

[target.x86_64-linux-android.env]
passthrough = [
"CFLAGS=-DMDB_USE_ROBUST=0",
]

[target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:edge"
pre-build = [ """
export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get --assume-yes --no-install-recommends install \
curl unzip && \
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v26.1/protoc-26.1-linux-x86_64.zip && \
unzip -o protoc-26.1-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]

[target.aarch64-linux-android.env]
passthrough = [
"CFLAGS=-DMDB_USE_ROBUST=0",
]

# Currently needs cross-rs from git ```cargo install cross --git https://github.com/cross-rs/cross```
[target.aarch64-unknown-linux-gnu]
image.name = "ubuntu:18.04"
image.name = "ubuntu:20.04"
# targetting is needed for apple silicon
image.toolchain = ["linux/arm64=aarch64-unknown-linux-gnu", "linux/amd64=x86_64-unknown-linux-gnu"]
pre-build = "./scripts/cross_compile_ubuntu_18-pre-build.sh"
pre-build = "./scripts/cross_compile_ubuntu_20-pre-build.sh"

[target.aarch64-unknown-linux-gnu.env]
passthrough = [
Expand All @@ -70,5 +36,10 @@ passthrough = [
]

[target.x86_64-unknown-linux-gnu]
image = "ubuntu:18.04"
pre-build = "./scripts/cross_compile_ubuntu_18-pre-build.sh"
image = "ubuntu:20.04"
pre-build = "./scripts/cross_compile_ubuntu_20-pre-build.sh"

[target.x86_64-unknown-linux-gnu.env]
passthrough = [
"PKG_CONFIG_ALLOW_CROSS=true",
]
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ else
exit 1
fi

DEBIAN_FRONTEND=${DEBIAN_FRONTEND:-noninteractive}
# Hack of Note - workaround for apt asking for timezone info
TimeZone=${TimeZone:-"Etc/GMT"}
ln -snf /usr/share/zoneinfo/${TimeZone} /etc/localtime
echo ${TimeZone} > /etc/timezone

crossArch=${CROSS_DEB_ARCH}
apt-get update

Expand All @@ -63,6 +69,7 @@ apt-get install --no-install-recommends --assume-yes \
libsqlite3-0 \
libreadline-dev \
git \
make \
cmake \
dh-autoreconf \
clang \
Expand Down Expand Up @@ -148,7 +155,6 @@ EoF

# scripts/install_ubuntu_dependencies-cross_compile.sh x86-64
apt-get --assume-yes install \
pkg-config-${targetPlatform}-linux-gnu \
gcc-${targetPlatform}-linux-gnu \
g++-${targetPlatform}-linux-gnu

Expand Down
1 change: 1 addition & 0 deletions scripts/install_ubuntu_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ apt-get install --no-install-recommends --assume-yes \
libsqlite3-0 \
libreadline-dev \
git \
make \
cmake \
dh-autoreconf \
clang \
Expand Down

0 comments on commit 9ca2227

Please sign in to comment.