Skip to content

Commit

Permalink
Merge pull request #5 from temporalio/abhinav/addReadme
Browse files Browse the repository at this point in the history
Add readme, license and a build ci.
  • Loading branch information
anekkanti authored Sep 26, 2023
2 parents 28a502c + 5aaa1d1 commit f80b21b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
check-latest: true
- name: Install Protoc
uses: arduino/setup-protoc@v2
- name: Validate and build go bindings from the proto files
run: make ci-build
env:
BUF_INPUT_HTTPS_USERNAME: ${{github.actor}}
BUF_INPUT_HTTPS_PASSWORD: ${{github.token}}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License

Copyright (c) 2023 Temporal Technologies Inc. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(VERBOSE).SILENT:
ci-build: install proto

# Install dependencies.
install: buf-install openapiv2-install
install: buf-install grpc-install openapiv2-install

# Run all linters and compile proto files.
proto: grpc
Expand All @@ -24,7 +24,7 @@ $(PROTO_OUT):
mkdir $(PROTO_OUT)

##### Compile proto files for go #####
grpc: buf-lint go-grpc
grpc: buf-lint buf-breaking go-grpc

go-grpc: clean $(PROTO_OUT)
printf $(COLOR) "Compile for go-gRPC..."
Expand All @@ -35,8 +35,13 @@ buf-install:
printf $(COLOR) "Install/update buf..."
go install github.com/bufbuild/buf/cmd/buf@v1.25.1

grpc-install:
printf $(COLOR) "Install/update go and grpc protoc gen ..."
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3

openapiv2-install:
printf $(COLOR) "Install/update ..."
printf $(COLOR) "Install/update openapiv2 protoc gen..."
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.16.2

##### Linters #####
Expand All @@ -45,8 +50,8 @@ buf-lint:
buf lint

buf-breaking:
@printf $(COLOR) "Run buf breaking changes check against master branch..."
buf breaking --against '.git#branch=main'
@printf $(COLOR) "Run buf breaking changes check against main branch..."
buf breaking --against 'https://github.com/temporalio/api-cloud.git#branch=main'

##### Clean #####
clean:
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Temporal cloud api proto files

## How to use

Copy over the protobuf files under [temporal](temporal) directory to the project directory and then use [grpc](https://grpc.io/docs/) to compile and generate code in the desired programming language.

## URL

The grpc URL the clients should connect to:
```
saas-api.tmprl.cloud:443
```

## Samples

Refer [cloud-samples-go](https://github.com/temporalio/cloud-samples-go) repository for demonstration on how a project can copy and build Go clients.

0 comments on commit f80b21b

Please sign in to comment.