mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-25 06:39:53 -04:00
fix: max 3 cores for docker build env
This commit is contained in:
parent
26f8147812
commit
b4118eb49e
2 changed files with 8 additions and 3 deletions
|
@ -50,6 +50,9 @@ RUN if [ ! -f "monero-sys/monero/CMakeLists.txt" ]; then \
|
||||||
|
|
||||||
WORKDIR /build/swap
|
WORKDIR /build/swap
|
||||||
|
|
||||||
|
# Act as if we are in a GitHub Actions environment
|
||||||
|
ENV DOCKER_BUILD=true
|
||||||
|
|
||||||
RUN cargo build -vv --bin=asb
|
RUN cargo build -vv --bin=asb
|
||||||
|
|
||||||
FROM ubuntu:24.04
|
FROM ubuntu:24.04
|
||||||
|
|
|
@ -2,6 +2,7 @@ use cmake::Config;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let is_github_actions: bool = std::env::var("GITHUB_ACTIONS").is_ok();
|
let is_github_actions: bool = std::env::var("GITHUB_ACTIONS").is_ok();
|
||||||
|
let is_docker_build: bool = std::env::var("DOCKER_BUILD").is_ok();
|
||||||
|
|
||||||
// Only rerun this when the bridge.rs or static_bridge.h file changes.
|
// Only rerun this when the bridge.rs or static_bridge.h file changes.
|
||||||
println!("cargo:rerun-if-changed=src/bridge.rs");
|
println!("cargo:rerun-if-changed=src/bridge.rs");
|
||||||
|
@ -37,9 +38,10 @@ fn main() {
|
||||||
.define("GTEST_HAS_ABSL", "OFF")
|
.define("GTEST_HAS_ABSL", "OFF")
|
||||||
// Use lightweight crypto library
|
// Use lightweight crypto library
|
||||||
.define("MONERO_WALLET_CRYPTO_LIBRARY", "cn")
|
.define("MONERO_WALLET_CRYPTO_LIBRARY", "cn")
|
||||||
.build_arg(match is_github_actions {
|
.build_arg(match (is_github_actions, is_docker_build) {
|
||||||
true => "-j1",
|
(true, _) => "-j1",
|
||||||
false => "-j",
|
(_, true) => "-j1",
|
||||||
|
(_, _) => "-j",
|
||||||
})
|
})
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue