Skip to content

Api-benchmark-baseline #2

Api-benchmark-baseline

Api-benchmark-baseline #2

name: Api-benchmark-baseline
on:
workflow_dispatch:
inputs:
PR_ID:
required: false
type: string
COMMIT_ID:
required: false
type: string
job-name:
required: true
default: 'api-benchmark'
type: choice
options:
- api-benchmark
- others
schedule:
- cron: '0 21 * * *'
- cron: '0 22 * * 3'
permissions: read-all
defaults:
run:
shell: bash
jobs:
clone:
name: Api benchmark clone
uses: ./.github/workflows/_Clone-linux.yml
with:
clone_dir: Paddle-build
is_pr: 'false'
build-docker:
name: Api benchmark build docker
needs: clone
uses: ./.github/workflows/docker.yml
with:
clone_dir: Paddle-build
task: build
build:
name: Api benchmark build
if: github.event_name == 'schedule' && github.event.schedule == '0 21 * * *'
needs: [clone, build-docker]
uses: ./.github/workflows/_Linux-build.yml
with:
docker_build_image: ${{ needs.build-docker.outputs.docker_build_image }}
is_pr: 'false'
api-benchmark-baseline-schedule:
name: Api benchmark baseline
strategy:
matrix:
run-labels: [api-bm-20, api-bm-27]
uses: ./.github/workflows/_Api-Benchmark.yml
needs: [clone, build-docker, build]
with:
docker_build_image: ${{ needs.build-docker.outputs.docker_build_image }}
baseline: 'true'
run-labels: ${{ matrix.run-labels }}
api-benchmark-baseline-pr:
name: Api benchmark baseline
if: github.event_name == 'workflow_dispatch' && github.event.inputs.job-name == 'api-benchmark'
strategy:
matrix:
run-labels: [api-bm-20, api-bm-27]
uses: ./.github/workflows/_Api-Benchmark.yml
needs: [clone, build-docker]
with:
docker_build_image: ${{ needs.build-docker.outputs.docker_build_image }}
baseline: 'true'
MANUALLY_PR_ID: ${{ inputs.PR_ID }}
MANUALLY_COMMIT_ID: ${{ inputs.COMMIT_ID }}
run-labels: ${{ matrix.run-labels }}
test1:
runs-on: ubuntu-latest
if: github.event.schedule == '0 0 * * *'
steps:
- name: Test
run: |
echo "test1"
test2:
runs-on: ubuntu-latest
if: github.event.schedule == '0 21 * * *'
steps:
- name: Test
run: |
echo "test2"
test3:
runs-on: ubuntu-latest
if: github.event.schedule == '0 22 * * 3'
steps:
- name: Test
run: |
echo "test3"
test4:
runs-on: ubuntu-latest
if: github.event.schedule == '0 21 * * 1'
steps:
- name: Test
run: |
echo "test4"