Commit 54030285 authored by trinity-1686a's avatar trinity-1686a 💜
Browse files

make arti availlable as build artifact

and make builds reproducible
sha256sum: f141c54929a43a31b9ed6b529f6f863aace87f7406818b2f8ffe2b7a5e2803fb
parent d4430554
......@@ -2,7 +2,6 @@
/target/
/*/target/
/*/fuzz/target/
Cargo.lock
*~
.#*
\#*\#
......@@ -34,3 +34,13 @@ rust-nightly:
- cargo clippy --all-features
- RUSTDOCFLAGS="-Dwarnings" cargo doc --all-features --document-private-items
build-repro:
stage: build
image: rust:1.54.0-alpine3.14
script:
- ./maint/reproducible_build.sh
- mv /arti/target/x86_64-unknown-linux-musl/release/arti ./arti-bin
artifacts:
paths:
- arti-bin
expire_in: 1 day
This diff is collapsed.
......@@ -14,6 +14,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/"
default = [ "tokio" ]
async-std = [ "tor-client/async-std", "tor-rtcompat/async-std", "async-ctrlc", "once_cell" ]
tokio = [ "tokio-crate", "tor-client/tokio", "tor-rtcompat/tokio" ]
vendored = [ "tor-rtcompat/vendored" ]
[dependencies]
tor-client = { package="arti-tor-client", path = "../tor-client", version="0.0.0" }
......
#!/bin/sh
exec docker run --rm -i -v $(git rev-parse --show-toplevel):/builds/arti -w /builds/arti --shm-size=512m rust:1.54.0-alpine3.14 ./maint/reproducible_build.sh
#!/bin/sh
set -x
if [ ! -f /.dockerenv ]; then
echo Not running inside Docker, build will probably not be reproducible
echo Use docker_reproducible_build.sh instead to get the right environment
fi
here=`pwd`
export CFLAGS="-march=westmere"
export RUSTFLAGS="-C target-cpu=westmere"
## force build to run in a fixed directory
cp -a $here /arti
cd /arti
## use tmpfs
## TODO make /dev/shm bigger to not depend on a docker bug
#mkdir -p /dev/shm/registry /usr/local/cargo/registry
#ln -s /dev/shm/registry /usr/local/cargo/registry/src
mkdir -p /sys/fs/cgroup/registry /usr/local/cargo/registry
ln -s /sys/fs/cgroup/registry /usr/local/cargo/registry/src
## add missing dependancies
apk add --no-cache musl-dev perl make sqlite-static sqlite-dev
cargo build -p arti --target x86_64-unknown-linux-musl --release --features vendored
sha256sum target/x86_64-unknown-linux-musl/release/arti
......@@ -15,6 +15,7 @@ repository="https://gitlab.torproject.org/tpo/core/arti.git/"
default = [ ]
async-std = [ "async-std-crate", "async-io", "async-native-tls" , "async_executors/async_std" ]
tokio = [ "tokio-crate", "tokio-util", "tokio-native-tls", "async_executors/tokio_tp" ]
vendored = [ "native-tls/vendored" ]
[dependencies]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment