# gerris workflow ```mermaid flowchart TD; pr_is_merged[Pull request is merged with bors or bors-like] --> commit_to_gcc_patch_dev; subgraph commit_to_gcc_patch_dev[Commit to `gcc-patch-dev`]; commit[For each commit]; commit --> prefix[Prefix with 'gccrs: '] prefix --> push[Push to `gcc-patch-dev`] end; pr_approved[Pull request is approved] --> bootstrapchecks; subgraph bootstrapchecks[Bootstrap checks]; eachcommit[For each commit]; eachcommit --build on sourceware machines-->archs eachcommit --test on sourceware machines-->archs eachcommit --bootstrap on sourceware machines-->archs end subgraph archs[Sourceware architectures]; PPC32; S390X; i386; ARM32; end pr[Pull request is opened] --> check1; subgraph check1[Basic checks]; codingstyle[coding style] --OK--> compilation --OK--> tests; end check1 --PASS--> check2; subgraph check2[Multi-target compilation + tests]; GCC48[GCC 4.8]; Linux-32bits; MacOS; Windows; end check2; subgraph check3[Commit checks]; Changelogs end archs --FAIL-->stop2[STOP]; check2 --PASS--> check3; check3 --FAIL--> stop; check2 --FAIL--> stop; check1 --FAIL--> stop[STOP]; ``` - [ ] On PR approved, run warning, build and tests - Having `warning`, `build` and `test` should be enough to ensure `bootstrap` passes - If it does not, it's an extremely weird failure that we can take care of by hand - [x] Run Changelog checks on each commit - [x] Run `gccrs: ` prefix checks on each commit - [x] Run DCO signoff checks on each commit - [ ] Add branch protection rules to make sure PRs only get merged with all commits warning-free, building and passing the testsuite - [ ] Improve `actions/checkout` speed? - [ ] Is that possible? Just a regular checkout does not allow fetching the rev-list - [ ] Fixed by running on a runner with the repo and cache - [ ] Turn this into a standalone app? - [ ] Easier to maintain - [ ] Easier to improve - [ ] Easier to eventually parallelize? - [ ] Create a light self-contained docker image for `gerris` - [ ] How to integrate buildbot? - Keep buildbot as a test for multiple architectures which runs after the fact - Run it before merging thanks to a hook - [ ] How to get `gerris` to post messages on github? - [ ] Add a cron job so that `gerris` picks commits from master every week, rebases them on `gcc-patch-dev` (prefixed with `gccrs: `) and opens a PR - [ ] How to deal with CI timeout? - A job must complete in 6 hours - Each bootstrap build takes 3 hours - This is why we need a custom runner with `ccache` and the git repo - This is also why doing warning checking + build + test should be good enough - [ ] Can we have `gerris` post PR reviews? - [ ] Approved if all checks pass - [ ] Comment if some timeout - [ ] Request changes if steps are failing, with a helpful comment of what is failing - [ ] Add Windows CI as well - [ ] Do not run all these checks on PRs with the `merge` label - Pseudo code: ```rust= for commit in rev_list { warning_check(commit)?; build(commit)?; run_tests(commit)?; check_test_output(commit)?; } ``` ```mermaid flowchart TD; github --weekly cron job--> gerris; gerris --updates commits--> gerris; gerris --creates PR--> github; ``` Maybe a good first step would be to have a weekly cron job which takes commits from master and creates a PR to `gcc-patch-dev`?