mirror of https://github.com/grpc/grpc-node.git
Add grpc-tools build GitHub Workflow
This commit is contained in:
parent
404245adf2
commit
5e9a3ca738
|
@ -0,0 +1,66 @@
|
||||||
|
name: grpc-tools Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull-request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
linux_build:
|
||||||
|
name: Linux grpc-tools Build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
docker build -t kokoro-native-image tools/release/native
|
||||||
|
docker run -v /var/run/docker.sock:/var/run/docker.sock -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE kokoro-native-image $GITHUB_WORKSPACE/packages/grpc-tools/build_binaries.sh
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: grpc-tools_linux
|
||||||
|
path: artifacts/
|
||||||
|
macos_build:
|
||||||
|
name: Macos grpc-tools Build
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build
|
||||||
|
run: packages/grpc-tools/build_binaries.sh
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: grpc-tools_macos
|
||||||
|
path: artifacts/
|
||||||
|
windows_build:
|
||||||
|
name: Windows grpc-tools Build
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build
|
||||||
|
run: packages/grpc-tools/build_binaries.ps1
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: grpc-tools_windows
|
||||||
|
path: artifacts/
|
||||||
|
combine_artifacts:
|
||||||
|
name: Combine grpc-tools artifacts
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [linux_build, macos_build, windows_build]
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
- name: Copy
|
||||||
|
run: |
|
||||||
|
mkdir artifacts
|
||||||
|
cp -r ./**/* artifacts/
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: combined-artifacts
|
||||||
|
path: artifacts/
|
|
@ -37,7 +37,7 @@ MkDir-p ($Base + "/build/bin")
|
||||||
$PackageFile = $Base + "/package.json"
|
$PackageFile = $Base + "/package.json"
|
||||||
$ToolsVersion = ((Get-Content $PackageFile) -join "`n" | ConvertFrom-Json).version
|
$ToolsVersion = ((Get-Content $PackageFile) -join "`n" | ConvertFrom-Json).version
|
||||||
|
|
||||||
$OutDir = $Env:ARTIFACTS_OUT + "/grpc-tools/v" + $ToolsVersion
|
$OutDir = $Base + "/../../artifacts/grpc-tools/v" + $ToolsVersion
|
||||||
Mkdir-p $OutDir
|
Mkdir-p $OutDir
|
||||||
|
|
||||||
$ArchList = "ia32","x64"
|
$ArchList = "ia32","x64"
|
||||||
|
|
|
@ -23,8 +23,8 @@ protobuf_base=$base/deps/protobuf
|
||||||
|
|
||||||
tools_version=$(jq '.version' < package.json | tr -d '"')
|
tools_version=$(jq '.version' < package.json | tr -d '"')
|
||||||
|
|
||||||
# Note: $ARTIFACTS_OUT should not be in this directory
|
# Note: artifacts should not be output in the package directory
|
||||||
out_dir=$ARTIFACTS_OUT/grpc-tools/v$tools_version
|
out_dir=$base/../../artifacts/grpc-tools/v$tools_version
|
||||||
mkdir -p "$out_dir"
|
mkdir -p "$out_dir"
|
||||||
|
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
|
|
Loading…
Reference in New Issue