-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add test job for crypto repo #123
Conversation
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.
This looks sensible to me. A few suggestions and one question.
20d0924
to
0191782
Compare
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.
Just one question, otherwise this looks good to me.
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.
LGTM, thanks.
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.
LGTM
vars/psa_crypto.groovy
Outdated
|
||
void run_pr_job() { | ||
if (env.TARGET_BRANCH != 'main') { | ||
echo 'PR target is not "main" branch - not building.' |
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.
Why would we refuse to build pull requests targeting another branch? We don't do it often, but we do do it sometimes, and I don't see any reason to forbid it.
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.
Only main
contains the files copied from Mbed-TLS, including all.sh
. If we want to test PRs targeting development
, a bit more logic is needed - but that was out of scope for the original 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.
main
is the only branch that contains all.sh
. The other branches are just templates that don't have everything imported from the mbedtls
repo. Once we move crypto development to this repo, this condition should go away.
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.
Ooh jinx
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.
We do not want to build the 'development' branch (only the build system, doc and tree skeleton) and we have only two maintained branches currently thus this test does the job considering those two branches. Taking into consideration other working branches based on main
, if (env.TARGET_BRANCH == 'development')
is probably better though.
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.
@ronald-cron-arm Yes, the main reason for the check is to prevent jenkins from reporting spurious errors to github.
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.
@ronald-cron-arm Yes, the reason for the check is to prevent jenkins from reporting spurious errors to github.
okay, thanks. Then, what about if (env.TARGET_BRANCH == 'development')
instead to allow the manual CI testing of "main like" branches.
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.
Sure, that works for me as well.
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.
This sounds like a job for fileExists(…)
(plus perhaps some content check) rather than checking the target branch name.
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.
In general probably but currently the development branch in psa-crypto is quite peculiar thus to me it is acceptable for it to be handled in a special manner for CI purposes.
vars/environ.groovy
Outdated
@@ -28,26 +28,23 @@ def set_common_environment() { | |||
env.MAKEFLAGS = '-j2' | |||
} | |||
|
|||
def set_tls_pr_environment(is_production) { | |||
void set_pr_environment(boolean is_production, String repo='tls') { |
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 make repo
some kind of enum?
There's a merge conflict now. |
c8f5e7e
0191782
to
c8f5e7e
Compare
a2fdd0f
to
4bbc4f6
Compare
4834a2d
to
f751d16
Compare
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
f751d16
to
42d198f
Compare
@bensze01 Forgot to ask yesterday, regarding the labels: does "needs CI" mean that you want to run more test jobs, or that the test jobs so far revealed issues that need fixing? (From the absence of "needs work" I'm assuming it's the former, I'm just checking to be sure.) |
This fixes issues with building commits that are not fetched by the default refspec of +refs/heads/*:refs/remotes/origin/*, eg. if the specified commit is not in the history of any extant branch, or when using shallow clones. Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
@mpg The former. I pushed a small drive-by fix for an issue that was hindering my testing, but aside from this no further rework should be required. |
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.
Code looks good to me. I'm just waiting for all the test runs before I formally approve.
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.
LGTM
I've added all of the tests I was planning to run to the PR description. |
@mpg All the CI runs passed. |
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 had a look at the tests runs, and it all looks good to me. Thanks!
Changes and fixes needed to add test jobs for the crypto repo
Test Runs: