High-performance implementation of plcbundle written in Rust

ci(workflows): configure OpenSSL environment for builds

+29
+29
.tangled/workflows/build.yml
··· 24 24 RUST_BACKTRACE: "1" 25 25 # Force reproducible builds in CI 26 26 CARGO_TERM_COLOR: "always" 27 + OPENSSL_NO_PKG_CONFIG: "1" 27 28 28 29 steps: 29 30 - name: "Set up Rust" 30 31 command: | 31 32 rustup default stable 33 + 34 + - name: "Configure OpenSSL" 35 + command: | 36 + set -euo pipefail 37 + OPENSSL_BIN="$(command -v openssl || true)" 38 + if [ -n "$OPENSSL_BIN" ]; then 39 + OPENSSL_PREFIX="$(dirname "$(dirname "$(readlink -f "$OPENSSL_BIN")")")" 40 + export OPENSSL_DIR="$OPENSSL_PREFIX" 41 + export OPENSSL_LIB_DIR="$OPENSSL_PREFIX/lib" 42 + fi 43 + if [ -z "${OPENSSL_INCLUDE_DIR:-}" ]; then 44 + INC_DIR="$(ls -d /nix/store/*openssl*-dev*/include 2>/dev/null | head -n 1 || true)" 45 + if [ -n "$INC_DIR" ]; then 46 + export OPENSSL_INCLUDE_DIR="$INC_DIR" 47 + elif [ -d "$OPENSSL_PREFIX/include" ]; then 48 + export OPENSSL_INCLUDE_DIR="$OPENSSL_PREFIX/include" 49 + fi 50 + fi 51 + if command -v pkg-config >/dev/null 2>&1; then 52 + PC_DIR="$(ls -d /nix/store/*openssl*-dev*/lib/pkgconfig 2>/dev/null | head -n 1 || true)" 53 + if [ -n "$PC_DIR" ]; then 54 + export PKG_CONFIG_PATH="${PC_DIR}:${PKG_CONFIG_PATH:-}" 55 + fi 56 + fi 57 + echo "OPENSSL_DIR=${OPENSSL_DIR:-}" 58 + echo "OPENSSL_LIB_DIR=${OPENSSL_LIB_DIR:-}" 59 + echo "OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR:-}" 60 + echo "PKG_CONFIG_PATH=${PKG_CONFIG_PATH:-}" 32 61 33 62 - name: "Download dependencies" 34 63 command: |