cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.28k stars 214 forks source link

Lots of different pixels when verifying text shadows on different OSs #311

Open TWiStErRob opened 2 years ago

TWiStErRob commented 2 years ago

image Notice that background image rendering is clearly the same, it's only the text shadows.

The two runs are from local machine and GitHub actions.

GHA (readme says Zulu)

      - uses: actions/setup-java@v1
        with:
          java-version: 11

Local

openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

or

openjdk version "11.0.13" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)

I'm running on Windows, while GHA is Ubuntu.

Feel free to close this, if you think it's not fixable, just wanted to let you know. We have a multiplatform team at work, so I guess it might come up for others too.

jrodbx commented 2 years ago

Yea, I've noticed this as well, but haven't dug in much yet. Some ideas: 1) Slight difference in JDK vendor or version (doubtful since native rendering, but worth checking) 2) Image encoding/scaling gives different results on machines?

TWiStErRob commented 2 years ago

We can rule out part of 2. with https://github.com/cashapp/paparazzi/compare/gpowell/sample-widget-render-extension?expand=1

yschimke commented 1 year ago

Got hit by this as well. Is there any advice on the best combinations across OSX for local development and Linux for CI?

Are newer JDKs better or worse for consistency?

borsini commented 1 year ago

@yschimke as a temporary solution we ended up generating the screenshots only on the CI, then pushing them in a new commit on our PRs. This ensures that screenshots are always the same.