Skia-Buildbot

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

Github stars Tracking Chart

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


Main metrics

Overview
Name With Ownergoogle/skia-buildbot
Primary LanguageGo
Program languageMakefile (Language Count: 16)
PlatformLinux, Mac, Windows
License:BSD 3-Clause "New" or "Revised" License
所有者活动
Created At2014-01-09 17:10:17
Pushed At2025-06-14 00:28:20
Last Commit At
Release Count0
用户参与
Stargazers Count155
Watchers Count22
Fork Count74
Commits Count24k
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count24
Pull Requests Close Count98
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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