Skip to content

Commit

Permalink
chore(fix): ci - ffis android - add protobuf for cross
Browse files Browse the repository at this point in the history
  • Loading branch information
leet4tari committed Jan 17, 2024
1 parent 06a02fb commit afad4f6
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_libffis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
#
## build only single target image
# matrix_selection=$( jq -c '.[] | select( ."runs-on" == "ubuntu-latest" )' ${{ env.matrix-json-file }} )
# matrix_selection=$( jq -c '.[] | select( ."runs-on" == "macos-latest" )' ${{ env.matrix-json-file }} )
# matrix_selection=$( jq -c '.[] | select( ."target" == "x86_64-linux-android" )' ${{ env.matrix-json-file }} )
#
## buid select target images - build_enabled
matrix_selection=$( jq -c '.[] | select( ."build_enabled" != false )' ${{ env.matrix-json-file }} )
Expand Down
56 changes: 36 additions & 20 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
[target.x86_64-linux-android]
image = "ghcr.io/cross-rs/x86_64-linux-android:edge"

[target.x86_64-linux-android.env]
[build.env]
passthrough = [
"CFLAGS",
"TARGET",
"RUST_TARGET",
"BUILD_TARGET",
"CARGO_BUILD_TARGET",
"TARGET_CFLAGS",
"RUSTFLAGS",
"RUST_BACKTRACE",
"RUST_DEBUG",
"RUST_LOG",
"ARCH",
"FEATURES",
"ROARING_ARCH",
"TARI_NETWORK",
]

# Don't forget export:
# CFLAGS=-DMDB_USE_ROBUST=0
[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/v25.2/protoc-25.2-linux-x86_64.zip && \
unzip -o protoc-25.2-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]

[target.aarch64-linux-android]
image = "ghcr.io/cross-rs/aarch64-linux-android:edge"

[target.aarch64-linux-android.env]
passthrough = [
"CFLAGS",
"TARI_NETWORK",
]
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/v25.2/protoc-25.2-linux-x86_64.zip && \
unzip -o protoc-25.2-linux-x86_64.zip -d /usr/ && \
/usr/bin/protoc --version
""" ]

[target.aarch64-unknown-linux-gnu]
image = "ubuntu:18.04"
Expand Down Expand Up @@ -49,17 +75,7 @@ rustup toolchain install stable-aarch64-unknown-linux-gnu

[target.aarch64-unknown-linux-gnu.env]
passthrough = [
"CFLAGS",
"RUST_DEBUG",
"RUSTFLAGS",
"ARCH",
"FEATURES",
"ROARING_ARCH",
"TARGET",
"RUST_TARGET",
"BUILD_TARGET",
"CARGO_BUILD_TARGET",
"CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc",
"BINDGEN_EXTRA_CLANG_ARGS=--sysroot /usr/aarch64-linux-gnu/include/",
"TARI_NETWORK",
]

0 comments on commit afad4f6

Please sign in to comment.