Dockerfile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. FROM ubuntu:24.04
  2. RUN apt update && apt install -y build-essential rustup python3-pip libssl-dev pkg-config git curl make iproute2
  3. # rdsys (one of the dependencies for the Lox benchmarks) is written in Go
  4. RUN if [ `uname -m` = "aarch64" ]; then GO_ARCH=arm64; else GO_ARCH=amd64; fi; \
  5. curl -OL https://golang.org/dl/go1.25.6.linux-${GO_ARCH}.tar.gz \
  6. && tar -C /usr/local -xzf go1.25.6.linux-${GO_ARCH}.tar.gz \
  7. && rm go1.25.6.linux-${GO_ARCH}.tar.gz
  8. # Set up Go environment
  9. ENV PATH=$PATH:/usr/local/go/bin
  10. # Verify installation
  11. RUN go version
  12. # Install a recent Rust compiler
  13. RUN install -D /usr/bin/rustup /root/.cargo/bin/rustup && /root/.cargo/bin/rustup install 1.92.0
  14. COPY . /root/sigma-rs-artifact/
  15. # Build all the tests, binaries, benchmarks
  16. WORKDIR /root/sigma-rs-artifact/spongefish
  17. RUN cargo build --release --all-targets
  18. RUN cargo build --release --all-targets -p spongefish
  19. WORKDIR /root/sigma-rs-artifact/sigma-proofs
  20. RUN cargo build --release --all-targets
  21. WORKDIR /root/sigma-rs-artifact/sigma-compiler
  22. RUN cargo build --release --all-targets
  23. WORKDIR /root/sigma-rs-artifact/sigma-compiler/sigma-compiler-core
  24. RUN cargo build --release --all-targets
  25. WORKDIR /root/sigma-rs-artifact/sigma-compiler/sigma-compiler-derive
  26. RUN cargo build --release --all-targets
  27. WORKDIR /root/sigma-rs-artifact/cmz
  28. RUN cargo build --release --all-targets
  29. WORKDIR /root/sigma-rs-artifact/cmz/cmz-core
  30. RUN cargo build --release --all-targets
  31. WORKDIR /root/sigma-rs-artifact/cmz/cmz-derive
  32. RUN cargo build --release --all-targets
  33. WORKDIR /root/sigma-rs-artifact/application-ooni
  34. RUN cargo build --release --all-targets
  35. RUN cargo build --release --all-targets -p ooniauth-core
  36. WORKDIR /root/sigma-rs-artifact/application-lox/crates/lox-extensions
  37. RUN cargo build --release --features=bridgeauth,test --all-targets
  38. WORKDIR /root/sigma-rs-artifact/application-lox/crates/lox-distributor
  39. RUN cargo build --release --features=test-branch --all-targets
  40. WORKDIR /root/sigma-rs-artifact/application-lox-zkp/crates/lox-library
  41. RUN cargo build --release --features=bridgeauth --all-targets
  42. WORKDIR /root/sigma-rs-artifact/application-lox-zkp/crates/lox-distributor
  43. RUN cargo build --release --features=test-branch --all-targets
  44. # Build the wasm testing environment
  45. WORKDIR /root/sigma-rs-artifact
  46. RUN git clone https://gitlab.torproject.org/tpo/anti-censorship/rdsys.git
  47. WORKDIR /root/sigma-rs-artifact/rdsys
  48. RUN make build
  49. RUN make descriptors
  50. WORKDIR /root/sigma-rs-artifact/application-lox/crates/lox-wasm
  51. RUN cargo install wasm-pack
  52. RUN /root/.cargo/bin/wasm-pack build --release --target web
  53. WORKDIR /root/sigma-rs-artifact/application-lox-zkp/crates/lox-wasm
  54. RUN /root/.cargo/bin/wasm-pack build --release --target web
  55. WORKDIR /root/sigma-rs-artifact/