所以我有一个go-gettable依赖项,测试等项目.
我想把它整合到Jenkins中.除了编写makefile之外,是否存在任何人为此用例推荐的自动构建系统?
我需要:
我过去曾经使用过godag来做这类工作,但似乎有点没有维护.
编辑:目前我正在使用以下脚本直接输入Jenkins作为构建步骤:
#this gets the dependencies but doesn't install them, avoiding permission problems
go get -d
#build the packages, -x outputs the compiler command line
go build -x
#this was tricky - ./... means "for each sub-package recursively"
go test ./...
Run Code Online (Sandbox Code Playgroud) 我在模拟考试中得到了两个问题.我得到了答案,但无法弄清楚背后的理由.
我将首先发布代码,然后发布问题和答案.也许有人会这么好解释我的答案?
package main
import "fmt"
func fact(n int, c chan int, d chan int) {
k := /* code to compute factorial of n */
z := <- d
c <- k + z
d <- z + 1
}
func main() {
r := 0
c := make(chan int)
d := make(chan int)
for i = 0 ; i < N ; i++ {
go fact(i,c,d)
}
d <- 0
for j = 0 ; j < N …
Run Code Online (Sandbox Code Playgroud) Python如何调用C库?例如,Tensorflow我认为主要是用C语言编写的,但可以从Python中使用.我正在考虑在我自己的(解释的)编程语言中实现类似的东西(用Go编写,但我认为它将是一个类似的过程).
Python程序调用C函数时会发生什么?我在想RPC或DLL,但它们似乎都不太可能.