Skip to content

Commit

Permalink
build: attempt to fix windows version issue using bash shell step
Browse files Browse the repository at this point in the history
  • Loading branch information
bojand committed Oct 9, 2021
1 parent a66e4db commit 18c6388
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,16 @@ jobs:
uses: gerred/actions/current-time@master
id: current-time

- name: Get the version
id: get_tag_version
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash

- name: Build ghz
run: |
mkdir ./dist/
mkdir ./dist/${{ matrix.target }}/
go build -ldflags="-s -w -X 'main.version=${{ github.ref }}' -X 'main.commit=${{ github.sha }}' -X 'main.date=${{ steps.current-time.outputs.time }}'" -o ./dist/${{ matrix.target }}/ ./cmd/ghz/...
go build -ldflags="-s -w -X 'main.version=${{ steps.get_tag_version.outputs.TAG_VERSION }}' -X 'main.commit=${{ github.sha }}' -X 'main.date=${{ steps.current-time.outputs.time }}'" -o ./dist/${{ matrix.target }}/ ./cmd/ghz/...
- name: Build ghz-web
env:
Expand Down
77 changes: 77 additions & 0 deletions testdata/grpcbin.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
syntax = "proto3";

package grpcbin;

service GRPCBin {
// This endpoint
rpc Index(EmptyMessage) returns (IndexReply) {}
// Unary endpoint that takes no argument and replies an empty message.
rpc Empty(EmptyMessage) returns (EmptyMessage) {}
// Unary endpoint that replies a received DummyMessage
rpc DummyUnary(DummyMessage) returns (DummyMessage) {}
// Stream endpoint that sends back 10 times the received DummyMessage
rpc DummyServerStream(DummyMessage) returns (stream DummyMessage) {}
// Stream endpoint that receives 10 DummyMessages and replies with the last received one
rpc DummyClientStream(stream DummyMessage) returns (DummyMessage) {}
// Stream endpoint that sends back a received DummyMessage indefinitely (chat mode)
rpc DummyBidirectionalStreamStream(stream DummyMessage) returns (stream DummyMessage) {}
// Unary endpoint that raises a specified (by code) gRPC error
rpc SpecificError(SpecificErrorRequest) returns (EmptyMessage) {}
// Unary endpoint that raises a random gRPC error
rpc RandomError(EmptyMessage) returns (EmptyMessage) {}
// Unary endpoint that returns headers
rpc HeadersUnary(EmptyMessage) returns (HeadersMessage) {}
// Unary endpoint that returns no respnose
rpc NoResponseUnary(EmptyMessage) returns (EmptyMessage) {}
}

message HeadersMessage {
message Values {
repeated string values = 1;
}
map<string, Values> Metadata = 1;
}

message SpecificErrorRequest {
uint32 code = 1;
string reason = 2;
}

message EmptyMessage {}

message DummyMessage {
message Sub {
string f_string = 1;
}
enum Enum {
ENUM_0 = 0;
ENUM_1 = 1;
ENUM_2 = 2;
}
string f_string = 1;
repeated string f_strings = 2;
int32 f_int32 = 3;
repeated int32 f_int32s = 4;
Enum f_enum = 5;
repeated Enum f_enums = 6;
Sub f_sub = 7;
repeated Sub f_subs = 8;
bool f_bool = 9;
repeated bool f_bools = 10;
int64 f_int64 = 11;
repeated int64 f_int64s= 12;
bytes f_bytes = 13;
repeated bytes f_bytess = 14;
float f_float = 15;
repeated float f_floats = 16;
// TODO: timestamp, duration, oneof, any, maps, fieldmask, wrapper type, struct, listvalue, value, nullvalue, deprecated
}

message IndexReply {
message Endpoint {
string path = 1;
string description = 2;
}
string description = 1;
repeated Endpoint endpoints = 2;
}

0 comments on commit 18c6388

Please sign in to comment.