Skip to content

Commit

Permalink
Merge pull request #55 from mlcommons/pipelines
Browse files Browse the repository at this point in the history
Refactor Lint Workflows and Add Initial End-to-End Tests for Tool Validations
  • Loading branch information
srinivas212 committed May 9, 2024
2 parents 03d2f0c + f61bb15 commit 233b475
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 14 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/cpp_lint.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Clang-format Full Tree
on: [push, pull_request]
name: C++ Lint

on: pull_request

jobs:
build:
cpp-lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.11
- name: Checkout Code
uses: actions/checkout@v2

- name: Format and Lint C++ Code
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
extensions: 'cc,cpp,h,hh'
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/end_to_end_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: End-to-End Tests

on: pull_request

jobs:
end-to-end-tests:
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup Python Environment
uses: actions/setup-python@v2
with:
python-version: '3.10.14'

- name: Install Chakra
run: |
pip install .
- name: Install PARAM
run: |
git clone https://github.com/facebookresearch/param.git
cd param/train/compute/python/
git checkout c83ce8429110a86549c40fec5a01acbd9fbd54a4
pip install .
- name: Test chakra_trace_link Without Arguments
run: |
chakra_trace_link || [ $? -eq 2 ]
- name: Test chakra_converter Without Arguments
run: |
chakra_converter || [ $? -eq 2 ]
- name: Test chakra_visualizer Without Arguments
run: |
chakra_visualizer || [ $? -eq 2 ]
- name: Test chakra_jsonizer Without Arguments
run: |
chakra_jsonizer || [ $? -eq 2 ]
- name: Test chakra_timeline_visualizer Without Arguments
run: |
chakra_timeline_visualizer || [ $? -eq 2 ]
20 changes: 11 additions & 9 deletions .github/workflows/python_lint.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name: Python Linting
name: Python Lint

on: [push, pull_request]
on: pull_request

jobs:
lint-and-format:
python-lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@v2

- name: Set up Python
- name: Setup Python Environment
uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: Install dependencies
- name: Install Dependencies
run: |
pip install -r requirements-dev.txt
pip install .
- name: Run ruff
run: ruff format --check --diff .
- name: Lint Python Code
run: |
ruff format .
ruff check .

0 comments on commit 233b475

Please sign in to comment.