fio-benchmark #1258
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "fio-benchmark" | |
on: | |
push: | |
branches: | |
- main | |
- release** | |
paths: | |
- '**/fio_benchmark.yml' | |
- '**/fio.sh' | |
pull_request: | |
branches: | |
- main | |
- release** | |
paths: | |
- '**/fio_benchmark.yml' | |
- '**/fio.sh' | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
inputs: | |
debug: | |
type: boolean | |
description: "Run the build with tmate debugging enabled" | |
required: false | |
default: false | |
jobs: | |
fio_benchmark: | |
timeout-minutes: 30 | |
runs-on: [ubuntu-20.04] | |
strategy: | |
fail-fast: false | |
matrix: | |
meta: ['redis'] | |
fio_job : ['big-file-sequential-read', 'big-file-sequential-write', 'big-file-multi-read-4', | |
'big-file-multi-write-4', 'big-file-rand-read-256k', 'big-file-random-write-256k', | |
'small-file-seq-read-256k', 'small-file-seq-write-256k', 'small-file-multi-read-4', | |
'small-file-multi-write-4'] | |
# fio_job : ['big-file-sequential-read'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 'oldstable' | |
cache: true | |
- name: Build linux target | |
timeout-minutes: 10 | |
run: | | |
make juicefs | |
- name: Install tools | |
run: | | |
sudo .github/scripts/apt_install.sh fio | |
- name: Start meta and storage | |
run: | | |
chmod +x .github/scripts/start_meta_engine.sh | |
source .github/scripts/start_meta_engine.sh | |
start_meta_engine ${{matrix.meta}} minio | |
- name: Fio Benchmark | |
env: | |
AWS_ACCESS_KEY_ID: ${{secrets.CI_AWS_ACCESS_KEY_ID}} | |
AWS_SECRET_ACCESS_KEY: ${{secrets.CI_AWS_ACCESS_KEY_SECRET}} | |
run: | | |
source .github/scripts/start_meta_engine.sh | |
meta_url=$(get_meta_url ${{matrix.meta}}) | |
.github/scripts/fio.sh $meta_url ${{matrix.fio_job}} | |
- name: log | |
if: always() | |
run: | | |
if [ -f ~/.juicefs/juicefs.log ]; then | |
tail -300 ~/.juicefs/juicefs.log | |
grep "<FATAL>:" ~/.juicefs/juicefs.log && exit 1 || true | |
fi | |
success-all-test: | |
runs-on: ubuntu-latest | |
needs: [fio_benchmark] | |
if: always() | |
steps: | |
- uses: technote-space/workflow-conclusion-action@v3 | |
- uses: actions/checkout@v3 | |
- name: Check Failure | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
run: exit 1 | |
- name: Send Slack Notification | |
if: failure() && github.event_name != 'workflow_dispatch' | |
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: Success | |
if: success() | |
run: echo "All Done" |