forked from JasperFx/marten
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines-benchmarks.yml
81 lines (78 loc) · 2.64 KB
/
azure-pipelines-benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# A pipeline with no CI trigger
trigger: none
resources:
containers:
- container: pg12
image: oskardudycz/postgres-plv8:12-2
ports:
- 5432:5432
env:
POSTGRES_HOST_AUTH_METHOD: trust
- container: pg11
image: ionx/postgres-plv8:11.5
ports:
- 5432:5432
- container: pg10
image: ionx/postgres-plv8:10.6
ports:
- 5432:5432
- container: pg9.6
image: mysticmind/postgres-plv8:9.6-1.4
ports:
- 5432:5432
variables:
config: Release
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
dotnet_core_version: 6.0.x
node_version: 10.x
pg_db: marten_testing
marten_testing_database: "Host=localhost;Port=5432;Database=marten_testing;Username=postgres;Password=Password12!"
jobs:
- job: BuildAndBenchmark
# timeoutInMinutes: 20
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
# pg9.6:
# postgresService: pg9.6
# pg10:
# postgresService: pg10
pg11:
postgresService: pg11
#pg12:
# postgresService: pg11
services:
postgres: $[ variables['postgresService'] ]
steps:
- task: UseDotNet@2
displayName: Install .Net Core
inputs:
version: $(dotnet_core_version)
- task: NodeTool@0
displayName: Install Node.js
inputs:
versionSpec: $(node_version)
- script: |
PG_CONTAINER_NAME=$(docker ps --filter expose=5432/tcp --format {{.Names}})
docker exec $PG_CONTAINER_NAME psql -U postgres -c "create database $(pg_db);"
docker exec $PG_CONTAINER_NAME psql -U postgres -d $(pg_db) -c "create extension if not exists plv8;"
docker exec $PG_CONTAINER_NAME psql -U postgres -c "DO 'plv8.elog(NOTICE, plv8.version);' LANGUAGE plv8;"
displayName: Create db and add plv8 extension
- script: ./build.sh --no-color ci
- script: ./build.sh --no-color benchmarks
displayName: BuildAndBenchmark
- task: CopyFiles@2
displayName: Copy Benchmark results
inputs:
Contents: |
src\MartenBenchmarks\bin\**\BenchmarkDotNet.Artifacts\results\?(*.html|*.md|*.csv)
src\MartenBenchmarks\bin\**\**\BenchmarkDotNet.Artifacts\results\?(*.html|*.md|*.csv)
src\MartenBenchmarks\bin\**\**\**\BenchmarkDotNet.Artifacts\results\?(*.html|*.md|*.csv)
TargetFolder: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: Publish Benchmark results
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: benchmarks