Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ByronHsu committed Nov 4, 2024
1 parent ac7b38a commit 3987027
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/modal-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Modl CI Pipeline

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
checkstyle:
runs-on: ubuntu-latest
env:
MODAL_TOKEN_ID: ${{ secrets.MODAL_TOKEN_ID }}
MODAL_TOKEN_SECRET: ${{ secrets.MODAL_TOKEN_SECRET }}

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install modal
- name: Run tests
run: |
modal run ci
21 changes: 21 additions & 0 deletions ci.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from pathlib import Path

import modal

ROOT_PATH = Path(__file__).parent # .parent

image = (
modal.Image.debian_slim()
)

app = modal.App("ci-testing", image=image)

# mount: add local files to the remote container
repo = modal.Mount.from_local_dir(ROOT_PATH, remote_path="/root/liger-kernel")


@app.function(gpu="A10G", mounts=[repo])
def pytest():
import subprocess
subprocess.run(["pip", "install", "-e", ".[dev]"], check=True, cwd="/root/liger-kernel")
subprocess.run(["make", "test"], check=True, cwd="/root/liger-kernel")

0 comments on commit 3987027

Please sign in to comment.