Skip to content

Commit 551c737

Browse files
committed
enable go test in ci
1 parent f9b384a commit 551c737

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
js-version: ['16']
3636
r-version: ['4.1.2']
3737
lua-version: ['2.0.5'] # Note: Not used as benchmark is broken.
38-
go-version: ['1.17.4'] # Note: Not used as benchmark is broken.
38+
go-version: ['1.17.4']
3939

4040
steps:
4141
- uses: actions/checkout@v3

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ benchmarks/fortran%.csv: bin/fperf%
8787

8888
benchmarks/go.csv: export GOPATH=$(abspath gopath)
8989
benchmarks/go.csv: perf.go
90-
#CGO_LDFLAGS="-lopenblas $(LIBM)" go get github.com/gonum/blas/cgo
91-
go get github.com/gonum/blas/blas64
92-
go get github.com/gonum/blas/cgo
93-
go get github.com/gonum/matrix/mat64
94-
go get github.com/gonum/stat
90+
go env -w GO111MODULE=off
91+
export CGO_LDFLAGS="-L${LIBM} -lopenblas"
92+
go get gonum.org/v1/netlib/blas/netlib
93+
go get gonum.org/v1/gonum/mat
94+
go get gonum.org/v1/gonum/stat
9595
@for t in $(ITERATIONS); do go run $<; done >$@
9696

9797
benchmarks/julia.csv: perf.jl
@@ -135,7 +135,7 @@ benchmarks/rust.csv: rust/src/main.rs rust/src/util.rs rust/Cargo.lock
135135
@for t in $(ITERATIONS); do cargo run --release -q; done >../$@
136136

137137
LANGUAGES = c fortran go java javascript julia lua mathematica matlab octave python r rust
138-
GH_ACTION_LANGUAGES = c fortran java javascript julia python r rust
138+
GH_ACTION_LANGUAGES = c fortran go java javascript julia python r rust
139139

140140
# These were formerly listed in LANGUAGES, but I can't get them to run
141141
# 2017-09-27 johnfgibson

perf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ func main() {
234234

235235
func runBenchmarkFor(fn func(*testing.B)) (seconds float64, err error) {
236236
bm := testing.Benchmark(fn)
237-
if (bm == testing.BenchmarkResult{}) {
237+
if (bm.N == 0) {
238238
return 0, errors.New("failed")
239239
}
240240
return bm.T.Seconds() / float64(bm.N), nil

0 commit comments

Comments
 (0)