-
Notifications
You must be signed in to change notification settings - Fork 15
51 lines (51 loc) · 1.51 KB
/
ci-test-example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Test-examples-CI
on:
push:
branches: [ dev, main ]
pull_request:
branches: [ dev, main ]
env:
CI: true
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 script 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
pip install tiktoken
pip install transformers
pip install librosa
pip install einops
pip install ftfy regex tqdm
pip install git+https://github.com/openai/CLIP.git
- name: Execute testcase unit tests
run: pytest -s test_examples/