Skip to content

feat: Add state output logic #375

feat: Add state output logic

feat: Add state output logic #375

Workflow file for this run

name: CI-Ubuntu
on:
push:
branches: [ dev, main ]
pull_request:
branches: [ dev, main ]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [3.12]
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Make compile scripts executable
run: |
chmod +x ./mithril/cores/c/raw_c/compile.sh
chmod +x ./mithril/cores/c/ggml/compile.sh
chmod +x ./mithril/cores/c/ggml/build_ggml.sh
- name: Compile C code
run: |
pushd ./mithril/cores/c/raw_c
./compile.sh
popd
pushd ./mithril/cores/c/ggml
./build_ggml.sh
./compile.sh
popd
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip install torch==2.4.1 --index-url https://download.pytorch.org/whl/cpu
pip install --upgrade "jax[cpu]"
pip install -r requirements/dev.txt
- name: Run pre-commit
run: |
python3 -m pip install mypy
python3 -m pip install pre-commit
pre-commit run --all-files
- name: Execute testcase unit tests
run: pytest -s tests/
on_failure:
needs: build
runs-on: ubuntu-22.04
env:
GH_TOKEN: ${{ github.token }}
if: ${{ failure() }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: review_pr
id: review-pr
run: |
gh pr review ${{ github.event.pull_request.number }} -r -b "Tests are failed. Please review the PR."
exit 1