1+ # This workflow will build a golang project
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
3+
4+ name : Benchmark
5+
6+ on :
7+ push :
8+ branches : [ "main" ]
9+ pull_request :
10+ branches : [ "main" ]
11+
12+ jobs :
13+
14+ benchmark-1-cpu :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Set up Go
20+ uses : actions/setup-go@v4
21+ with :
22+ go-version : ' 1.25.4'
23+
24+ - name : Perform the benchmark
25+ run : cd world && go test -bench=. -benchmem -benchtime=2s -cpu=1
26+
27+ benchmark-2-cpu :
28+ runs-on : ubuntu-latest
29+ steps :
30+ - uses : actions/checkout@v4
31+
32+ - name : Set up Go
33+ uses : actions/setup-go@v4
34+ with :
35+ go-version : ' 1.22.4'
36+
37+ - name : Perform the benchmark
38+ run : cd world && go test -bench=. -benchmem -benchtime=2s -cpu=2
39+
40+
41+ benchmark-4-cpu :
42+ runs-on : ubuntu-latest
43+ steps :
44+ - uses : actions/checkout@v4
45+
46+ - name : Set up Go
47+ uses : actions/setup-go@v4
48+ with :
49+ go-version : ' 1.22.4'
50+
51+ - name : Perform the benchmark
52+ run : cd world && go test -bench=. -benchmem -benchtime=1s -cpu=4
53+
54+
55+ benchmark-8-cpu :
56+ runs-on : ubuntu-latest
57+ steps :
58+ - uses : actions/checkout@v4
59+
60+ - name : Set up Go
61+ uses : actions/setup-go@v4
62+ with :
63+ go-version : ' 1.22.4'
64+
65+ - name : Perform the benchmark
66+ run : cd world && go test -bench=. -benchmem -benchtime=1s -cpu=8
67+
68+
69+
70+ benchmark-16-cpu :
71+ runs-on : ubuntu-latest
72+ steps :
73+ - uses : actions/checkout@v4
74+
75+ - name : Set up Go
76+ uses : actions/setup-go@v4
77+ with :
78+ go-version : ' 1.22.4'
79+
80+ - name : Perform the benchmark
81+ run : cd world && go test -bench=. -benchmem -benchtime=1s -cpu=16
82+
83+
84+ benchmark-32-cpu :
85+ runs-on : ubuntu-latest
86+ steps :
87+ - uses : actions/checkout@v4
88+
89+ - name : Set up Go
90+ uses : actions/setup-go@v4
91+ with :
92+ go-version : ' 1.22.4'
93+
94+ - name : Perform the benchmark
95+ run : cd world && go test -bench=. -benchmem -benchtime=1s -cpu=32
96+
97+ benchmark-64-cpu :
98+ runs-on : ubuntu-latest
99+ steps :
100+ - uses : actions/checkout@v4
101+
102+ - name : Set up Go
103+ uses : actions/setup-go@v4
104+ with :
105+ go-version : ' 1.22.4'
106+
107+ - name : Perform the benchmark
108+ run : cd world && go test -bench=. -benchmem -benchtime=1s -cpu=64
0 commit comments