@@ -17,12 +17,20 @@ jobs:
17
17
uses : actions/checkout@v4
18
18
- name : Build shared library
19
19
working-directory : spannerlib
20
- run : go build -o spannerlib.so -buildmode=c-shared
21
- - name : Upload linux-x64
20
+ run : go build -o spannerlib.so -buildmode=c-shared shared_lib.go
21
+ - name : Build gRPC server
22
+ working-directory : spannerlib
23
+ run : go build grpc_server.go
24
+ - name : Upload linux-x64 shared lib
22
25
uses : actions/upload-artifact@v4
23
26
with :
24
27
name : spannerlib-linux-x64
25
28
path : spannerlib/spannerlib.so
29
+ - name : Upload linux-x64 gRPC server
30
+ uses : actions/upload-artifact@v4
31
+ with :
32
+ name : spannerlib-server-linux-x64
33
+ path : spannerlib/grpc_server
26
34
build-osx-arm64 :
27
35
runs-on : macos-latest
28
36
steps :
@@ -34,28 +42,50 @@ jobs:
34
42
uses : actions/checkout@v4
35
43
- name : Build shared library
36
44
working-directory : spannerlib
37
- run : go build -o spannerlib.dylib -buildmode=c-shared
38
- - name : Upload osx-arm64
45
+ run : go build -o spannerlib.dylib -buildmode=c-shared shared_lib.go
46
+ - name : Build gRPC server
47
+ working-directory : spannerlib
48
+ run : go build grpc_server.go
49
+ - name : Upload osx-arm64 shared lib
39
50
uses : actions/upload-artifact@v4
40
51
with :
41
52
name : spannerlib-osx-arm64
42
53
path : spannerlib/spannerlib.dylib
54
+ - name : Upload osx-arm64 gRPC server
55
+ uses : actions/upload-artifact@v4
56
+ with :
57
+ name : spannerlib-server-osx-arm64
58
+ path : spannerlib/grpc_server
43
59
build-and-package :
44
60
needs : [build-linux-x64, build-osx-arm64]
45
61
runs-on : ubuntu-latest
46
62
steps :
47
63
- name : Checkout code
48
64
uses : actions/checkout@v4
49
- - name : Download and copy linux-x64
65
+ - name : Download and copy linux-x64 shared lib
50
66
uses : actions/download-artifact@v4
51
67
with :
52
68
name : spannerlib-linux-x64
53
69
path : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Native/libraries/linux-x64/
70
+ - name : Download and copy linux-x64 gRPC server
71
+ uses : actions/download-artifact@v4
72
+ with :
73
+ name : spannerlib-server-linux-x64
74
+ path : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc/binaries/linux-x64/
75
+ - name : Add execute permission to linux-x64 gRPC server
76
+ run : chmod +x spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc/binaries/linux-x64/grpc_server
54
77
- name : Download and copy osx-arm64
55
78
uses : actions/download-artifact@v4
56
79
with :
57
80
name : spannerlib-osx-arm64
58
81
path : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Native/libraries/osx-arm64/
82
+ - name : Download and copy osx-arm64 gRPC server
83
+ uses : actions/download-artifact@v4
84
+ with :
85
+ name : spannerlib-server-osx-arm64
86
+ path : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc/binaries/osx-arm64/
87
+ - name : Add execute permission to osx-arm64 gRPC server
88
+ run : chmod +x spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc/binaries/osx-arm64/grpc_server
59
89
- name : Install dotnet
60
90
uses : actions/setup-dotnet@v4
61
91
with :
65
95
- name : Build native library package
66
96
run : dotnet pack
67
97
working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Native
68
- - name : Add package source
98
+ - name : Build gRPC server package
99
+ run : dotnet pack
100
+ working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc
101
+ - name : Add package source for native library
69
102
run : dotnet nuget add source "$PWD"/bin/Release --name local
70
103
working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Native
71
104
- name : Restore dependencies
80
113
- name : Publish SpannerLib.Native to nuget
81
114
run : dotnet nuget push bin/Release/Experimental.SpannerLib.Native.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
82
115
working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Native
83
- - name : Build SpannerLib
84
- run : dotnet pack
85
- working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib
86
- - name : Publish SpannerLib to nuget
87
- run : dotnet nuget push bin/Release/Experimental.SpannerLib.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
88
- working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib
116
+ - name : Publish SpannerLib.Grpc to nuget
117
+ run : dotnet nuget push bin/Release/Experimental.SpannerLib.Grpc.*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
118
+ working-directory : spannerlib/dotnet-spannerlib/Google.Cloud.SpannerLib.Grpc
0 commit comments