-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix #2: Introduce GitHub Actions #6
base: introduce-proto-api-v1
Are you sure you want to change the base?
Conversation
WORKSPACE
Outdated
http_archive( | ||
name = "io_bazel_rules_go", | ||
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f", | ||
urls = [ |
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.
@BenHenning Didn't add to deps.bzl
as the urls
here are array, should we update the _DEPENDENCY_VERSIONS
to accept URLs as an array or should we keep these here?
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.
The multiple URLs are for redundancy. I suggest just picking whichever URL is closest to the existing URLs for parity, but yes we need to use deps.bzl since that will be consumed by users of the proto library (otherwise it may not build).
@anandwana001 should this be based on the other PR rather than develop? It's a bit hard to review in its current state. Please assign back once my comment above is addressed & the PR is based off the other branch. |
I will get back to this PR today, got stuck at Bazel error regarding using the repository ``io-bazel-go` before loading the library when I am doing via deps. |
load("//repo:deps.bzl", "initializeGoDeps") | ||
initializeGoDeps() | ||
|
||
load("//repo:deps.bzl", "initializeBazelGazell") | ||
initializeBazelGazell() | ||
|
||
load("//repo:deps.bzl", "initializeProtobuf") | ||
initializeProtobuf() | ||
|
||
load("//repo:deps.bzl", "initializeBazelBuildTools") | ||
initializeBazelBuildTools() | ||
|
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.
Throwing error when running bazel run //:buildifier
ERROR: Failed to load Starlark extension '@bazel_gazelle//:deps.bzl'.
Cycle in the workspace file detected. This indicates that a repository is used prior to being defined.
The following chain of repository dependencies lead to the missing definition.
- @bazel_gazelle
This could either mean you have to add the '@bazel_gazelle' repository with a statement like `http_archive` in your WORKSPACE file (note that transitive dependencies are not added automatically), or move an existing definition earlier in your WORKSPACE file.
ERROR: cycles detected during target parsing
INFO: Elapsed time: 0.100s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
|
||
- name: Build Oppia Proto API | ||
run: | | ||
bazel build -- //:android_protos |
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 suggest instead building //...
(to make sure everything builds).
Fix #2
Introduced GitHub action, for every push event on develop branch it will run a bazel build check for
android_protos
.Two files were added in this PR:
.github/workflow/bazel_build.yml
.gitignore
TODO
Other files are from the PR #1
Bazel build on local.