diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index deca292a..4278f4a2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,3 +123,43 @@ jobs: - name: Run cgroups v2 tests run: vagrant ssh default -- sudo -i /test.sh + + protos: + name: Generate .pb.go files from .proto files + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + with: + path: src/github.com/containerd/cgroups + + - name: Install protoc + run: | + curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.11.4/protoc-3.11.4-linux-x86_64.zip + sudo unzip -x protoc-3.11.4-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 Go + uses: actions/setup-go@v2 + with: + go-version: '1.17.x' + + - name: Install protoc-gen-go + run: | + go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26.0 + + - name: Install protobuild and go-fix-acronym + run: | + go install github.com/containerd/protobuild@67235b658dbf6caa5cbe2fa4c04ed49b5f31d3bd + go install github.com/containerd/protobuild/cmd/go-fix-acronym@67235b658dbf6caa5cbe2fa4c04ed49b5f31d3bd + working-directory: src/github.com/containerd/cgroups + + - name: make proto + run: | + rm $(find . -name '*.pb.go') + PATH=$GOPATH/bin:$PATH make proto + git diff --exit-code + env: + GOPATH: ${{ github.workspace }} + working-directory: src/github.com/containerd/cgroups