Don't support github.com/golang/protobuf/[email protected] #163
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
check: | |
name: Project checks | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
path: src/github.com/containerd/protobuild | |
fetch-depth: 25 | |
- name: Project checks | |
uses: containerd/[email protected] | |
with: | |
working-directory: src/github.com/containerd/protobuild | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04, windows-2022 ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
path: src/github.com/containerd/protobuild | |
fetch-depth: 25 | |
- name: Setup environment | |
shell: bash | |
run: | | |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
path: src/github.com/containerd/protobuild | |
- name: Test | |
working-directory: src/github.com/containerd/protobuild | |
run: | | |
go test | |
v2: | |
name: Run with protoc-gen-go v1.26 | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.16.x | |
id: go | |
- name: Setup environment | |
shell: bash | |
run: | | |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV | |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
path: src/github.com/containerd/protobuild | |
- name: Build | |
working-directory: src/github.com/containerd/protobuild | |
run: | | |
go build . | |
- name: Install protoc | |
run: | | |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.18.1/protoc-3.18.1-linux-x86_64.zip | |
sudo unzip -x protoc-3.18.1-linux-x86_64.zip -d /usr/local | |
sudo chmod -R go+rX /usr/local/include | |
sudo chmod go+x /usr/local/bin/protoc | |
- name: Install protoc-gen-go and protoc-gen-go-grpc | |
run: | | |
go install google.golang.org/protobuf/cmd/[email protected] | |
go install google.golang.org/grpc/cmd/[email protected] | |
- name: Run protobuild to see all committed auto-generated files can be generated as is | |
working-directory: src/github.com/containerd/protobuild | |
run: | | |
rm examples/v2/*.pb.* | |
export PATH=$(go env GOBIN):$PATH | |
./protobuild github.com/containerd/protobuild/examples/v2 | |
git diff --exit-code |