diff --git a/.github/workflows/browser.yml b/.github/workflows/browser.yml new file mode 100644 index 000000000000..b2345fd00263 --- /dev/null +++ b/.github/workflows/browser.yml @@ -0,0 +1,142 @@ +# Attempt to build the whole browser +name: Browser + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + # Test complete build on Ubuntu + ubuntu-build: + runs-on: ubuntu-22.04 + + steps: + - name: Free Disk Space (Ubuntu) + uses: jlumbroso/free-disk-space@main + with: + tool-cache: true + android: true + dotnet: true + haskell: true + large-packages: true + docker-images: true + swap-storage: true + + - name: Install Dependencies + run: | + df -h + sudo apt-get update + sudo apt-get install -y \ + curl \ + python3 \ + python3-pip \ + python3-venv \ + tar \ + zip \ + unzip \ + git + sudo apt-get install -y --no-install-recommends ffmpeg libasound2 libatk1.0-0 libcairo-gobject2 libcairo2 libdbus-1-3 libdbus-glib-1-2 libfontconfig1 libfreetype6 libgdk-pixbuf-2.0-0 libglib2.0-0 libgtk-3-0 libpango-1.0-0 libpangocairo-1.0-0 libx11-6 libx11-xcb1 libxcb-shm0 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxtst6 xvfb fonts-noto-color-emoji fonts-unifont xfonts-cyrillic xfonts-scalable fonts-liberation fonts-ipafont-gothic fonts-wqy-zenhei fonts-tlwg-loma-otf fonts-freefont-ttf + python3 -m pip install setuptools + df -h + + - name: Checkout release branch + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Dry Run + run: | + df -h + cp taintfox_mozconfig_ubuntu .mozconfig + bash build.sh -p -n + + - name: Bootstrap + run: | + df -h + bash build.sh -u -v + + - name: Build + run: | + df -h + bash build.sh -s -v + + - name: Package + run: | + df -h + bash build.sh -s -u + + # Test complete build on Windows + windows-build: + runs-on: windows-latest + + steps: + + - name: Download mozbuild + run: | + Set-PSDebug -Trace 1 + Invoke-WebRequest https://ftp.mozilla.org/pub/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe -OutFile .\MozillaBuildSetup-Latest.exe + Start-Process .\MozillaBuildSetup-Latest.exe -ArgumentList '/S /D=C:\mozilla-build' -Wait + cmd.exe /c 'C:\mozilla-build\start-shell.bat' --help + rm .\MozillaBuildSetup-Latest.exe + + - name: Checkout release branch + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Bootstrap + run: | + cp "taintfox_mozconfig_win" ".mozconfig" + .\mach.ps1 --no-interactive bootstrap --application-choice=browser + $env:RUST_VERSION=$((((Get-Content .\.PLAYWRIGHT_VERSION | select-string RUST_VERSION) -Split "=")[1] -Split '"')[1]) + echo "Installing $env:RUST_VERSION from .PLAYWRIGHT_VERSION" + rustup install $env:RUST_VERSION + rustup default $env:RUST_VERSION + + - name: Build + run: | + .\mach.ps1 build + + - name: Package + run: | + .\mach.ps1 package + + # Test complete build on MacOS + macos-build: + strategy: + matrix: + # Build using both latest (M1 ARM) and macos-13 (Intel x86) + os: [macos-latest, macos-13] + runs-on: ${{ matrix.os }} + + steps: + + - name: Checkout release branch + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Bootstrap + run: | + cp "taintfox_mozconfig_ubuntu" ".mozconfig" + python3.11 ./mach --no-interactive bootstrap --application-choice=browser + source .PLAYWRIGHT_VERSION + echo "Installing ${RUST_VERSION} from .PLAYWRIGHT_VERSION" + rustup install ${RUST_VERSION} + rustup default ${RUST_VERSION} + + - name: Build + run: | + python3.11 ./mach build + + - name: Package + run: | + python3.11 ./mach package diff --git a/taintfox_mozconfig_win b/taintfox_mozconfig_win index c45d658b0b0b..371fbe67c194 100644 --- a/taintfox_mozconfig_win +++ b/taintfox_mozconfig_win @@ -1,40 +1,53 @@ -mk_add_options MOZ_MAKE_FLAGS="-s" +# limit number of parallel jobs - do not do this by default, but might be needed for build systems with limited resources +# mk_add_options MOZ_PARALLEL_BUILD=4 -# Export path to Windows C runtime libraries. -# This will cause those DLLs to be packaged with the application, which is required to run taintfox on non-developer machines +# Use ccache, make sure the path is correct +#ac_add_options --with-ccache=/usr/bin/ccache -# Add-on signing is not required for DevEdition -MOZ_REQUIRE_SIGNING= - -# Force Visual Studio compiler (default is clang) -#export CC=cl -#export LINKER=link - -# Set 32-bit build -#ac_add_options --target=i686-pc-mingw32 -#ac_add_options --host=x86_64-pc-mingw32 -#WIN32_REDIST_DIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.20.27508\x86\Microsoft.VC141.CRT" - - -# Set 64-bit build -ac_add_options --target=x86_64-pc-mingw32 -ac_add_options --host=x86_64-pc-mingw32 -WIN32_REDIST_DIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Redist\MSVC\14.20.27508\x64\Microsoft.VC141.CRT" +# On OS X we only support newer releases so that clang uses libc++ (llvm) instead of stdlibc++ +# We could work around this (typedef basic_string u16string), but this should be fine. +#ac_add_options --enable-macos-target=10.10 # disable updater ac_add_options --disable-updater +# Add-on signing is not required for DevEdition +MOZ_REQUIRE_SIGNING= + +ac_add_options --with-branding=browser/branding/foxhound + # # DEBUG BUILD # -#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg +#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-tf-dbg +#ac_add_options --enable-debug-symbols #ac_add_options --enable-debug #ac_add_options --disable-optimize +#ac_add_options --disable-tests +#ac_add_options --enable-project=js +#ac_add_options --enable-jitspew +# Package js shell. +export MOZ_PACKAGE_JSSHELL=1 # # RELEASE BUILD # -mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-tf-release-64 -ac_add_options --disable-tests -ac_add_options --enable-cdp +ac_add_options --with-app-name=foxhound +mk_add_options MOZ_APP_NAME=foxhound +mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-tf-release +#ac_add_options --disable-tests +ac_add_options --disable-sandbox +ac_add_options --without-wasm-sandboxed-libraries +ac_add_options --disable-crashreporter +ac_add_options --disable-backgroundtasks +ac_add_options --enable-release + +# +# OPTIMIZED BUILD WITH DEBUG SYMBOLS +# +#mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-tf-release-with-symbols +#ac_add_options --enable-debug-symbols +#ac_add_options --enable-gczeal +#ac_add_options --enable-optimize +#ac_add_options --disable-tests