Skip to content

Commit

Permalink
Project import generated by Copybara.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 1e3fd69b3f942ebb29ff579ec8418fb40d4964b5
  • Loading branch information
Aalyria Technologies, Inc authored and helen-aalyria committed Apr 24, 2024
1 parent 759e177 commit 320f531
Show file tree
Hide file tree
Showing 25 changed files with 806 additions and 237 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.0
7.1.1
28 changes: 25 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

name: Bazel

on: [pull_request]
on:
pull_request: {}
release:
types: [published]

jobs:
build-and-test:
Expand All @@ -26,7 +29,7 @@ jobs:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: bazel-${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'requirements.txt') }}
key: bazel-${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }}
restore-keys: bazel-
- run: bazelisk test //...

Expand All @@ -49,7 +52,7 @@ jobs:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: bazel-${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'requirements.txt') }}
key: bazel-${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }}
restore-keys: bazel-
- run: bazelisk build "--platforms=@io_bazel_rules_go//go/toolchain:${{ matrix.os }}_${{ matrix.arch }}" "${{ matrix.target }}"
- name: Upload nbictl binary
Expand All @@ -69,3 +72,22 @@ jobs:
bazel-bin/cdpi_agent/cmd/agent/agent_/agent
bazel-bin/cdpi_agent/cmd/agent/agent_/agent.exe
build-and-upload-docs:
needs: [build-and-test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: bazel-${{ hashFiles('.bazelrc', '.bazelversion', 'WORKSPACE', 'MODULE.bazel', 'requirements.txt') }}
restore-keys: bazel-
- run: bazelisk build "//api:api.html"
- name: Upload API docs
uses: actions/upload-artifact@v3
with:
name: api.html
path: |
bazel-bin/api/api.html/api.html
21 changes: 15 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,14 @@ load("@rules_proto_grpc//doc:repositories.bzl", rules_proto_grpc_doc_repos = "do
load("@rules_proto_grpc//go:repositories.bzl", rules_proto_grpc_go_repos = "go_repos")
load("@rules_proto_grpc//java:repositories.bzl", rules_proto_grpc_java_repos = "java_repos")
load("@rules_proto_grpc//python:repositories.bzl", rules_proto_grpc_python_repos = "python_repos")
load("@rules_python//python:pip.bzl", "pip_parse")
load("@rules_python//python:pip.bzl", "package_annotation", "pip_parse")
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")

go_rules_dependencies()

# Install the Go toolchains. (https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go-toolchain)
go_register_toolchains(
version = "1.22.1",
version = "1.22.2",
)

gazelle_dependencies()
Expand Down Expand Up @@ -584,11 +584,20 @@ load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()

python_register_toolchains(
name = "python3_9",
python_version = "3.9",
name = "python3_11",
python_version = "3.11",
)

load("@python3_9//:defs.bzl", "interpreter")
load("@python3_11//:defs.bzl", "interpreter")

PYTHON_ANNOTATIONS = {
"nvidia-cudnn-cu11": package_annotation(
copy_executables = {
"@python_deps_nvidia_cublas_cu11//:site-packages/nvidia/cublas/lib/libcublas.so.11": "site-packages/nvidia/cublas/lib/libcublas.so.11",
"@python_deps_nvidia_cublas_cu11//:site-packages/nvidia/cublas/lib/libcublasLt.so.11": "site-packages/nvidia/cublas/lib/libcublasLt.so.11",
},
),
}

pip_parse(
name = "python_deps",
Expand All @@ -610,7 +619,7 @@ switched_rules_by_language(

# Load dependencies needed to compile and test the grpc library.
grpc_deps(
python_headers = "@python3_9//:python_headers",
python_headers = "@python3_11//:python_headers",
)

load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies")
Expand Down
2 changes: 1 addition & 1 deletion api/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ load("@rules_proto_grpc//doc:defs.bzl", "doc_markdown_compile", "doc_template_co
_all_protos = [
"//api/cdpi/v1alpha:cdpi_proto",
"//api/common:common_proto",
"//api/fed/v1alpha:fed_proto",
"//api/federation:federation_proto",
"//api/nbi/v1alpha:nbi_proto",
"//api/nbi/v1alpha/resources:resources_proto",
"//api/types:types_proto",
Expand Down
2 changes: 1 addition & 1 deletion api/cdpi/v1alpha/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
# contemporary SDN protocols, such as OpenFlow and OF-CONFIG, AirFlow supports
# L1-L3 control of networks with wireless and mobile network platforms.

load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc//cpp:defs.bzl", "cpp_grpc_library")
load("@rules_proto_grpc//java:defs.bzl", "java_grpc_library")
load("@rules_proto_grpc//python:defs.bzl", "python_grpc_library")
Expand Down
2 changes: 1 addition & 1 deletion api/common/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_proto_grpc//cpp:defs.bzl", "cpp_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto_grpc//java:defs.bzl", "java_proto_library")
load("@rules_proto_grpc//python:defs.bzl", "python_proto_library")

Expand Down
75 changes: 0 additions & 75 deletions api/fed/v1alpha/BUILD

This file was deleted.

131 changes: 0 additions & 131 deletions api/fed/v1alpha/fed.proto

This file was deleted.

53 changes: 53 additions & 0 deletions api/federation/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Copyright 2024 Aalyria Technologies, Inc., and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

proto_library(
name = "federation_proto",
srcs = ["federation.proto"],
visibility = ["//visibility:public"],
deps = [
"//api/common:common_proto",
"//api/types:types_proto",
"@com_google_googleapis//google/type:interval_proto",
"@com_google_protobuf//:duration_proto",
],
)

go_proto_library(
name = "federation_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "aalyria.com/spacetime/api/federation",
proto = ":federation_proto",
visibility = ["//visibility:public"],
deps = [
"//api/common:common_go_proto",
"@org_golang_google_genproto//googleapis/type/interval",
],
)

go_proto_library(
name = "v1alpha_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "aalyria.com/spacetime/api/fed/v1alpha",
proto = ":federation_proto",
visibility = ["//visibility:public"],
deps = [
"//api/common:common_go_proto",
"//api/types:types_go_proto",
"@org_golang_google_genproto//googleapis/type/interval",
],
)
Loading

0 comments on commit 320f531

Please sign in to comment.