-
Notifications
You must be signed in to change notification settings - Fork 1
Fix #2: Introduce GitHub Actions #6
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
base: introduce-proto-api-v1
Are you sure you want to change the base?
Changes from 4 commits
5f452e8
1920a33
91d29dc
bb7987c
0856bd5
2e1b58d
66e8e3f
d1d14e0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Contains job corresponding to bazel build. | ||
|
||
name: Bazel Build | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
# Push events on develop branch | ||
- develop | ||
|
||
jobs: | ||
bazel_build_app: | ||
name: Build Binary with Bazel | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-18.04] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 9 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 9 | ||
|
||
- name: Set up Bazel | ||
uses: abhinavsingh/setup-bazel@v3 | ||
with: | ||
version: 4.0.0 | ||
|
||
# Note that caching only works on non-forks. | ||
- name: Build Oppia Proto API | ||
run: | | ||
bazel build -- //:android_protos | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bazel-* |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,56 @@ | |
The top-level WORKSPACE definition for the Oppia proto API Bazel workspace. | ||
""" | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
load("//repo:deps.bzl", "initializeDepsForWorkspace") | ||
|
||
initializeDepsForWorkspace() | ||
|
||
load("//repo:toolchains.bzl", "initializeToolchainsForWorkspace") | ||
|
||
initializeToolchainsForWorkspace() | ||
|
||
# buildifier is written in Go and hence needs rules_go to be built. | ||
# See https://github.com/bazelbuild/rules_go for the up to date setup instructions. | ||
http_archive( | ||
name = "io_bazel_rules_go", | ||
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f", | ||
urls = [ | ||
|
||
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", | ||
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip", | ||
], | ||
) | ||
|
||
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") | ||
|
||
go_rules_dependencies() | ||
|
||
go_register_toolchains(version = "1.17.2") | ||
|
||
http_archive( | ||
name = "bazel_gazelle", | ||
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", | ||
urls = [ | ||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", | ||
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", | ||
], | ||
) | ||
|
||
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") | ||
|
||
# If you use WORKSPACE.bazel, use the following line instead of the bare gazelle_dependencies(): | ||
# gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE.bazel") | ||
gazelle_dependencies() | ||
|
||
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") | ||
|
||
protobuf_deps() | ||
|
||
http_archive( | ||
name = "com_github_bazelbuild_buildtools", | ||
sha256 = "ae34c344514e08c23e90da0e2d6cb700fcd28e80c02e23e4d5715dddcb42f7b3", | ||
strip_prefix = "buildtools-4.2.2", | ||
urls = [ | ||
"https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.2.tar.gz", | ||
], | ||
) |
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).