-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure_pipelines.yml
62 lines (54 loc) · 2.01 KB
/
azure_pipelines.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
trigger:
- master
- ci
pool: dis-03
stages:
- stage: Build
jobs:
- job: build_benchmark
steps:
- script: docker build -t pmwcas_bench_$(Build.BuildId) .
displayName: 'Build Docker image'
- stage: Test
jobs:
- job: test
steps:
- script: docker run --name=pmwcas_bench_$(Build.BuildId)_$(backend)_test pmwcas_bench_$(Build.BuildId)
displayName: 'Run tests'
- script: docker cp pmwcas_bench_$(Build.BuildId)_$(backend)_test:/usr/src/pmwcas/build_tmp/Testing .
displayName: 'Copy the test results'
- task: PublishTestResults@2
inputs:
testResultsFormat: 'CTest'
testResultsFiles: '**/Testing/*/Test.xml'
- job: benchmark
dependsOn: test
steps:
- script: docker run --name=pmwcas_bench_$(Build.BuildId)_bench --entrypoint
"/usr/src/pmwcas/build_tmp/array_bench/array_bench" pmwcas_bench_$(Build.BuildId)
--threads=4 --pmdk_pool=mwcas_pool
displayName: 'Run benchmarks'
env:
PMEM_IS_PMEM_FORCE: 1
- script: |
git clone --depth 1 -b gh-pages https://[email protected]/sfu-dis/pmwcas-benchmarks.git gh-pages
echo $(Build.SourceVersion) $(Build.BuildId) > ./public/build_data
docker cp pmwcas_bench_$(Build.BuildId)_bench:/usr/src/pmwcas/mwcas_bench_output.txt ./public/bench_data
cp ./gh-pages/data.json ./public/
cp ./public/* ./gh-pages
cd gh-pages
python3 ./data_process.py
git config user.email "[email protected]"
git config user.name "cibot"
git add .
git commit -m"update benchmark result"
git push origin gh-pages --force
env:
GH_TOKEN: $(GITHUB_TOKEN)
displayName: "Publish benchmark result"
- job: clean
dependsOn: benchmark
steps:
- script: docker rmi $(docker images --filter=reference="pmwcas_bench_$(Build.BuildId)*" -q) --force
displayName: 'Clean the containers'
condition: always()