Skip to content

Copied mlperf automotive CM scripts #9

Copied mlperf automotive CM scripts

Copied mlperf automotive CM scripts #9

# This workflow will run configured tests for any updated CM scripts
name: Individual CM script Tests
on:
pull_request:
branches: [ "main", "dev" ]
paths:
- 'script/**_cm.json'
- 'script/**_cm.yaml'
jobs:
run-script-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
test-input-index: [ "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11+" ]
steps:
- name: 'Checkout'
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Get changed files
id: getfile
run: |
git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }}
git fetch upstream
echo "files=$(git diff upstream/${{ github.event.pull_request.base.ref }} --name-only | xargs)" >> $GITHUB_OUTPUT
- name: RUN Script Tests
run: |
echo ${{ steps.getfile.outputs.files }}
for file in ${{ steps.getfile.outputs.files }}; do
echo $file
done
python3 -m pip install "cmind @ git+https://[email protected]/mlcommons/ck.git@mlperf-inference#subdirectory=cm"
cm pull repo --url=${{ github.event.pull_request.head.repo.html_url }} --checkout=${{ github.event.pull_request.head.ref }}
DOCKER_CM_REPO=${{ github.event.pull_request.head.repo.html_url }} DOCKER_CM_REPO_BRANCH=${{ github.event.pull_request.head.ref }} TEST_INPUT_INDEX=${{ matrix.test-input-index }} python3 script/test-cm-core/src/script/process_tests.py ${{ steps.getfile.outputs.files }}