From eef780781b2aeadd2b342846d9b4ebc34f84b905 Mon Sep 17 00:00:00 2001 From: Geoffrey Arthaud <geoffrey.arthaud@developpement-durable.gouv.fr> Date: Tue, 27 Feb 2024 22:51:40 +0100 Subject: [PATCH] Try to improve cross compile --- .gitlab-ci.yml | 8 +++----- Cargo.toml | 5 +++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eba9cf6..8ded4ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,12 +31,10 @@ rust-nightly: rust-alpine: stage: build - image: rust:alpine - variables: - RUSTFLAGS: "-Ctarget-feature=+crt-static" + image: rust:latest script: - - apk update - - apk add --no-cache openssl-dev musl-dev + - apt update -y + - apt install -y musl-dev musl-tools build-essential - rustup target add x86_64-unknown-linux-musl - cargo build --target x86_64-unknown-linux-musl --release - target/x86_64-unknown-linux-musl/release/gitlab-project-doctor --help diff --git a/Cargo.toml b/Cargo.toml index cc58550..48e1c8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,8 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] +openssl-sys = "0.9" +openssl = { version = "0.10", features = ["vendored"] } atty = "0.2.14" chrono = "0.4.34" console = "0.15.2" @@ -25,5 +27,4 @@ rust-embed = "8.0.0" serde = "1.0.190" serde_json = "1.0.107" structopt = "0.3.26" -openssl-sys = "0.9" -openssl = { version = "0.10", features = ["vendored"] } + -- GitLab