Skip to content

Support for platform details in submission generation #179

Support for platform details in submission generation

Support for platform details in submission generation #179

# This workflow will run configured tests for any updated CM scripts
name: Individual CM script Tests
on:
pull_request:
branches: [ "main", "mlperf-inference", "dev" ]
paths:
- 'script/**_cm.json'
- 'script/**_cm.yml'
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
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 tests/script/process_tests.py ${{ steps.getfile.outputs.files }}