-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
53c9e26
commit 75c57c9
Showing
7 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env sh | ||
set -eu | ||
|
||
# Check if x86_64-linux-gnu-gcc is installed AND that the user is on a mac | ||
if [ ! -x "$(command -v x86_64-linux-gnu-gcc)" ] && [ "$(uname)" = "Darwin" ]; then | ||
echo "Installing cross compile toolchain" | ||
brew tap messense/macos-cross-toolchains | ||
brew install x86_64-unknown-linux-gnu | ||
fi | ||
|
||
rustup target add x86_64-unknown-linux-gnu | ||
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-linux-gnu-gcc | ||
cargo build --release --package mls_validation_service --target x86_64-unknown-linux-gnu | ||
mkdir -p .cache | ||
cp -f ./target/x86_64-unknown-linux-gnu/release/mls-validation-service ./.cache/mls-validation-service | ||
docker build --platform=linux/amd64 -t xmtp/mls-validation-service:latest -f ./dev/validation_service/local.Dockerfile . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -eou pipefail | ||
|
||
docker-compose -f dev/docker/docker-compose.yml -p "xmtp-android" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -eou pipefail | ||
script_dir="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
|
||
"${script_dir}"/compose pull | ||
"${script_dir}"/compose up -d --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -eou pipefail | ||
|
||
if [[ "${OSTYPE}" == "darwin"* ]]; then | ||
if ! which buf &>/dev/null; then brew install buf; fi | ||
if ! which shellcheck &>/dev/null; then brew install shellcheck; fi | ||
if ! which markdownlint &>/dev/null; then brew install markdownlint-cli; fi | ||
if ! java -version &>/dev/null; then | ||
brew install java | ||
sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk \ | ||
/Library/Java/JavaVirtualMachines/ | ||
fi | ||
if ! kotlinc -version &>/dev/null; then brew install kotlin; fi | ||
fi | ||
|
||
rustup update | ||
|
||
dev/build_validation_service_local | ||
dev/local/up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM rust:1-bullseye as builder | ||
WORKDIR /code | ||
COPY . . | ||
RUN cargo build --release --package mls_validation_service | ||
|
||
FROM debian:bullseye-slim | ||
RUN apt-get update && apt-get install -y sqlite3 | ||
COPY --from=builder /code/target/release/mls-validation-service /usr/local/bin/mls-validation-service | ||
ENV RUST_LOG=info | ||
CMD ["mls-validation-service"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM debian:stable-slim | ||
RUN apt-get update && apt-get install -y sqlite3 | ||
COPY .cache/mls-validation-service /usr/local/bin/mls-validation-service | ||
ENV RUST_LOG=info | ||
CMD ["mls-validation-service"] |