Skip to content

Commit 86f0dca

Browse files
committed
update csharp infra
1 parent 8f8a9f7 commit 86f0dca

File tree

6 files changed

+81
-69
lines changed

6 files changed

+81
-69
lines changed

.github/dotnet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
44
sudo apt-add-repository https://packages.microsoft.com/ubuntu/22.04/prod
55
sudo apt-get update
6-
sudo apt-get install -y libmsquic zlib1g-dev
6+
sudo apt-get install -y libmsquic zlib1g-dev clang

.github/workflows/bench.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
codon,
2626
cpp,
2727
csharp,
28+
csharp_preview,
29+
csharp_native_aot,
2830
crystal,
2931
d,
3032
dart,

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,18 @@ _Current benchmarks problems and their implementations are from [The Computer La
6565

6666
[podman](https://podman.io/getting-started/installation) (or [docker](https://www.docker.com/) by changing `docker_cmd: podman` to `docker_cmd: docker` in `bench/bench.yaml`)
6767

68+
unzip
69+
6870
## Build
6971

7072
_The 1st step is to build source code from various of lanuages_
7173

7274
```bash
7375
cd bench
7476
# To build a subset
75-
dotnet run -p tool -- --task build --langs lisp go --problems nbody helloworld --force-rebuild
77+
dotnet run --project tool -- --task build --langs lisp go --problems nbody helloworld --force-rebuild
7678
# To build all
77-
dotnet run -p tool -- --task build
79+
dotnet run --project tool -- --task build
7880
```
7981

8082
## Test
@@ -84,9 +86,9 @@ _The 2nd step is to test built binaries to ensure the correctness of their imple
8486
```bash
8587
cd bench
8688
# To test a subset
87-
dotnet run -p tool -- --task test --langs lisp go --problems nbody helloworld
89+
dotnet run --project tool -- --task test --langs lisp go --problems nbody helloworld
8890
# To test all
89-
dotnet run -p tool -- --task test
91+
dotnet run --project tool -- --task test
9092
```
9193

9294
## Bench
@@ -96,16 +98,16 @@ _The 3rd step is to generate benchmarks_
9698
```bash
9799
cd bench
98100
# To bench a subset
99-
dotnet run -p tool -- --task bench --langs lisp go --problems nbody helloworld
101+
dotnet run --project tool -- --task bench --langs lisp go --problems nbody helloworld
100102
# To bench all
101-
dotnet run -p tool -- --task bench
103+
dotnet run --project tool -- --task bench
102104
```
103105

104106
_For usage_
105107

106108
```bash
107109
cd bench
108-
dotnet run -p tool -- -h
110+
dotnet run --project tool -- -h
109111

110112
BenchTool
111113
Main function

bench/bench_csharp.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ problems:
3535
- name: regex-redux
3636
source:
3737
- 5.cs
38+
- 5-m.cs
3839
- 6.cs
40+
- 6-m.cs
3941
- name: mandelbrot
4042
source:
4143
- 1.cs

bench/bench_csharp_native_aot.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lang: csharp
1+
lang: csharp_native_aot
22
problems:
33
- name: helloworld
44
source:
@@ -34,7 +34,9 @@ problems:
3434
- name: regex-redux
3535
source:
3636
- 5.cs
37+
- 5-m.cs
3738
- 6.cs
39+
- 6-m.cs
3840
- name: mandelbrot
3941
source:
4042
- 1.cs

bench/bench_csharp_preview.yaml

Lines changed: 64 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,72 @@
1-
lang: csharp
2-
enabled: false
1+
lang: csharp_preview
32
problems:
4-
# - name: helloworld
5-
# source:
6-
# - 1.cs
7-
# - name: binarytrees
8-
# source:
9-
# - 1.cs
10-
# - name: merkletrees
11-
# source:
12-
# - 1.cs
13-
# - 2.cs
14-
# - name: nbody
15-
# source:
16-
# - 8.cs
17-
# - 9.cs
18-
# - name: spectral-norm
19-
# source:
20-
# - 3.cs
21-
# - name: pidigits
22-
# source:
23-
# - 1.cs
24-
# - name: edigits
25-
# source:
26-
# - 1.cs
27-
# - name: fannkuch-redux
28-
# source:
29-
# # - 9.cs
30-
# - name: fasta
31-
# source:
32-
# - 5.cs
33-
# - name: knucleotide
34-
# source:
35-
# - 6.cs
3+
- name: helloworld
4+
source:
5+
- 1.cs
6+
- name: binarytrees
7+
source:
8+
- 1.cs
9+
- name: merkletrees
10+
source:
11+
- 1.cs
12+
- 2.cs
13+
- name: nbody
14+
source:
15+
- 8.cs
16+
- 9.cs
17+
- name: spectral-norm
18+
source:
19+
- 3.cs
20+
- name: pidigits
21+
source:
22+
- 1.cs
23+
- name: edigits
24+
source:
25+
- 1.cs
26+
- name: fannkuch-redux
27+
source:
28+
# - 9.cs
29+
- name: fasta
30+
source:
31+
- 5.cs
32+
- name: knucleotide
33+
source:
34+
- 6.cs
3635
- name: regex-redux
3736
source:
3837
- 5.cs
39-
# - 5p.cs
40-
# - name: mandelbrot
41-
# source:
42-
# - 1.cs
43-
# - 2.cs
44-
# - 3.cs
45-
# - name: json-serde
46-
# source:
47-
# - 1.cs
48-
# - 2.cs
49-
# - name: coro-prime-sieve
50-
# source:
51-
# - 1.cs
38+
- 5-m.cs
39+
- 6.cs
40+
- 6-m.cs
41+
- name: mandelbrot
42+
source:
43+
- 1.cs
44+
- 2.cs
45+
- 3.cs
46+
- name: json-serde
47+
source:
48+
- 1.cs
49+
- 2.cs
50+
- name: coro-prime-sieve
51+
source:
52+
- 1.cs
5253
- name: http-server
5354
source:
55+
- 1.cs
56+
- 2.cs
57+
- 2-http2.cs
5458
- 2-http3.cs
55-
# - name: nsieve
56-
# source:
57-
# - 1.cs
58-
# - 2.cs
59-
# - name: lru
60-
# source:
61-
# - 1.cs
62-
# - 2.cs
63-
# - name: secp256k1
64-
# source:
65-
# - 1.cs
59+
- name: nsieve
60+
source:
61+
- 1.cs
62+
- 2.cs
63+
- name: lru
64+
source:
65+
- 1.cs
66+
- 2.cs
67+
- name: secp256k1
68+
source:
69+
- 1.cs
6670
compiler_version_command:
6771
compiler_version_regex:
6872
runtime_version_parameter:
@@ -73,10 +77,10 @@ environments:
7377
compiler: dotnet
7478
version: 7
7579
compiler_version_command: dotnet --version
76-
docker: mcr.microsoft.com/dotnet/sdk:7.0
80+
docker: mcr.microsoft.com/dotnet/sdk:8.0-preview
7781
# docker_volumns:
7882
# - /tmp/.nuget/packages:/root/.nuget/packages
7983
include: dotnet_preview
80-
build: dotnet publish -c Release -r linux-x64 -f net7 --self-contained true -p:PublishSingleFile=true -o out # -p:PublishReadyToRun=true
84+
build: dotnet publish -c Release -r linux-x64 -f net8 --self-contained true -p:PublishSingleFile=true -o out # -p:PublishReadyToRun=true
8185
out_dir: out
8286
run_cmd: app

0 commit comments

Comments
 (0)