Skip to content

Merge pull request #1546 from rubik-hua/paged-attn #6485

Merge pull request #1546 from rubik-hua/paged-attn

Merge pull request #1546 from rubik-hua/paged-attn #6485

Workflow file for this run

name: Build and test
on:
pull_request:
push:
paths-ignore:
- '**.md'
- 'LICENSE'
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
type: [debug, release]
runs-on: ${{ matrix.os }}
steps:
- name: checkout code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Check Format
if: matrix.os == 'ubuntu-latest' && matrix.type == 'debug'
run: |
python -m pip install clang-format==21.1.8 black ruff==0.15.20 colorama
if [ "${{ github.event_name }}" = "pull_request" ]; then
base_ref="${{ github.event.pull_request.base.sha }}"
elif [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
base_ref="${{ github.event.before }}"
else
base_ref="$(git merge-base HEAD "origin/${{ github.event.repository.default_branch }}")"
fi
python3 scripts/format.py --ref "${base_ref}" --check
- name: install xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Build & Install
run: python scripts/install.py --omp=y -y
- name: install python packages
run: |
pip install numpy
pip install torch
- name: Python Test
run: python scripts/python_test.py --cpu
- name: run infinirt-test --cpu on Linux
if: matrix.os == 'ubuntu-latest'
run: |
./build/linux/x86_64/release/infinirt-test --cpu
- name: run infinirt-test --cpu on Windows
if: matrix.os == 'windows-latest'
run: |
.\build\windows\x64\release\infinirt-test.exe --cpu