devops: attempt to fix Firefox build (#16050)
This commit is contained in:
parent
60ab16377a
commit
265d00e3f9
|
|
@ -3,7 +3,6 @@ set -e
|
||||||
set +x
|
set +x
|
||||||
|
|
||||||
RUST_VERSION="1.59.0"
|
RUST_VERSION="1.59.0"
|
||||||
CBINDGEN_VERSION="0.24.3"
|
|
||||||
|
|
||||||
trap "cd $(pwd -P)" EXIT
|
trap "cd $(pwd -P)" EXIT
|
||||||
|
|
||||||
|
|
@ -117,62 +116,36 @@ if [[ -z "${IS_JUGGLER}" ]]; then
|
||||||
rustup install "${RUST_VERSION}"
|
rustup install "${RUST_VERSION}"
|
||||||
rustup default "${RUST_VERSION}"
|
rustup default "${RUST_VERSION}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TODO: cargo is not in the PATH on Windows
|
|
||||||
if command -v cargo >/dev/null; then
|
|
||||||
echo "-- Using cbindgen v${CBINDGEN_VERSION}"
|
|
||||||
cargo install cbindgen --version "${CBINDGEN_VERSION}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${IS_FULL}" ]]; then
|
if [[ -n "${IS_FULL}" ]]; then
|
||||||
if is_mac; then
|
# This is a slow but sure way to get all the necessary toolchains.
|
||||||
echo "ac_add_options --enable-bootstrap" >> .mozconfig
|
# However, it will not work if tree is dirty.
|
||||||
else
|
# Bail out if git repo is dirty.
|
||||||
# This is a slow but sure way to get all the necessary toolchains.
|
if [[ -n $(git status -s --untracked-files=no) ]]; then
|
||||||
# However, it will not work if tree is dirty.
|
echo "ERROR: dirty GIT state - commit everything and re-run the script."
|
||||||
# Bail out if git repo is dirty.
|
exit 1
|
||||||
if [[ -n $(git status -s --untracked-files=no) ]]; then
|
|
||||||
echo "ERROR: dirty GIT state - commit everything and re-run the script."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 1. We have a --single-branch checkout, so we have to add a "master" branch and fetch it
|
|
||||||
git remote set-branches --add browser_upstream master
|
|
||||||
git fetch browser_upstream master
|
|
||||||
# 2. Checkout the master branch and run bootstrap from it.
|
|
||||||
git checkout browser_upstream/master
|
|
||||||
SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser
|
|
||||||
git checkout -
|
|
||||||
rm -rf "${OBJ_FOLDER}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# 1. We have a --single-branch checkout, so we have to add a "master" branch and fetch it
|
||||||
|
git remote set-branches --add browser_upstream master
|
||||||
|
git fetch browser_upstream master
|
||||||
|
# 2. Checkout the master branch and run bootstrap from it.
|
||||||
|
git checkout browser_upstream/master
|
||||||
|
echo "ac_add_options --enable-bootstrap" >> .mozconfig
|
||||||
|
SHELL=/bin/sh ./mach --no-interactive bootstrap --application-choice=browser
|
||||||
|
git checkout -
|
||||||
|
rm -rf "${OBJ_FOLDER}"
|
||||||
|
|
||||||
if [[ -n "${WIN32_REDIST_DIR}" ]]; then
|
if [[ -n "${WIN32_REDIST_DIR}" ]]; then
|
||||||
# Having this option in .mozconfig kills incremental compilation.
|
# Having this option in .mozconfig kills incremental compilation.
|
||||||
echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig
|
echo "export WIN32_REDIST_DIR=\"$WIN32_REDIST_DIR\"" >> .mozconfig
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the cbindgen from mozbuild to rely on the one we install manually.
|
|
||||||
# See https://github.com/microsoft/playwright/issues/15174
|
|
||||||
if is_win; then
|
|
||||||
rm -rf "${USERPROFILE}\\.mozbuild\\cbindgen"
|
|
||||||
else
|
|
||||||
rm -rf "${HOME}/.mozbuild/cbindgen"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -n "${IS_JUGGLER}" ]]; then
|
if [[ -n "${IS_JUGGLER}" ]]; then
|
||||||
./mach build faster
|
./mach build faster
|
||||||
else
|
else
|
||||||
export MOZ_AUTOMATION=1
|
|
||||||
# Use winpaths instead of unix paths on Windows.
|
|
||||||
# note: 'cygpath' is not available in MozBuild shell.
|
|
||||||
if is_win; then
|
|
||||||
export MOZ_FETCHES_DIR="${USERPROFILE}\\.mozbuild"
|
|
||||||
else
|
|
||||||
export MOZ_FETCHES_DIR="${HOME}/.mozbuild"
|
|
||||||
fi
|
|
||||||
./mach build
|
./mach build
|
||||||
if is_mac; then
|
if is_mac; then
|
||||||
FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist
|
FF_DEBUG_BUILD="${IS_DEBUG}" node "${SCRIPT_FOLDER}"/install-preferences.js "$PWD"/${OBJ_FOLDER}/dist
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue