2023-04-05 08:41:24 +00:00
|
|
|
name: Tests
|
2023-04-05 08:30:32 +00:00
|
|
|
|
|
|
|
on:
|
2023-04-10 06:19:22 +00:00
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- main
|
2023-04-05 08:30:32 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
2023-04-07 01:27:01 +00:00
|
|
|
build-linux:
|
2023-04-05 08:30:32 +00:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-04-05 08:30:32 +00:00
|
|
|
|
|
|
|
steps:
|
2023-11-02 17:40:20 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-05 08:34:19 +00:00
|
|
|
with:
|
2024-02-14 04:53:56 +00:00
|
|
|
submodules: "recursive"
|
2023-04-05 08:30:32 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-04-05 08:30:32 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-04-05 08:30:32 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install .[all] -v
|
2023-04-05 08:30:32 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pytest
|
2023-04-07 01:27:01 +00:00
|
|
|
|
|
|
|
build-windows:
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-04-07 01:27:01 +00:00
|
|
|
|
|
|
|
steps:
|
2024-04-30 02:52:23 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-07 01:27:01 +00:00
|
|
|
with:
|
2024-02-14 04:53:56 +00:00
|
|
|
submodules: "recursive"
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-04-07 01:27:01 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install .[all] -v
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pytest
|
2023-04-07 01:27:01 +00:00
|
|
|
|
2023-04-07 01:28:03 +00:00
|
|
|
build-macos:
|
2023-04-07 01:27:01 +00:00
|
|
|
|
2024-06-13 14:19:57 +00:00
|
|
|
runs-on: macos-latest
|
2023-04-07 01:27:01 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
2023-04-07 01:27:01 +00:00
|
|
|
|
|
|
|
steps:
|
2024-04-30 02:52:23 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-07 01:27:01 +00:00
|
|
|
with:
|
2024-02-14 04:53:56 +00:00
|
|
|
submodules: "recursive"
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-04-07 01:27:01 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
2024-06-13 14:19:57 +00:00
|
|
|
cache: 'pip'
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
python -m pip install .[all] --verbose
|
2023-04-07 01:27:01 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pytest
|
2023-11-02 01:15:01 +00:00
|
|
|
|
2023-11-14 19:59:08 +00:00
|
|
|
# build-linux-opencl:
|
|
|
|
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
# steps:
|
2024-04-30 02:52:23 +00:00
|
|
|
# - uses: actions/checkout@v4
|
2023-11-14 19:59:08 +00:00
|
|
|
# with:
|
2024-02-14 04:53:56 +00:00
|
|
|
# submodules: "recursive"
|
2023-11-14 19:59:08 +00:00
|
|
|
# - name: Set up Python 3.8
|
2024-04-30 02:52:23 +00:00
|
|
|
# uses: actions/setup-python@v5
|
2023-11-14 19:59:08 +00:00
|
|
|
# with:
|
|
|
|
# python-version: "3.8"
|
|
|
|
# - name: Set up OpenCL & CLBlast
|
|
|
|
# run: |
|
|
|
|
# wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
|
|
|
|
# echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
|
|
|
|
# sudo apt-get update
|
|
|
|
# sudo apt-get install -y --no-install-recommends llvm intel-oneapi-runtime-opencl intel-oneapi-runtime-compilers libclblast-dev
|
|
|
|
# - name: Install dependencies
|
|
|
|
# run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
# python -m pip install --upgrade pip
|
|
|
|
# CMAKE_ARGS="-DLLAMA_CLBLAST=on" python -m pip install .[all] --verbose
|
2023-11-14 19:59:08 +00:00
|
|
|
# - name: Test with pytest
|
|
|
|
# run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
# python -m pytest
|
2023-11-02 01:18:36 +00:00
|
|
|
|
|
|
|
|
2023-11-02 01:15:01 +00:00
|
|
|
build-macos-metal:
|
|
|
|
|
2024-06-13 14:19:57 +00:00
|
|
|
runs-on: macos-latest
|
2023-11-02 01:15:01 +00:00
|
|
|
|
|
|
|
steps:
|
2024-04-30 02:52:23 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-02 01:15:01 +00:00
|
|
|
with:
|
2024-02-14 04:53:56 +00:00
|
|
|
submodules: "recursive"
|
2024-06-13 14:19:57 +00:00
|
|
|
- name: Set up Python 3.9
|
2024-04-30 02:52:23 +00:00
|
|
|
uses: actions/setup-python@v5
|
2023-11-02 01:15:01 +00:00
|
|
|
with:
|
2024-06-13 14:19:57 +00:00
|
|
|
python-version: "3.9"
|
2023-11-02 01:15:01 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pip install --upgrade pip
|
|
|
|
CMAKE_ARGS="-DLLAMA_METAL=on" python -m pip install .[all] --verbose
|
2023-11-02 01:15:01 +00:00
|
|
|
- name: Test with pytest
|
|
|
|
run: |
|
2024-06-13 14:19:57 +00:00
|
|
|
python -m pytest
|