taler-rust

GNU Taler code in Rust. Largely core banking integrations.
Log | Files | Refs | Submodules | README | LICENSE

commit 6d487a2ef4cb843c98d38621f16cedba3bd2c9d9
parent 7c0a0e2d06c4179c7f7d49c8b957fd3158b17b4c
Author: Antoine A <>
Date:   Tue, 11 Feb 2025 15:28:19 +0100

common: cross compilation CI

Diffstat:
A.ci/config.toml | 17+++++++++++++++++
M.gitignore | 2+-
MCargo.lock | 307++++++++++++++++++++++++++++++++++++++++++-------------------------------------
MCargo.toml | 6+++++-
Mcommon/taler-api/Cargo.toml | 6+-----
Mcommon/taler-test-utils/Cargo.toml | 7++-----
Mcontrib/ci/Containerfile | 30++++++++++++++++++++++--------
Mcontrib/ci/ci.sh | 3++-
Dcontrib/ci/deb.sh | 23-----------------------
Mcontrib/ci/jobs/0-codespell/config.ini | 1-
Dcontrib/ci/jobs/1-build/build.sh | 4----
Mcontrib/ci/jobs/1-build/job.sh | 7++++---
Mcontrib/ci/jobs/2-test/config.ini | 1-
Dcontrib/ci/jobs/3-amd64-deb/job.sh | 3---
Acontrib/ci/jobs/3-deb/job.sh | 25+++++++++++++++++++++++++
Rcontrib/ci/deb-test.sh -> contrib/ci/jobs/3-deb/test.sh | 0
Acontrib/ci/jobs/4-deploy/config.ini | 5+++++
Rcontrib/ci/jobs/5-deploy/job.sh -> contrib/ci/jobs/4-deploy/job.sh | 0
Dcontrib/ci/jobs/5-deploy/config.ini | 6------
Dcontrib/ci/nightly/4-arm64-deb/config.ini | 6------
Dcontrib/ci/nightly/4-arm64-deb/job.sh | 3---
Mtaler-magnet-bank/Cargo.toml | 8++------
22 files changed, 248 insertions(+), 222 deletions(-)

diff --git a/.ci/config.toml b/.ci/config.toml @@ -0,0 +1,17 @@ +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-C", + "link-arg=-fuse-ld=mold", + "-C", + "link-arg=--target=x86_64-unknown-linux-gnu", +] + +[target.aarch64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + "-C", + "link-arg=-fuse-ld=mold", + "-C", + "link-arg=--target=aarch64-unknown-linux-gnu", +] diff --git a/.gitignore b/.gitignore @@ -1,5 +1,5 @@ .env -.cargo +.ci test-suite.log target dev.conf diff --git a/Cargo.lock b/Cargo.lock @@ -318,6 +318,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] name = "chrono" version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -429,16 +435,6 @@ dependencies = [ ] [[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -834,21 +830,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] name = "form_urlencoded" version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -936,8 +917,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -1129,19 +1112,21 @@ dependencies = [ ] [[package]] -name = "hyper-tls" -version = "0.6.0" +name = "hyper-rustls" +version = "0.27.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" dependencies = [ - "bytes", - "http-body-util", + "futures-util", + "http", "hyper", "hyper-util", - "native-tls", + "rustls", + "rustls-pki-types", "tokio", - "tokio-native-tls", + "tokio-rustls", "tower-service", + "webpki-roots", ] [[package]] @@ -1542,23 +1527,6 @@ dependencies = [ ] [[package]] -name = "native-tls" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dab59f8e050d5df8e4dd87d9206fb6f65a483e20ac9fda365ade4fab353196c" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] name = "nu-ansi-term" version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1605,50 +1573,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] -name = "openssl" -version = "0.10.70" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" - -[[package]] -name = "openssl-sys" -version = "0.9.105" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] name = "overload" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1742,12 +1666,6 @@ dependencies = [ ] [[package]] -name = "pkg-config" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" - -[[package]] name = "plotters" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1834,6 +1752,58 @@ dependencies = [ ] [[package]] +name = "quinn" +version = "0.11.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62e96808277ec6f97351a2380e6c25114bc9e67037775464979f3037c92d05ef" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2fe5ef3495d7d2e377ff17b1a8ce2ee2ec2a18cde8b6ad6619d65d0701c135d" +dependencies = [ + "bytes", + "getrandom 0.2.15", + "rand 0.8.5", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] name = "quote" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1975,29 +1945,32 @@ dependencies = [ "http-body", "http-body-util", "hyper", - "hyper-tls", + "hyper-rustls", "hyper-util", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", + "quinn", + "rustls", "rustls-pemfile", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", "sync_wrapper", "tokio", - "tokio-native-tls", + "tokio-rustls", "tower", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "windows-registry", ] @@ -2022,6 +1995,21 @@ dependencies = [ ] [[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] name = "rust-multipart-rfc7578_2" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2044,6 +2032,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2066,6 +2060,20 @@ dependencies = [ ] [[package]] +name = "rustls" +version = "0.23.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9263ab4eb695e42321db096e3b8fbd715a59b154d5c88d82db2175b681ba7" +dependencies = [ + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] name = "rustls-pemfile" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2079,6 +2087,20 @@ name = "rustls-pki-types" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" +dependencies = [ + "web-time", +] + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "rustversion" @@ -2102,15 +2124,6 @@ dependencies = [ ] [[package]] -name = "schannel" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" -dependencies = [ - "windows-sys 0.59.0", -] - -[[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2131,29 +2144,6 @@ dependencies = [ ] [[package]] -name = "security-framework" -version = "2.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] name = "semver" version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2328,6 +2318,12 @@ dependencies = [ ] [[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] name = "spki" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2368,9 +2364,10 @@ dependencies = [ "indexmap 2.7.1", "log", "memchr", - "native-tls", "once_cell", "percent-encoding", + "rustls", + "rustls-pemfile", "serde", "serde_json", "sha2", @@ -2380,6 +2377,7 @@ dependencies = [ "tokio-stream", "tracing", "url", + "webpki-roots", ] [[package]] @@ -2750,12 +2748,12 @@ dependencies = [ ] [[package]] -name = "tokio-native-tls" -version = "0.3.1" +name = "tokio-rustls" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" dependencies = [ - "native-tls", + "rustls", "tokio", ] @@ -2902,6 +2900,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] name = "url" version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2944,12 +2948,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] name = "version_check" version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3077,6 +3075,25 @@ dependencies = [ ] [[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.26.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2210b291f7ea53617fbafcc4939f10914214ec15aace5ba62293a668f322c5c9" +dependencies = [ + "rustls-pki-types", +] + +[[package]] name = "whoami" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/Cargo.toml b/Cargo.toml @@ -25,7 +25,11 @@ serde_path_to_error = "0.1" serde_urlencoded = "0.7" tokio = { version = "1.42", features = ["macros"] } axum = "0.8" -sqlx = { version = "0.8", default-features = false } +sqlx = { version = "0.8", default-features = false, features = [ + "postgres", + "runtime-tokio-rustls", + "tls-rustls", +] } url = { version = "2.2", features = ["serde"] } criterion = { version = "0.5" } fastrand = "2.2" diff --git a/common/taler-api/Cargo.toml b/common/taler-api/Cargo.toml @@ -10,11 +10,6 @@ license-file.workspace = true [dependencies] listenfd = "1.0.0" dashmap = "6.1" -sqlx = { workspace = true, features = [ - "postgres", - "runtime-tokio-native-tls", - "tls-native-tls", -] } http-body-util = "0.1.2" libdeflater = "1.22.0" ed25519-dalek = { version = "2.1.1", default-features = false } @@ -27,6 +22,7 @@ axum.workspace = true url.workspace = true thiserror.workspace = true taler-common.workspace = true +sqlx.workspace = true [dev-dependencies] taler-test-utils.workspace = true diff --git a/common/taler-test-utils/Cargo.toml b/common/taler-test-utils/Cargo.toml @@ -17,8 +17,4 @@ taler-common.workspace = true taler-api.workspace = true tracing.workspace = true tracing-subscriber.workspace = true -sqlx = { workspace = true, features = [ - "postgres", - "runtime-tokio-native-tls", - "tls-native-tls", -] } +sqlx.workspace = true +\ No newline at end of file diff --git a/contrib/ci/Containerfile b/contrib/ci/Containerfile @@ -1,17 +1,31 @@ FROM docker.io/library/rust:bookworm -ENV DEBIAN_FRONTEND=noninteractive -# Persistent cargo cache -ENV CARGO_HOME=/workdir/.cargo - -RUN apt-get update -yq && \ +ENV DEBIAN_FRONTEND=noninteractive \ + # Persistent cargo cache + CARGO_HOME=/workdir/.ci + + # Add both amd64 and arm64 packages architecture +RUN dpkg --add-architecture amd64 && \ + dpkg --add-architecture arm64 && \ + # Apt sync + apt-get update -yq && \ apt-get upgrade -yq && \ + # Install build & test dependencies apt-get install -yq \ sudo \ make \ - libssl-dev \ - pkg-config \ - postgresql + postgresql \ + mold \ + clang \ + crossbuild-essential-arm64 \ + crossbuild-essential-amd64 \ + libc6-dev-arm64-cross \ + libc6-dev-amd64-cross && \ + # Add both amd64 and arm64 rustc targets + rustup target add x86_64-unknown-linux-gnu && \ + rustup target add aarch64-unknown-linux-gnu && \ + # Install cargo debian package tool + cargo install cargo-deb WORKDIR /workdir diff --git a/contrib/ci/ci.sh b/contrib/ci/ci.sh @@ -6,7 +6,8 @@ set -exvuo pipefail OCI_RUNTIME=$(which podman) REPO_NAME=$(basename "${PWD}") JOB_NAME="${1}" -JOB_ARCH=$((grep CONTAINER_ARCH contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "${2:-amd64}") +NATIVE_ARCH=$(dpkg --print-architecture) +JOB_ARCH=$((grep CONTAINER_ARCH contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "${2:-$NATIVE_ARCH}") JOB_CONTAINER=$((grep CONTAINER_NAME contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "localhost/${REPO_NAME}:${JOB_ARCH}") CONTAINER_BUILD=$((grep CONTAINER_BUILD contrib/ci/jobs/${JOB_NAME}/config.ini | cut -d' ' -f 3) || echo "True") diff --git a/contrib/ci/deb.sh b/contrib/ci/deb.sh @@ -1,22 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -# Update system -apt-get update -yq -apt-get upgrade -yq -cargo install cargo-deb - -# Build package -export GIT_HASH=$(git rev-parse --short HEAD) -export VERSION="$(./contrib/ci/version.sh)" -echo "Building package version ${VERSION}" -make deb - -# Test package -dpkg -i /workdir/target/debian/taler-magnet-bank*.deb -./contrib/ci/deb-test.sh - -# Move to artifact -ls -alh /workdir/target/debian/taler-magnet-bank*.deb -mkdir -p /artifacts/magnet-bank/${CI_COMMIT_REF} # Variable comes from CI environment -mv /workdir/target/debian/taler-magnet-bank*.deb /artifacts/magnet-bank/${CI_COMMIT_REF} -\ No newline at end of file diff --git a/contrib/ci/jobs/0-codespell/config.ini b/contrib/ci/jobs/0-codespell/config.ini @@ -3,4 +3,3 @@ HALT_ON_FAILURE = False WARN_ON_FAILURE = True CONTAINER_BUILD = False CONTAINER_NAME = nixery.dev/shell/codespell -CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/1-build/build.sh b/contrib/ci/jobs/1-build/build.sh @@ -1,4 +0,0 @@ -#!/bin/bash -set -exuo pipefail - -make diff --git a/contrib/ci/jobs/1-build/job.sh b/contrib/ci/jobs/1-build/job.sh @@ -1,9 +1,10 @@ #!/bin/bash set -exuo pipefail +# Update system apt-get update -yq apt-get upgrade -yq -job_dir=$(dirname "${BASH_SOURCE[0]}") - -"${job_dir}"/build.sh +# Build for release +cargo build --release --target x86_64-unknown-linux-gnu +cargo build --release --target aarch64-unknown-linux-gnu diff --git a/contrib/ci/jobs/2-test/config.ini b/contrib/ci/jobs/2-test/config.ini @@ -3,4 +3,3 @@ HALT_ON_FAILURE = False WARN_ON_FAILURE = True CONTAINER_BUILD = True CONTAINER_NAME = localhost/taler-rust -CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/3-amd64-deb/job.sh b/contrib/ci/jobs/3-amd64-deb/job.sh @@ -1,2 +0,0 @@ -#!/bin/bash -exec ./contrib/ci/deb.sh -\ No newline at end of file diff --git a/contrib/ci/jobs/3-deb/job.sh b/contrib/ci/jobs/3-deb/job.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -exuo pipefail + +# Update system +apt-get update -yq +apt-get upgrade -yq +cargo install cargo-deb + +# Build package +export GIT_HASH=$(git rev-parse --short HEAD) +export VERSION="$(./contrib/ci/version.sh)" +echo "Building package version ${VERSION}" +cargo deb -p taler-magnet-bank --deb-version ${VERSION} --target x86_64-unknown-linux-gnu +cargo deb -p taler-magnet-bank --deb-version ${VERSION} --target aarch64-unknown-linux-gnu + +# Test package +ARCH=$(dpkg --print-architecture) +dpkg -i /workdir/target/*/debian/*$ARCH.deb +./contrib/ci/jobs/3-deb/test.sh + +# Move to artifact +ls -alh /workdir/target/*/debian/*.deb +mkdir -p /artifacts/magnet-bank/${CI_COMMIT_REF} # Variable comes from CI environment +mv /workdir/target/*/debian/*.deb /artifacts/magnet-bank/${CI_COMMIT_REF} +\ No newline at end of file diff --git a/contrib/ci/deb-test.sh b/contrib/ci/jobs/3-deb/test.sh diff --git a/contrib/ci/jobs/4-deploy/config.ini b/contrib/ci/jobs/4-deploy/config.ini @@ -0,0 +1,5 @@ +[build] +HALT_ON_FAILURE = True +WARN_ON_FAILURE = True +CONTAINER_BUILD = False +CONTAINER_NAME = nixery.dev/shell/rsync diff --git a/contrib/ci/jobs/5-deploy/job.sh b/contrib/ci/jobs/4-deploy/job.sh diff --git a/contrib/ci/jobs/5-deploy/config.ini b/contrib/ci/jobs/5-deploy/config.ini @@ -1,6 +0,0 @@ -[build] -HALT_ON_FAILURE = True -WARN_ON_FAILURE = True -CONTAINER_BUILD = False -CONTAINER_NAME = nixery.dev/shell/rsync -CONTAINER_ARCH = amd64 diff --git a/contrib/ci/nightly/4-arm64-deb/config.ini b/contrib/ci/nightly/4-arm64-deb/config.ini @@ -1,6 +0,0 @@ -[build] -HALT_ON_FAILURE = True -WARN_ON_FAILURE = True -CONTAINER_BUILD = True -CONTAINER_NAME = merchant:arm64 -CONTAINER_ARCH = arm64 diff --git a/contrib/ci/nightly/4-arm64-deb/job.sh b/contrib/ci/nightly/4-arm64-deb/job.sh @@ -1,2 +0,0 @@ -#!/bin/bash -exec ./contrib/ci/deb.sh -\ No newline at end of file diff --git a/taler-magnet-bank/Cargo.toml b/taler-magnet-bank/Cargo.toml @@ -12,7 +12,7 @@ license-file.workspace = true rand_core = { version = "0.6.4" } reqwest = { version = "0.12", default-features = false, features = [ "json", - "native-tls", + "rustls-tls", ] } hmac = "0.12" sha1 = "0.10" @@ -22,11 +22,7 @@ base64 = "0.22" form_urlencoded = "1.2" percent-encoding = "2.3" passterm = "2.0" -sqlx = { workspace = true, features = [ - "postgres", - "runtime-tokio-native-tls", - "tls-native-tls", -] } +sqlx.workspace = true serde_json = { workspace = true, features = ["raw_value"] } jiff = { workspace = true, features = ["serde"] } taler-common.workspace = true