From e6776fd9222944e6eae15a6e1bb5155754fb1e1e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 30 Apr 2023 06:08:16 -0400 Subject: [PATCH] Skip 32-bit Linux build in CI or tests --- app/build.sh | 11 +++++++++-- app/scripts/fetch_xulrunner | 23 +++++++++++++---------- test/runtests.sh | 2 +- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/app/build.sh b/app/build.sh index c89629fecd..d5f0c875c7 100755 --- a/app/build.sh +++ b/app/build.sh @@ -122,7 +122,7 @@ if [[ $BUILD_MAC == 0 ]] && [[ $BUILD_WIN == 0 ]] && [[ $BUILD_LINUX == 0 ]]; th usage fi -if [[ -z "${ZOTERO_INCLUDE_TESTS:-}" ]] || [[ $ZOTERO_INCLUDE_TESTS == "0" ]]; then +if [[ -z "${ZOTERO_TEST:-}" ]] || [[ $ZOTERO_TEST == "0" ]]; then include_tests=0 else include_tests=1 @@ -779,7 +779,14 @@ fi # Linux if [ $BUILD_LINUX == 1 ]; then - for arch in "i686" "x86_64"; do + # Skip 32-bit build in tests + if [ "${ZOTERO_TEST:-}" = "1" ]; then + archs="x86_64" + else + archs="i686 x86_64" + fi + + for arch in $archs; do runtime_path="${LINUX_RUNTIME_PATH_PREFIX}${arch}" # Set up directory diff --git a/app/scripts/fetch_xulrunner b/app/scripts/fetch_xulrunner index a4699dee0d..2d87878a8a 100755 --- a/app/scripts/fetch_xulrunner +++ b/app/scripts/fetch_xulrunner @@ -378,16 +378,19 @@ if [ $BUILD_LINUX == 1 ]; then rm -rf firefox - curl -O "$DOWNLOAD_URL/linux-i686/en-US/firefox-$GECKO_VERSION.tar.bz2" - rm -rf firefox-i686 - tar xvf firefox-$GECKO_VERSION.tar.bz2 - mv firefox firefox-i686 - - pushd firefox-i686 - modify_omni linux32 - popd - - rm "firefox-$GECKO_VERSION.tar.bz2" + # Include 32-bit build if not in CI + if [ -z "${CI:-}" ]; then + curl -O "$DOWNLOAD_URL/linux-i686/en-US/firefox-$GECKO_VERSION.tar.bz2" + rm -rf firefox-i686 + tar xvf firefox-$GECKO_VERSION.tar.bz2 + mv firefox firefox-i686 + + pushd firefox-i686 + modify_omni linux32 + popd + + rm "firefox-$GECKO_VERSION.tar.bz2" + fi curl -O "$DOWNLOAD_URL/linux-x86_64/en-US/firefox-$GECKO_VERSION.tar.bz2" rm -rf firefox-x86_64 diff --git a/test/runtests.sh b/test/runtests.sh index bafc7694fc..ac30388ef9 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -164,7 +164,7 @@ if [[ -z "$CI" ]] && ! ps | grep js-build/build.js | grep -v grep > /dev/null; t echo fi -ZOTERO_INCLUDE_TESTS=1 "$ROOT_DIR/app/scripts/dir_build" -q +ZOTERO_TEST=1 "$ROOT_DIR/app/scripts/dir_build" -q makePath FX_PROFILE "$PROFILE" MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$Z_EXECUTABLE" -profile "$FX_PROFILE" \