forked from InfiniTensor/InfiniCore
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (54 loc) · 1.71 KB
/
Copy pathbuild.yml
File metadata and controls
63 lines (54 loc) · 1.71 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
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: |
sudo apt-get install -y clang-format-16
pip install black ruff==0.15.20 colorama
if [ "${{ github.event_name }}" = "pull_request" ]; then
python3 scripts/format.py --ref "${{ github.event.pull_request.base.sha }}" --path src --check
elif [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
python3 scripts/format.py --ref "${{ github.event.before }}" --path src --check
else
python3 scripts/format.py --path src --check
fi
- 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