-
Notifications
You must be signed in to change notification settings - Fork 996
139 lines (123 loc) · 4.06 KB
/
vdbench.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: "vdbench"
on:
push:
branches:
- 'main'
- 'release-*'
paths:
- '**/vdbench.yml'
pull_request:
branches:
- 'main'
- 'release-*'
paths:
- '**/vdbench.yml'
workflow_dispatch:
inputs:
debug:
type: boolean
description: "Run the build with tmate debugging enabled"
required: false
default: false
schedule:
- cron: '0 17 * * *'
jobs:
vdbench:
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
meta: [ 'redis', 'mysql', 'fdb', 'tikv']
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: mount coverage dir
timeout-minutes: 5
uses: ./.github/actions/mount-coverage-dir
with:
mount_point: cover
access_key: ${{ secrets.CI_COVERAGE_AWS_AK }}
secret_key: ${{ secrets.CI_COVERAGE_AWS_SK }}
token: ${{ secrets.CI_COVERAGE_AWS_TOKEN }}
- name: Set Variable
id: vars
run: |
if [ "${{matrix.meta}}" == "fdb" ]; then
echo "target=juicefs.fdb" >> $GITHUB_OUTPUT
else
echo "target=juicefs" >> $GITHUB_OUTPUT
fi
- name: Remove unused software
timeout-minutes: 10
run: |
echo "before remove unused software"
sudo df -h
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
echo "after remove unused software"
sudo df -h
- name: Build
timeout-minutes: 10
uses: ./.github/actions/build
with:
target: ${{steps.vars.outputs.target}}
- name: Prepare meta db
run: |
chmod +x .github/scripts/start_meta_engine.sh
source .github/scripts/start_meta_engine.sh
start_meta_engine ${{matrix.meta}}
meta_url=$(get_meta_url ${{matrix.meta}})
create_database $meta_url
- name: Install tools
shell: bash
run: |
wget -q https://dl.minio.io/client/mc/release/linux-amd64/mc
chmod +x mc
wget -q https://s.juicefs.com/static/bench/vdbench50407.zip
unzip vdbench50407.zip -d vdbench
- name: vdbench-long-run
shell: bash
run: |
source .github/scripts/start_meta_engine.sh
meta_url=$(get_meta_url ${{matrix.meta}})
GOCOVERDIR=$(pwd)/cover ./juicefs format $meta_url vdbench-long-run --trash-days 0
GOCOVERDIR=$(pwd)/cover ./juicefs mount -d $meta_url /tmp/jfs --no-usage-report --cache-size 1024 --max-deletes 50
vdbench/vdbench -f .github/workflows/resources/vdbench_long_run.conf -jn
- uses: actions/upload-artifact@v4
with:
name: output-long-run-${{ matrix.meta }}
path: output
- name: check vdbench log
if: always()
run: |
grep -i "java.lang.RuntimeException" output/errorlog.html && exit 1 || true
if ! grep -q "Vdbench execution completed successfully" output/logfile.html; then
echo "vdbench not completed succeed"
exit 1
fi
- name: log
if: always()
run: |
tail -300 ~/.juicefs/juicefs.log
grep "<FATAL>:" ~/.juicefs/juicefs.log && exit 1 || true
- name: upload coverage report
timeout-minutes: 5
continue-on-error: true
uses: ./.github/actions/upload-coverage
with:
UPLOAD_TOKEN: ${{ secrets.CI_COVERAGE_FILE_UPLOAD_AUTH_TOKEN }}
- name: Send Slack Notification
if: failure()
uses: juicedata/slack-notify-action@main
with:
channel-id: "${{ secrets.SLACK_CHANNEL_ID_FOR_PR_CHECK_NOTIFY }}"
slack_bot_token: "${{ secrets.SLACK_BOT_TOKEN }}"
- name: Setup upterm session
if: failure() && (github.event.inputs.debug == 'true' || github.run_attempt != 1)
# if: failure()
timeout-minutes: 60
uses: lhotari/action-upterm@v1