summaryrefslogtreecommitdiffstats
path: root/ci/env-common.inc.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:32:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:32:49 +0000
commit8053187731ae8e3eb368d8360989cf5fd6eed9f7 (patch)
tree32bada84ff5d7460cdf3934fcbdbe770d6afe4cd /ci/env-common.inc.sh
parentInitial commit. (diff)
downloadrnp-8053187731ae8e3eb368d8360989cf5fd6eed9f7.tar.xz
rnp-8053187731ae8e3eb368d8360989cf5fd6eed9f7.zip
Adding upstream version 0.17.0.upstream/0.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ci/env-common.inc.sh')
-rw-r--r--ci/env-common.inc.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/ci/env-common.inc.sh b/ci/env-common.inc.sh
new file mode 100644
index 0000000..11712f0
--- /dev/null
+++ b/ci/env-common.inc.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+: "${LOCAL_BUILDS:=$HOME/local-builds}"
+: "${LOCAL_INSTALLS:=$HOME/local-installs}"
+: "${BOTAN_INSTALL:=$LOCAL_INSTALLS/botan-install}"
+: "${JSONC_INSTALL:=$LOCAL_INSTALLS/jsonc-install}"
+: "${GPG_INSTALL:=$LOCAL_INSTALLS/gpg-install}"
+: "${RNP_INSTALL:=$LOCAL_INSTALLS/rnp-install}"
+: "${CPU:=}"
+: "${SUDO:=}"
+
+for var in LOCAL_BUILDS LOCAL_INSTALLS BOTAN_INSTALL JSONC_INSTALL \
+ GPG_INSTALL RNP_INSTALL CPU SUDO; do
+ export "${var?}"
+done
+
+: "${BUILD_MODE:=normal}"
+
+if [ "$BUILD_MODE" = "sanitize" ]; then
+ export CXX=clang++
+ export CC=clang
+fi
+
+BOTAN_MODULES=$(<ci/botan-modules tr '\n' ',')
+
+export BOTAN_MODULES
+
+# Don't clean up tempdirs when in CI runners to save time. Unset to disable.
+export RNP_KEEP_TEMP=1