Skia-Buildbot

Skia 基础设施的构建、测试和分析工具。「Build, Test, and Analysis Tools for Skia Infrastructure」

Github星跟踪图

Skia-Buildbot 存储库

这个版本包含 Skia 的基础架构代码。

获取源代码

主要的源代码仓库是一个 Git 仓库,托管在 https://skia.googlesource.com/buildbot.git。可以直接用 git clone 或通过 go get 检出(check out)这个仓库。

使用 git clone 可以让你在任何你想要的目录下工作。你仍然需要设置 GOPATH 来构建一些应用程序(建议将其放在缓存目录下)。例如:

$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot

使用 go get 将会把版本库和所有的 Go 依赖项一起获取到你的 GOPATH 目录中。你需要设置 GOPATH 和 GO111MODULE=on。例如:

$ export GOPATH=${WORKDIR}
$ export GO111MODULE=on
$ go get -u -t go.skia.org/infra/...
$ cd ${GOPATH}/src/go.skia.org/infra/

注意:go.skia.org 是一个自定义的导入路径,只有像这里的例子一样使用才会有效。

安装 Node.js(不是以 root 身份),并将 bin 目录添加到路径中。可以选择运行 npm install npm -g,正如 npm 入门文档 中所建议的那样。

安装其他依赖项:

$ sudo apt-get install python-django
$ go get -u github.com/kisielk/errcheck \
  golang.org/x/tools/cmd/goimports \
  go.chromium.org/luci/client/cmd/isolate
$ npm install -g polylint bower

构建一切:

$ make all

生成的代码

一些代码是使用 go generate 和外部二进制文件生成的。首先,安装资产创建脚本中引用的 protc 版本,并确保它在 protoc 的其他版本之前在您的路径上。

安装必要的 go 包:

$ go get -u \
  github.com/golang/protobuf/protoc-gen-go \
  golang.org/x/tools/cmd/stringer \
  google.golang.org/grpc \
  github.com/vektra/mockery/...

要生成代码,请在此目录下运行:

$ go generate ./...

运行单元测试

安装 Cloud SDK

使用此命令运行预提交测试。

$ ./run_unittests --small


主要指标

概览
名称与所有者google/skia-buildbot
主编程语言Go
编程语言Makefile (语言数: 16)
平台Linux, Mac, Windows
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2014-01-09 17:10:17
推送于2025-06-14 00:28:20
最后一次提交
发布数0
用户参与
星数155
关注者数22
派生数74
提交数24k
已启用问题?
问题数0
打开的问题数0
拉请求数0
打开的拉请求数24
关闭的拉请求数98
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Skia-Buildbot Repository

This repo contains infrastructure code for Skia.

Getting the Source Code

The main source code repository is a Git repository hosted at
https://skia.googlesource.com/buildbot.git.
It is possible to check out this repository directly with git clone or via
go get.

Using git clone allows you to work in whatever directory you want. You will
still need to set GOPATH in order to build some apps (recommended to put this in
a cache dir). E.g.:

$ cd ${WORKDIR}
$ git clone https://skia.googlesource.com/buildbot.git
$ export GOPATH=${HOME}/.cache/gopath/$(basename ${WORKDIR})
$ mkdir $GOPATH
$ cd buildbot

Using go get will fetch the repository into your GOPATH directory along with
all the Go dependencies. You will need to set GOPATH and GO111MODULE=on. E.g.:

$ export GOPATH=${WORKDIR}
$ export GO111MODULE=on
$ go get -u -t go.skia.org/infra/...
$ cd ${GOPATH}/src/go.skia.org/infra/

Note: go.skia.org is a custom import path and will only work if used like the
examples here.

Install Node.js (not as root) and add the bin
dir to your path. Optionally run npm install npm -g, as suggested by the
npm getting started doc.

Install other dependencies:

$ sudo apt-get install python-django
$ go get -u github.com/kisielk/errcheck \
  golang.org/x/tools/cmd/goimports \
  go.chromium.org/luci/client/cmd/isolate
$ npm install -g polylint bower

Build ~everything:

$ make all

Generated Code

Some code is generated using go generate with external binaries. First,
install the version of protoc referenced in the asset creation
script

and ensure it is on your PATH before other versions of protoc.

Install the necessary go packages:

$ go get -u \
  github.com/golang/protobuf/protoc-gen-go \
  golang.org/x/tools/cmd/stringer \
  google.golang.org/grpc \
  github.com/vektra/mockery/...

To generate code run in this directory:

$ go generate ./...

Running unit tests

Install Cloud SDK.

Use this command to run the presubmit tests:

$ ./run_unittests --small