Skip to content

Commit abe6754

Browse files
committed
build release
1 parent 0607a81 commit abe6754

3 files changed

Lines changed: 34 additions & 16 deletions

File tree

‎.github/workflows/dotnet.yml‎

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,24 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212

13+
strategy:
14+
matrix:
15+
dotnet: ["3.1.x", "5.0.x", "6.0.x"]
16+
1317
steps:
1418
- uses: actions/checkout@v3
15-
- name: Setup .NET 3.1
16-
uses: actions/setup-dotnet@v2
17-
with:
18-
dotnet-version: 3.1.x
19-
- name: Setup .NET 5.0
20-
uses: actions/setup-dotnet@v2
21-
with:
22-
dotnet-version: 5.0.x
23-
- name: Setup .NET 6.0
19+
- name: Setup .NET ${{ matrix.dotnet }}
2420
uses: actions/setup-dotnet@v2
2521
with:
26-
dotnet-version: 6.0.x
22+
dotnet-version: ${{ matrix.dotnet }}
2723
- name: Restore dependencies
28-
run: dotnet restore
24+
run: dotnet restore -c Release
2925
- name: Build
30-
run: dotnet build --no-restore
26+
run: dotnet build -c Release --no-restore
3127
- name: Test
32-
run: dotnet test --no-build --verbosity normal
28+
run: dotnet test -c Release --no-restore --no-build --verbosity normal
3329
- name: Package
34-
run: dotnet pack --no-restore -c Release
30+
run: dotnet pack -c Release --no-restore --no-build
3531
- name: Upload EntityGraphQL packages
3632
uses: actions/upload-artifact@v3
3733
with:

‎src/Benchmarks/CompileStagesBenchmarks.cs‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,24 @@ public CompileStagesBenchmarks()
5353
[Benchmark]
5454
public void CompileNoCache()
5555
{
56-
Schema.ExecuteRequest(gql, context, null, null, new ExecutionOptions { NoExecution = true, EnableQueryCache = false });
56+
Schema.ExecuteRequest(gql, context, null, null, new ExecutionOptions
57+
{
58+
#if DEBUG
59+
NoExecution = true,
60+
#endif
61+
EnableQueryCache = false
62+
});
5763
}
5864
[Benchmark]
5965
public void CompileCache()
6066
{
61-
Schema.ExecuteRequest(gql, context, null, null, new ExecutionOptions { NoExecution = true, EnableQueryCache = true });
67+
Schema.ExecuteRequest(gql, context, null, null, new ExecutionOptions
68+
{
69+
#if DEBUG
70+
NoExecution = true,
71+
#endif
72+
EnableQueryCache = true
73+
});
6274
}
6375
}
6476
}

‎src/Benchmarks/QueryBenchmarks.cs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ id name released
2424
}"
2525
}, new ExecutionOptions
2626
{
27+
#if DEBUG
2728
NoExecution = true
29+
#endif
2830
});
2931
}
3032

@@ -43,7 +45,9 @@ id name dob
4345
}"
4446
}, new ExecutionOptions
4547
{
48+
#if DEBUG
4649
NoExecution = true
50+
#endif
4751
});
4852
}
4953
[Benchmark]
@@ -64,7 +68,9 @@ id name dob
6468
}"
6569
}, new ExecutionOptions
6670
{
71+
#if DEBUG
6772
NoExecution = true
73+
#endif
6874
});
6975
}
7076
[Benchmark]
@@ -79,7 +85,9 @@ id name released
7985
}"
8086
}, new ExecutionOptions
8187
{
88+
#if DEBUG
8289
NoExecution = true
90+
#endif
8391
});
8492
}
8593
[GlobalSetup(Target = nameof(Query_ListWithTakeArg))]
@@ -106,7 +114,9 @@ id name released
106114
}"
107115
}, new ExecutionOptions
108116
{
117+
#if DEBUG
109118
NoExecution = true
119+
#endif
110120
});
111121
}
112122
}

0 commit comments

Comments
 (0)