Skip to content

postprocess: Add cronjob test c2rust-postprocess#1857

Draft
Crocodoctopus wants to merge 9 commits into
masterfrom
bg/add-postprocess-ci-test
Draft

postprocess: Add cronjob test c2rust-postprocess#1857
Crocodoctopus wants to merge 9 commits into
masterfrom
bg/add-postprocess-ci-test

Conversation

@Crocodoctopus

Copy link
Copy Markdown
Contributor

Test PR c2rust-postprocess testing in CI.

The basic idea is to run a daily cronjob running c2rust-postprocess on json-c with a real API key and with --on-error keep-going, generating new cache entries. PR CI runners will run their postprocess tests with under cache only with --on-error warn. This will have the side effect that breaking changes to c2rust-postprocess that still work under --on-error warn will only become apparent during the daily cronjob.

@Crocodoctopus Crocodoctopus force-pushed the bg/add-postprocess-ci-test branch from 84808f3 to 3a95eb4 Compare June 16, 2026 20:27
@thedataking thedataking changed the title wip, postprocess: Add postprocess test cronjob postprocess: Add postprocess test cronjob Jun 16, 2026
@thedataking thedataking changed the title postprocess: Add postprocess test cronjob postprocess: Add cronjob test c2rust-postprocess Jun 16, 2026
Comment on lines +34 to +35
- name: Set postprocess cache policy
run: echo "C2RUST_POSTPROCESS_ARGS=--on-error warn" >> "$GITHUB_ENV"

@thedataking thedataking Jun 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: description does not match what step actually does does.
Nit: why are you not using the env key like you do on line 151?

you should add a short comment noting why we don't want postprocessor errors to be fatal except outside the cronjob.


env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
C2RUST_POSTPROCESS_ARGS: --on-error warn

@thedataking thedataking Jun 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is temporary? Once key is set, we want keep-going (the default, so no need to set it)?

@thedataking thedataking left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing: using the Github cache action to restore and save c2rust-postprocessor entries on the cronjob or PR runs. If that's why the PR is marked draft, no worries.

${{ github.workspace }}/tests/integration/tests/refactor-diffs/**
if: always()

postprocess-test:

@thedataking thedataking Jun 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 5-10 control when this workflow runs. Should this go in a separate file (ci-postprocess.yml?)

You'll need to investigate how this affects caching ... not just for the postprocessor cache entries but also how it works with Swatinem/rust-cache@v2 and awalsh128/cache-apt-pkgs-action@latest.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using internal-testsuite.yml for testing, since github requires a workflow to be on master before I can launch any jobs. Currently, postprocess-test will run on push, which is fine for this.

Keeping this open for when I make that change.

@Crocodoctopus Crocodoctopus force-pushed the bg/add-postprocess-ci-test branch 2 times, most recently from 24ae5c6 to 1d7e507 Compare June 16, 2026 23:50
@Crocodoctopus

Copy link
Copy Markdown
Contributor Author

Most of this is pretty hacked together, I'll address feedback as it stabilizes.

@Crocodoctopus Crocodoctopus force-pushed the bg/add-postprocess-ci-test branch from 1d7e507 to 226bb76 Compare June 17, 2026 00:31
@Crocodoctopus Crocodoctopus force-pushed the bg/add-postprocess-ci-test branch from d111911 to c5d51a4 Compare June 18, 2026 03:55
@Crocodoctopus Crocodoctopus force-pushed the bg/add-postprocess-ci-test branch from c5d51a4 to a19e69c Compare June 18, 2026 03:56
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.

2 participants