Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/validate-protobufs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Validate Protobufs Compilation

on:
pull_request:
branches:
- main

jobs:
validate-protobufs:
runs-on: ubuntu-latest

steps:
- name: Checkout hedera-services
uses: actions/checkout@v3
with:
repository: hashgraph/hedera-services
path: hedera-services

- name: Update hedera-services branch
run: |
sed -i.bak "s/branch = \".*\"/branch = \"${GITHUB_HEAD_REF}\"/" hedera-services/hapi/build.gradle.kts
Copy link
Member

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).


- name: Run Gradle assemble
run: ./gradlew assemble
Copy link
Member

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.

working-directory: hedera-services