From 612b1ccda0c79d39b94ad7ca2a4075c4bdfae454 Mon Sep 17 00:00:00 2001 From: Ottatop Date: Fri, 26 Apr 2024 13:03:17 -0500 Subject: [PATCH] Add wlcs compilation script --- .gitignore | 4 ++++ compile_wlcs.sh | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 compile_wlcs.sh diff --git a/.gitignore b/.gitignore index 815b989..9a64ae2 100644 --- a/.gitignore +++ b/.gitignore @@ -9,5 +9,9 @@ target/ # MSVC Windows builds of rustc generate these, which store debugging information *.pdb +# Don't push local doc builds api/lua/doc/doc +# This is a library api/rust/Cargo.lock +# Don't push compiled WLCS +wlcs diff --git a/compile_wlcs.sh b/compile_wlcs.sh new file mode 100755 index 0000000..be9c814 --- /dev/null +++ b/compile_wlcs.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +WLCS_SHA=26c5a8cfef265b4ae021adebfec90d758c08792e + +if [ -f "./wlcs/wlcs" ] && [ "$(cd wlcs; git rev-parse HEAD)" = "${WLCS_SHA}" ] ; then + echo "WLCS commit 26c5a8c is already compiled" +else + echo "Compiling WLCS" + git clone https://github.com/canonical/wlcs + cd wlcs || exit + # checkout a specific revision + git reset --hard "${WLCS_SHA}" + cmake -DWLCS_BUILD_ASAN=False -DWLCS_BUILD_TSAN=False -DWLCS_BUILD_UBSAN=False -DCMAKE_EXPORT_COMPILE_COMMANDS=1 . + make +fi