run on sco #1
Workflow file for this run
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: runs on sco | ||
on: | ||
workflow_call: | ||
inputs: | ||
machine: | ||
description: If set to other value, the job need ssh | ||
type: string | ||
required: false | ||
default: "local" | ||
runner: | ||
description: Set up the build environment | ||
type: string | ||
required: false | ||
default: "tps-sco-ci" | ||
work_path: | ||
description: ci work home | ||
type: string | ||
required: false | ||
default: '/mnt/cache/share/deeplinkci/github/${{ github.repository }}/${{ github.run_number }}' | ||
env_path: | ||
description: ci env path | ||
type: string | ||
required: false | ||
default: '/mnt/cache/share/platform/env' | ||
jobs: | ||
checkout_code: | ||
name: checkout code | ||
runs-on: ${{ inputs.runner }} | ||
steps: | ||
- name: Checkout Code | ||
uses: DeepLink-org/DIOPI.dev/.github/actions/checkout-code@wgs/run_on_sco | ||
build: | ||
runs-on: ${{ inputs.runner }} | ||
needs: checkout_code | ||
steps: | ||
- name: build | ||
uses: DeepLink-org/DIOPI.dev/.github/actions/code-build-test@wgs/run_on_sco | ||
with: | ||
build_shell: """ | ||
srun --job-name=${GITHUB_JOB} bash -c \"export USE_COVERAGE=ON && cd ${work_path}/build_test \ | ||
&& source ${env_path}/pt2.0_diopi_nodeps \ | ||
&& cd impl && bash scripts/build_impl.sh torch\" | ||
""" | ||
job_name: "build_test" | ||
cover_job: "0" | ||
cleaner: "clean_all_if_error" | ||
gen_data: | ||
runs-on: ${{ inputs.runner }} | ||
needs: build | ||
steps: | ||
- name: gen data | ||
uses: DeepLink-org/DIOPI.dev/.github/actions/code-build-test@wgs/run_on_sco | ||
with: | ||
build_shell: """ | ||
srun --job-name=${GITHUB_JOB} bash -c \"cd ${work_path}/build_test/diopi_test/python \ | ||
&& source ${env_path}/pt2.0_diopi_cuda11.8 \ | ||
&& python main.py --mode gen_data\" | ||
""" | ||
job_name: "build_test" | ||
cover_job: "1" | ||
cleaner: "clean_all_if_error" | ||
op_test: | ||
runs-on: ${{ inputs.runner }} | ||
needs: [build, gen_data] | ||
steps: | ||
- name: NHWC-32bit-test | ||
uses: DeepLink-org/DIOPI.dev/.github/actions/code-build-test@wgs/run_on_sco | ||
with: | ||
build_shell: """ | ||
srun --job-name=${GITHUB_JOB} bash -c \"export USE_COVERAGE=ON && cd ${work_path}/build_test \ | ||
&& source ${env_path}/pt2.0_diopi_cuda11.8 && cd diopi_test/python && python main.py --mode gen_case --fname batch_norm --nhwc && | ||
python main.py --mode gen_case --fname index_select --four_bytes && python main.py --mode gen_case --fname arange --four_bytes && ${run_test} main.py --mode run_test\" | ||
""" | ||
job_name: "build_test" | ||
cover_job: "1" | ||
- name: test | ||
uses: DeepLink-org/DIOPI.dev/.github/actions/code-build-test@wgs/run_on_sco | ||
with: | ||
build_shell: """ | ||
srun --job-name=${GITHUB_JOB} bash -c \"export CI=true && export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:${work_path}/build_test/impl/lib \ | ||
&& source ${env_path}/pt2.0_diopi_cuda11.8 && cd ${work_path}/build_test \ | ||
&& cd diopi_test/python && python main.py --mode gen_case && python main.py --mode run_test\" | ||
""" | ||
job_name: "build_test" | ||
cover_job: "1" |