From d8369c266f23fd7054a3a1e3d071cb5fadc27ecd Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 6 Jul 2024 13:56:29 +0200 Subject: Linux: optimize Github workflow by caching wxBuildConsole and wxBuildGUI folders We also modify build script to detect the presence of wxBuildConsole and wxBuildGUI folders and reuse them --- src/Build/build_veracrypt_linux_no_sse2.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'src/Build/build_veracrypt_linux_no_sse2.sh') diff --git a/src/Build/build_veracrypt_linux_no_sse2.sh b/src/Build/build_veracrypt_linux_no_sse2.sh index 7162ecd4..e5e46252 100755 --- a/src/Build/build_veracrypt_linux_no_sse2.sh +++ b/src/Build/build_veracrypt_linux_no_sse2.sh @@ -43,17 +43,27 @@ echo "Building GUI version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildGuiNoSSE2 -make WXSTATIC=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 NOSSE2=1 clean && make WXSTATIC=1 NOSSE2=1 && make WXSTATIC=1 NOSSE2=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + make WXSTATIC=1 NOSSE2=1 wxbuild || exit 1 +fi +make WXSTATIC=1 NOSSE2=1 clean || exit 1 +make WXSTATIC=1 NOSSE2=1 || exit 1 +make WXSTATIC=1 NOSSE2=1 package || exit 1 echo "Building console version of VeraCrypt" # this will be the temporary wxWidgets directory export WX_BUILD_DIR=$PARENTDIR/wxBuildConsoleNoSSE2 -make WXSTATIC=1 NOGUI=1 NOSSE2=1 wxbuild && make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package - -# Uncomment below and comment line above to reuse existing wxWidgets build -# make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean && make WXSTATIC=1 NOGUI=1 NOSSE2=1 && make WXSTATIC=1 NOGUI=1 NOSSE2=1 package +# Check if wx-config exists in WX_BUILD_DIR +if [ -L "${WX_BUILD_DIR}/wx-config" ]; then + echo "wx-config already exists in ${WX_BUILD_DIR}. Skipping wxbuild." +else + make WXSTATIC=1 NOGUI=1 NOSSE2=1 wxbuild || exit 1 +fi +make WXSTATIC=1 NOGUI=1 NOSSE2=1 clean || exit 1 +make WXSTATIC=1 NOGUI=1 NOSSE2=1 || exit 1 +make WXSTATIC=1 NOGUI=1 NOSSE2=1 package || exit -- cgit v1.2.3