-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: add Services compilation check #376
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Michael Tinker <[email protected]>
|
||
- name: Update hedera-services branch | ||
run: | | ||
sed -i 's/branch = "main"/branch = "${{ env.branch }}"/' hedera-services/hapi/build.gradle.kts |
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 might have issues with the occasional branch modification. Here's a possible fix:
sed -i 's/branch = "main"/branch = "${{ env.branch }}"/' hedera-services/hapi/build.gradle.kts | |
sed -i 's/branch = "[a-zA-Z\-\/0-9]+"/branch = "${{ env.branch }}"/' hedera-services/hapi/build.gradle.kts |
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.
Agreed. We might not have main
as branch name always in services.
sed -i 's/branch = "main"/branch = "${{ env.branch }}"/' hedera-services/hapi/build.gradle.kts | ||
|
||
- name: Run Gradle assemble | ||
run: ./gradlew assemble |
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 may be OK, but we might need to add the cgroup controls Nathan worked out for services to make sure the compile doesn't starve out the github agent on the runner.
Something to watch for.
Signed-off-by: Michael Tinker <[email protected]>
@@ -22,7 +18,7 @@ jobs: | |||
|
|||
- name: Update hedera-services branch | |||
run: | | |||
sed -i 's/branch = "main"/branch = "${{ env.branch }}"/' hedera-services/hapi/build.gradle.kts | |||
sed -i.bak "s/branch = \".*\"/branch = \"${GITHUB_HEAD_REF}\"/" hedera-services/hapi/build.gradle.kts |
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.
Something worth noting:
Sed is greedy by default, so this might match a lot more than we want, basically it will extend as far as it can without crossing to a new line. That shouldn't be an issue, unless someone puts a comment at end of line with a "
in it, in which case this may break (that's why I restricted the match set in my suggestion).
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 @tinker-michaelj
Description:
main
.