Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'grpc:master' into server-stream-context-with-rpc-info
- Loading branch information
Showing
635 changed files
with
90,674 additions
and
33,476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ master ] | ||
schedule: | ||
- cron: '24 20 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: go | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
name: Release cmd/protoc-gen-go-grpc | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.event.release.tag_name, 'cmd/protoc-gen-go-grpc/') | ||
strategy: | ||
matrix: | ||
goos: [linux, darwin, windows] | ||
goarch: [386, amd64] | ||
exclude: | ||
- goos: darwin | ||
goarch: 386 | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
|
||
- name: Download dependencies | ||
run: | | ||
cd cmd/protoc-gen-go-grpc | ||
go mod download | ||
- name: Prepare build directory | ||
run: | | ||
mkdir -p build/ | ||
cp README.md build/ | ||
cp LICENSE build/ | ||
- name: Build | ||
env: | ||
GOOS: ${{ matrix.goos }} | ||
GOARCH: ${{ matrix.goarch }} | ||
run: | | ||
cd cmd/protoc-gen-go-grpc | ||
go build -trimpath -o $GITHUB_WORKSPACE/build | ||
- name: Create package | ||
id: package | ||
run: | | ||
PACKAGE_NAME=protoc-gen-go-grpc.${GITHUB_REF#refs/tags/cmd/protoc-gen-go-grpc/}.${{ matrix.goos }}.${{ matrix.goarch }}.tar.gz | ||
tar -czvf $PACKAGE_NAME -C build . | ||
echo ::set-output name=name::${PACKAGE_NAME} | ||
- name: Upload asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ./${{ steps.package.outputs.name }} | ||
asset_name: ${{ steps.package.outputs.name }} | ||
asset_content_type: application/gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
name: Testing | ||
|
||
# Trigger on pushes, PRs (excluding documentation changes), and nightly. | ||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: 0 0 * * * # daily at 00:00 | ||
|
||
# Always force the use of Go modules | ||
env: | ||
GO111MODULE: on | ||
|
||
jobs: | ||
# Check generated protos match their source repos (optional for PRs). | ||
vet-proto: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Setup the environment. | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.15 | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
# Run the vet checks. | ||
- name: vet | ||
run: ./vet.sh -install && ./vet.sh | ||
|
||
# Run the main gRPC-Go tests. | ||
tests: | ||
# Proto checks are run in the above job. | ||
env: | ||
VET_SKIP_PROTO: 1 | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
include: | ||
- type: vet+tests | ||
goversion: 1.16 | ||
|
||
- type: tests | ||
goversion: 1.16 | ||
testflags: -race | ||
|
||
- type: tests | ||
goversion: 1.16 | ||
grpcenv: GRPC_GO_RETRY=on | ||
|
||
- type: extras | ||
goversion: 1.16 | ||
|
||
- type: tests | ||
goversion: 1.16 | ||
goarch: 386 | ||
|
||
- type: tests | ||
goversion: 1.16 | ||
goarch: arm64 | ||
|
||
- type: tests | ||
goversion: 1.15 | ||
|
||
- type: tests | ||
goversion: 1.14 | ||
|
||
- type: tests # Keep until interop tests no longer require Go1.11 | ||
goversion: 1.11 | ||
|
||
steps: | ||
# Setup the environment. | ||
- name: Setup GOARCH | ||
if: matrix.goarch != '' | ||
run: echo "GOARCH=${{ matrix.goarch }}" >> $GITHUB_ENV | ||
|
||
- name: Setup qemu emulator | ||
if: matrix.goarch == 'arm64' | ||
# setup qemu-user-static emulator and register it with binfmt_misc so that aarch64 binaries | ||
# are automatically executed using qemu. | ||
run: docker run --rm --privileged multiarch/qemu-user-static:5.2.0-2 --reset --credential yes --persistent yes | ||
|
||
- name: Setup GRPC environment | ||
if: matrix.grpcenv != '' | ||
run: echo "${{ matrix.grpcenv }}" >> $GITHUB_ENV | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.goversion }} | ||
|
||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
# Only run vet for 'vet' runs. | ||
- name: Run vet.sh | ||
if: startsWith(matrix.type, 'vet') | ||
run: ./vet.sh -install && ./vet.sh | ||
|
||
# Main tests run for everything except when testing "extras" | ||
# (where we run a reduced set of tests). | ||
- name: Run tests | ||
if: contains(matrix.type, 'tests') | ||
run: | | ||
go version | ||
go test ${{ matrix.testflags }} -cpu 1,4 -timeout 7m google.golang.org/grpc/... | ||
# Non-core gRPC tests (examples, interop, etc) | ||
- name: Run extras tests | ||
if: matrix.type == 'extras' | ||
run: | | ||
go version | ||
examples/examples_test.sh | ||
security/advancedtls/examples/examples_test.sh | ||
interop/interop_test.sh | ||
cd ${GITHUB_WORKSPACE}/security/advancedtls && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/advancedtls/... | ||
cd ${GITHUB_WORKSPACE}/security/authorization && go test -cpu 1,4 -timeout 7m google.golang.org/grpc/security/authorization/... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.