Skip to content

Conversation

@acuteaangle
Copy link
Contributor

Hopefully prevent future regressions such as gh-63.

Closes: gh-62
---
This is currently blocked by gh-63, as we need to fix the tests before we can make sure this works as intended.

Hopefully prevent future regressions such as za3kgh-63.

Closes: za3kgh-62
@za3k
Copy link
Owner

za3k commented Mar 23, 2025

Aww thanks, I wasn't expecting someone else to do this!

@acuteaangle
Copy link
Contributor Author

:3
I had some semi-recent experience setting up GitHub Actions for PineFlash, so it wasn’t difficult to cut out the Rust stuff and repurpose that ^-^

@acuteaangle
Copy link
Contributor Author

acuteaangle commented Mar 23, 2025

This currently only runs tests on Linux. It should probably test MacOS as well, but I’m not certain about the dependency installation process over there. I’ll try it out in a different branch and report back if I have any success.

EDIT: Update, looks good; pushing here.

@acuteaangle acuteaangle marked this pull request as ready for review March 23, 2025 17:56
@acuteaangle
Copy link
Contributor Author

acuteaangle commented Mar 23, 2025

Marking this as no longer a draft so that hopefully the checks will actually attempt to run here.
Also technically not a draft, just waiting on other fixes.

I’m not sure why the checks aren’t running on this PR itself. They’re running on my branch.
In my PineFlash PR, checks definitely also ran on the CI PR itself.

Also, I need to force-push an update to the last commit, ‘linux’ is no longer accurate as a job name.

As we support MacOS, we should additionally run tests on MacOS in CI
za3k added a commit that referenced this pull request Mar 24, 2025
Overall the backups are working fine, so all this commit does it update blessed values and add some additional tests.

First, this should never have gotten to master for more than a day. There is an ongoing PR #64 to add continuous integration, so that if tests fail we are immediately alerted. (and for PRs, we know if tests pass before merging)

On to the actual reproducibility issues.

The first is that the explanatory text changed from
    "To restore this file from the command line in Linux" to
    "To restore this file from the command line"

The second is that python's gzip module had a reproduciblity regression between 3.10 and 3.11 where one byte differed in output (and generally does not guarantee this will remain identical). See the python bug at python/cpython#112346 for details.
@za3k
Copy link
Owner

za3k commented Mar 25, 2025

Unsure why it wasn't running for you. I just cherry-picked this over and it ran for me.

https://github.com/za3k/qr-backup/actions/runs/14048836380

@za3k
Copy link
Owner

za3k commented Mar 25, 2025

Added to master as 8d40ed3 (You have been credited as "Summer Tea", let me know if you would prefer another name)

Feel free to revise to add working OS X continuous integration support, or to close this PR if you don't want to.

@acuteaangle
Copy link
Contributor Author

I’m taking a look at the MacOS CI.

@acuteaangle
Copy link
Contributor Author

acuteaangle commented Mar 25, 2025

I’m getting a core.getfont error currently.
https://github.com/acuteaangle/qr-backup/actions/runs/14050727326/job/39340482844
Not sure what’s causing it yet


Notes so far:

  1. We should use apt-get over apt, as apt is not intended to be stable for scripts
  2. We should probably use the official setup-python action so we don’t get flakiness because of whatever version of Python the runner happens to have installed; also comes with pip caching and the ability to test multiple Python versions.

In my current iteration, I added a bunch of off-the-shelf caching to all the dependencies because it was taking a very long time to retry after each failure. This also abstracts away 1.

The Linux test still works, so I believe this pillow issue to be MacOS-specific.

Also, we probably shouldn’t list Python 3.6 as supported anymore in the install guide; it’s long-EOL and not even available to test in GitHub CI anymore. 3.9 is the oldest non-EOL Python version currently, and qr-backup does pass tests on Linux with 3.9

@za3k
Copy link
Owner

za3k commented Mar 25, 2025

shouldn't list Python 3.6 as supported

from the nix packager... hmmm sus (yes this is fine, feel free to bump to 3.9)

You probably need to install the font, as listed in the install guide. Unfortunately the listed advice on how to install is "double click the font". Good luck!

Edit: That could use a better error message on our end if that's really the problem, but let's focus this PR on just CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add continuous integration

2 participants