name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: ["3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install torch --index-url https://download.pytorch.org/whl/cpu pip install -e . pip install pytest - name: Print version run: | python -c "import torch_speedkit; print(f'SpeedKit version: {torch_speedkit.__version__}')" - name: Run unit tests run: | pytest tests/test_auto.py tests/test_config.py -v - name: Test report tool (CPU, no side effects) run: | python -m torch_speedkit.report python -m torch_speedkit.report --apply --restore - name: Smoke test benchmark run: | python examples/benchmark_compare.py --help