cypress-io / cypress-docker-images

Docker images with Cypress dependencies and browsers
https://on.cypress.io/continuous-integration
MIT License
1.02k stars 380 forks source link

Add Chromium to factory build process #1191

Open MikeMcC399 opened 3 months ago

MikeMcC399 commented 3 months ago

What would you like?

Add Chromium to the factory build process described in the cypress/factory README document.

Why is this needed?

  1. Chromium is one of the browsers recognized by Cypress (see Launching Browsers) and is currently not explicitly covered by Cypress Docker images.
  2. Chromium is available for both Linux/amd64 and Linux/arm64 architectures.

Other

MikeMcC399 commented 2 months ago

@neehhaa06

To fix the fatal: invalid refspec '0.1.*' error:

This is an open enhancement request. There is nothing to "fix" here since it has not been implemented, so I don't understand your comments.

lhridley commented 2 months ago

I built a custom cypress docker image with both Chromium and Firefox installed to execute Cypress tests on a Macbook Pro M3 Max. Both install and execute tests without issue.

Why is this still an open issue?

MikeMcC399 commented 2 months ago

@lhridley

I built a custom cypress docker image with both Chromium and Firefox installed to execute Cypress tests on a Macbook Pro M3 Max. Both install and execute tests without issue.

This is an enhancement request to add Chromium to the build process for cypress/factory, similar to the way that browsers Chrome, Firefox and Chrome can be selected by version. As mentioned in https://github.com/cypress-io/cypress-docker-images/issues/695#issuecomment-1450308717 it needs a PR to add the process. The work is however not trivial and nobody so far has come forward with the necessary additional coding and documentation. That is why it is still an open issue.

MikeMcC399 commented 2 months ago

The cypress/factory build process is based on defining a version argument which is used to download and install the selected component.

Chromium works with revisions / branch base positions rather than versions, so for instance Chromium Linux Version 127.0.6533.119 would be downloaded as branch base position 1313161. There is a lookup for this on https://chromiumdash.appspot.com/releases?platform=Linux

I can find the Chromium Linux x64 download equivalent for this on https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1313161%2Fchrome-linux.zip

however so far I have not been able to locate an equivalent download for Linux arm64.

The Debian Chromium package 126.0.6478.182-1~deb12u1 [security]: arm64 armhf is a fixed version equivalent to Branch Base Position 1300313 and although this allows Chromium for arm64 to be installed, it lacks the flexibility to select a specific Branch Base Position.

If anybody has additional information about whether there is a download location available for current versions of Chromium Linux arm64 allowing selection of specific Branch Base Position, it would be very helpful to learn about it here!

henkerik commented 1 month ago

If anybody has additional information about whether there is a download location available for Chromium Linux arm64 allowing selection of specific Branch Base Position, it would be very helpful to learn about it here!

@MikeMcC399 Perhaps here https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_ARM_Cross-Compile/ ?

MikeMcC399 commented 1 month ago

@henkerik

If anybody has additional information about whether there is a download location available for Chromium Linux arm64 allowing selection of specific Branch Base Position, it would be very helpful to learn about it here!

Perhaps here https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_ARM_Cross-Compile/ ?

Thanks for taking an interest! Unfortunately that directory has not been updated during the last 10 years and is therefore no longer useful. The latest revision in the directory https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html?prefix=Linux_ARM_Cross-Compile/ is 270195 from the year 2014.

The current stable revision of Chromium is 1343869 for Chromium 129.

I modified my request to specify "current versions of Chromium Linux arm64", to make it clearer.