Instead of checking repository for the existance of a commit sha,
we should make sure that our remote branch has the commit.
Otherwise, the `export.sh` script later on would not work!
WebKit build creates an empty folder `./Tools/Playwright/Playwright.xcodeproj/project.xcworkspace/xcshareddata/swiftpm`
To workaround this, let's remove the embedder folder when
preparing browser checkout.
This patch:
- switches `//browser_patches/chromium` to checkout and build
chromium-beta branch
- introduces `//browser_patches/chromium/roll_to_current_beta.sh` script
that pulls build configuration for beta from omaha proxy
- switches Github Action to pull daily to the latest beta
Drive-by: fix bug in argument parsing for Chromium building
This moves default Firefox and WebKit checkouts to $HOME folder,
unless browser specific env variables are specified.
In other words:
- Firefox checkouts goes to `$HOME/firefox` unless there's a
`$FF_CHECKOUT_PATH` that specifies a custom location.
- WebKit checkout goes to `$HOME/webkit` unless there's a
`$WK_CHECKOUT_PATH` that specifies a custom location.
With this change, all build bots will now re-use checkouts
between builds, which should speed up compilation.
This way bash won't expand and post-process variable values in any way.
The changes are driven with
[`shellcheck`](https://github.com/koalaman/shellcheck)
Every patch to Firefox should also go to firefox-stable. This patch
starts re-using Firefox-beta checkout for firefox-stable, making
possible to easily rebaseline work atop of firefox-stable.
With this patch, working on a patch in Firefox is a 2-step
process:
1. work on a patch against Firefox-Beta
2. rebaseline your work atop of Firefox-Stable
Working on Firefox-Beta is as usual:
- setup an up-to-date firefox checkout:
```sh
$ ./browser_patches/prepare_checkout.sh firefox
```
- create a new branch for your firefox work off `playwright-build`:
```sh
$ cd ./browser_patches/firefox/checkout
$ git checkout -b my-feature
```
- once work is done, export your branch:
```sh
$ ./browser_patches/export.sh firefox
```
Rebaselining your work for Firefox-Stable takes advantage of a single
checkout:
- prepare a firefox-stable checkout:
```sh
$ ./browser_patches/prepare_checkout.sh ff-stable
```
- rebaseline your feature branch atop of stable:
```sh
$ cd ./browser_patches/firefox/checkout
$ git checkout my-feature
$ git rebase -i playwright-build
```
- make sure firefox-stable compiles:
```sh
$ ./browser_patches/firefox-stable/build.sh
```
- export firefox-stable:
```sh
$ ./browser_patches/export.sh ff-stable
```
This adds a firefox-stable application to build on our bots.
This is basically a rebaselined version of 66541552d0
The firefox base revision is bb9bf7e886
Which is taken from `about://buildconfig` of a stable Firefox version
on Mac as of Apr 9, 2021.
References #5993
Official WebKit no longer supports Mac 10.14. However, since
this system is still very much in use, we want to be able to
keep it running for a while.
This patch adds a new browser that we would compile and maintain
specifically for Mac 10.14: `deprecated-webkit-mac-10.14`. This
browser is a clone of Webkit r1443 that is the last known revision
to compile on Mac 10.14.
As we move on, we're free to modify this browser however we want,
backporting important patches.
References #5833
`WK_CHECKOUT_PATH` defines location of webkit checkout on the
file system. All browser-related scripts, like `prepare_checkout.sh` and
`export.sh` respect this environment variable on all platforms.
**Preamble**
1. We're trying to setup a windows-based github self-hosted runner in the
playwright-internal repo.
1. Commands on Windows are mandated to have total arguments length
less then 32767 characters.
1. On windows, github self-hosted runner framework puts repository
checkout at `c:\w\playwright-internal\playwright-internal`
1. Our scripts create a checkout at
`c:\w\playwright-internal\playwright-internal\browser_patches\firefox\checkout`
1. One of the scripts in Firefox buildsystem tries to execute a command,
passing lots of absolute paths to various webidl's
1. The command fails due to restriction in (2)
**Problem**
Firefox build fails since checkout is deeply nested and hits max arg
size on windows.
**Solution**
This patch introduces a new variable `FF_CHECKOUT_PATH` that is
respected by all browser-related scripts. This way we'll be able
to checkout firefox to `c:\firefox` and avoid hitting long arguments
limit.
Instead of checking out the whole repository, we now do a shallow
clone.
We then gradually "unshallow" the clone, looking for the `BASE_REVISION`.
This should fix experimental mac-11 builder.
This patch moves FFMPEG building to buildbots:
- `ffmpeg-mac.zip` is built on Mac 10.14 machine
- `ffmpeg-win32.zip` and `ffmpeg-win64.zip` are cross-compiled on
Ubuntu 20.04 machine
All builds across the platforms share the same config:
- the same versions of `ffmpeg` and `libvpx`
- the same build configuration for both `ffmpeg` and `libvpx`
The config could be found in the `//browser_patches/ffmpeg/CONFIG.sh`.
The builds will be then copied manually and committed to the git
repository.
Relates #3258
After a chat with @aslushnikov we add this in two iterations. The first one (this PR) is about scheduled runs for testing the latest tip-of-tree version of the browsers daily and the next PR is about opening an automated PRs once its passing (not sure if its worth to add for failing too) or sending Telegram/Slack notifications.
Current status is that Firefox (around 2 hours) and WebKit (around 3-4 hours) works.
Known issues which I fix before we merge:
- ~~Changes in `test/base.fixture.ts` will get extracted in #3453~~
Feel free to review, current blockers are before we can merge:
- ~~#3453~~
- potential git clone optimisation by aslushnikov
Currently, it might happen that two different patches clash for the
same build number for the browsers. In this case, authors might
not even know that they need to rebaseline.
This patch starts adding a second line to `BUILD_NUMBER` files - the
signature and date of the `BUILD_NUMBER` change. These are guaranteed
to clash, so it should not be possible to land patches without
re-baselining them.
This changes `export.sh` to export diffs instead of patches.
`export.sh` now does not touch working directory, thus not
triggering clean builds and not intefering with an on-going
build.