From 7c74f89c6159d8da6e42745670ccbfab13deee7d Mon Sep 17 00:00:00 2001 From: Alexander Evgin Date: Mon, 9 Dec 2024 23:55:31 +0400 Subject: [PATCH] Add Cross.toml --- Cross.toml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Cross.toml diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 0000000..62f31eb --- /dev/null +++ b/Cross.toml @@ -0,0 +1,26 @@ +[build.env] +passthrough = ["BUF_CACHE_DIR=/tmp"] + +[target.x86_64-unknown-linux-gnu] +pre-build = [ + "apt-get update", + "apt-get install -y openssl ca-certificates pkg-config cmake libssl-dev curl", + "curl -sSL https://github.com/bufbuild/buf/releases/download/v1.47.2/buf-Linux-x86_64 -o /usr/local/bin/buf", + "chmod +x /usr/local/bin/buf", + "buf --version", + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-v25.1-linux-x86_64.zip -o /tmp/protoc.zip", + "unzip /tmp/protoc.zip -d /usr/local", + "protoc --version", +] + +[target.aarch64-unknown-linux-gnu] +pre-build = [ + "apt-get update", + "apt-get install -y openssl ca-certificates pkg-config cmake libssl-dev curl", + "curl -sSL https://github.com/bufbuild/buf/releases/download/v1.47.2/buf-Linux-aarch64 -o /usr/local/bin/buf", + "chmod +x /usr/local/bin/buf", + "buf --version", + "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v25.1/protoc-v25.1-linux-aarch_64.zip -o /tmp/protoc.zip", + "unzip /tmp/protoc.zip -d /usr/local", + "protoc --version", +]