-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (66 loc) · 2.15 KB
/
ci.yml
File metadata and controls
79 lines (66 loc) · 2.15 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
# virtual environments: https://github.com/actions/virtual-environments
runs-on: ubuntu-24.04
steps:
# Caches and restores the bazelisk download directory, the bazel build directory.
- name: Cache bazel
uses: actions/cache@v5
env:
cache-name: bazel-cache
with:
path: |
~/.cache/bazelisk
~/.cache/bazel
key: ${{ runner.os }}-bazel-cache-${{ hashFiles('WORKSPACE', '**/BUILD', '**/*.bzl', '.bazelrc') }}
restore-keys: |
${{ runner.os }}-bazel-cache-
# Install dependencies
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y ocl-icd-opencl-dev gdb
- name: Setup model server
run: |
curl -fsSL https://ollama.com/install.sh | sh
ollama serve &
sleep 5
ollama pull llama3.2:3b
curl -sS http://localhost:11434/api/generate -d '{"model": "llama3.2:3b", "keep_alive": -1}' || exit 1
curl -sS http://localhost:11434/api/tags || exit 1
# Checks-out your repository under $GITHUB_WORKSPACE, which is the CWD for
# the rest of the steps
- uses: actions/checkout@v6
with:
lfs: true
submodules: true
# build
- name: Build the code
run: bazel build //...
# Test the project
- name: Run Unit tests
run: |
bazel test //... --flaky_test_attempts=3
# Run Address Sanitizer
# - name: Address Sanitizer
# run: VX_CL_SOURCE_DIR=$GITHUB_WORKSPACE/kernels/opencl bazel run --config asan //tests:vx_test
# Run OpenVX Integration test
- name: OpenVX Integration Test
run: VX_CL_SOURCE_DIR=$GITHUB_WORKSPACE/kernels/opencl bazel run //tests:vx_test
# Run OpenVX Conformance tests
- name: OpenVX Conformance Tests
run: ./test_vx_conformance.sh
# (Optional) Linting or Formatting
# - name: Run Linter
# run: |
# bazel run //:lint