Skip to content

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

Merged
merged 1 commit into from
Jan 12, 2024
Merged

ci: upload patches #934

merged 1 commit into from
Jan 12, 2024

Conversation

JohelEGP
Copy link
Contributor

@gregmarr
Copy link
Contributor

Will this only upload if there are actually differences, or will it just upload an empty file if there are no differences?

@JohelEGP JohelEGP marked this pull request as ready for review January 12, 2024 17:24
@JohelEGP
Copy link
Contributor Author

The former, according to the warning.

@gregmarr
Copy link
Contributor

gregmarr commented Jan 12, 2024

Ah, yes, missed that warning, though it would be nice if it weren't a warning at all.

# The desired behavior if no files are found using the provided path.
# Available Options:
#   warn: Output a warning but do not fail the action
#   error: Fail the action with an error message
#   ignore: Do not output any warnings or errors, the action does not fail
# Optional. Default is 'warn'
if-no-files-found:

@@ -32,6 +32,7 @@ jobs:
run: |
cd regression-tests
bash run-tests.sh -c ${{ matrix.compiler }}
continue-on-error: true
Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

@JohelEGP JohelEGP Jan 12, 2024

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.

Copy link
Contributor

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.

Copy link
Contributor

@gregmarr gregmarr Jan 12, 2024

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

Copy link
Contributor

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.

Copy link
Contributor

@gregmarr gregmarr Jan 12, 2024

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
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

Suggested change
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...

Copy link
Contributor Author

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.

@hsutter hsutter merged commit 776110d into hsutter:main Jan 12, 2024
@hsutter
Copy link
Owner

hsutter commented Jan 12, 2024

Thanks! All of this is unfamiliar to me, I appreciate the help.

@gregmarr
Copy link
Contributor

@hsutter Unfortunately, this wasn't quite ready. Nothing breaking, just incomplete, and it can be addressed in a follow-up PR.

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.

4 participants