-
Notifications
You must be signed in to change notification settings - Fork 259
ci: upload patches #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: upload patches #934
Conversation
Will this only upload if there are actually differences, or will it just upload an empty file if there are no differences? |
The former, according to the warning. |
Ah, yes, missed that warning, though it would be nice if it weren't a warning at all.
|
@@ -32,6 +32,7 @@ jobs: | |||
run: | | |||
cd regression-tests | |||
bash run-tests.sh -c ${{ matrix.compiler }} | |||
continue-on-error: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails.
This will make the run pass. I think you need to make this upload a new job and have it run always. https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another issue unrelated to this PR, the job is called regression-tests-linux-mac
but also runs Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, I must have forgotten to update.
You can fix it in is this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we really use jobs.<job_id>.needs?
We need to access the output patch file of the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I guess I don't know. I just know that the continue-on-error
means ignore failures, so that won't do what we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the diff needs to be a job output, not sure how that works for matrix jobs. (Update: matrix info is in that section.)
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there is a simpler solution. I am testing it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is one solution in #935 . It would be good to compare solutions, I think.
- name: Upload patch | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ matrix.compiler }}-patch.diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
name: ${{ matrix.compiler }}-patch.diff | |
name: ${{ matrix.os }}-${{ matrix.compiler }}-patch.diff |
I think we might have the same compiler run on different OSes (I have that in cooking). Comparing patches for the same compiler between different systems could be another check, also of the CI. Thoughts?
BTW do you what is the retention time of artefacts on GitHub is? I guess these will be used instantly or not at all so it probably isn't an issue...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From https://github.com/actions/upload-artifact#retention-period:
Artifacts are retained for 90 days by default.
Thanks! All of this is unfamiliar to me, I appreciate the help. |
@hsutter Unfortunately, this wasn't quite ready. Nothing breaking, just incomplete, and it can be addressed in a follow-up PR. |
For the result, see https://github.com/JohelEGP/cppfront/actions/runs/7505215700#artifacts.