Skip to content

Commit

Permalink
Merge branch 'main' into binyli/mscclpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Binyang2014 committed May 7, 2024
2 parents d28a1db + 3bfba6b commit 5d09742
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 12 deletions.
35 changes: 25 additions & 10 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: Tests

on:
workflow_dispatch:
inputs:
commit_hash:
description: 'The git commit hash to compare against'
required: true
default: 'fa5accc63ac39840422ff0d6b0ee875706c95e90' # legacy main branch commit hash
push:
pull_request:
branches: [ main ]
Expand All @@ -21,38 +27,47 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install msccl and dependencies
- name: Install msccl-tools and dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests and check at least 85% coverage
- name: Run tests and check at least 90% coverage
run: |
pytest
compare_outputs:
runs-on: ubuntu-latest
name: Compare outputs
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
name: Compare outputs with Python ${{ matrix.python-version }}

steps:
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}
- name: Checkout current branch
uses: actions/checkout@v4
- name: Install msccl and dependencies
- name: Install msccl-tools and dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Copy test script/config to temp directory
run: |
cp tests/generate_exmpale_results.py $RUNNER_TEMP/
cp tests/configs/example-config.json $RUNNER_TEMP/
cp tests/generate_test_results.py $RUNNER_TEMP/
cp tests/configs/test-config.json $RUNNER_TEMP/
- name: generate outputs
run: |
python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/pr-outputs/
python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/pr-outputs/
- name: Checkout specific branch
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit_hash }}
- name: Checkout main branch
uses: actions/checkout@v4
if: github.event_name == 'pull_request' || github.event_name == 'push'
with:
ref: main
- name: Install msccl and dependencies
Expand All @@ -61,7 +76,7 @@ jobs:
pip install -r requirements.txt
- name: generate outputs
run: |
python $RUNNER_TEMP/generate_exmpale_results.py examples/mscclang/ $RUNNER_TEMP/example-config.json $RUNNER_TEMP/tests/main-outputs/
python $RUNNER_TEMP/generate_test_results.py examples/mscclang/ $RUNNER_TEMP/test-config.json $RUNNER_TEMP/tests/main-outputs/
- name: Compare outputs
run: |
diff -rw $RUNNER_TEMP/tests/main-outputs/ $RUNNER_TEMP/tests/pr-outputs/
Expand Down
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified CODE_OF_CONDUCT.md
100755 → 100644
Empty file.
Empty file modified LICENSE
100755 → 100644
Empty file.
Empty file modified README.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion SECURITY.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ We prefer all communications to be in English.

Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
<!-- END MICROSOFT SECURITY.MD BLOCK -->
Empty file modified SUPPORT.md
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[pytest]
addopts = --cov=msccl --cov-report term-missing:skip-covered --cov-fail-under 85 -n auto
addopts = --cov=msccl --cov-report term-missing:skip-covered --cov-fail-under 90 -n auto
File renamed without changes.
File renamed without changes.

0 comments on commit 5d09742

Please sign in to comment.