-
Notifications
You must be signed in to change notification settings - Fork 5
109 lines (90 loc) · 2.79 KB
/
ci.yml
File metadata and controls
109 lines (90 loc) · 2.79 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
strategy:
matrix:
os: [ubuntu-22.04, windows-latest, macos-14]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 15
name: Build & Test on ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Dependencies (Linux)
if: matrix.os == 'ubuntu-22.04'
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt-get update -y
sudo apt-get install -y build-essential cmake g++ ninja-build mesa-vulkan-drivers vulkan-sdk
- name: Dependencies (Windows)
if: matrix.os == 'windows-latest'
uses: microsoft/setup-msbuild@v2
- name: Vulkan SDK (Windows)
if: matrix.os == 'windows-latest'
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.15"
- name: Set up Python
run: uv sync --dev --python 3.12
- name: Configure (Linux)
if: matrix.os == 'ubuntu-22.04'
run: >
cmake . -B build -G Ninja
-D VISP_CI=ON
-D VISP_VULKAN=ON
-D VISP_FMT_LIB=ON
- name: Configure (Windows)
if: matrix.os == 'windows-latest'
run: >
cmake . -B build -A x64
-D VISP_CI=ON
-D VISP_VULKAN=ON
- name: Configure (MacOS)
if: matrix.os == 'macos-14'
run: >
cmake . -B build -G Ninja
-D VISP_CI=ON
-D GGML_METAL=OFF
- name: Build
run: cmake --build build --config Release
# tests fail with vulkan/llvmpipe (runs out of memory or just wrong results)
# - name: Test Vulkan
# if: matrix.os == 'ubuntu-22.04'
# working-directory: ./build
# run: |
# export GGML_VK_VISIBLE_DEVICES=0
# ctest --verbose
- name: Test
working-directory: ./build
run: ctest --verbose -C Release
- name: Install
run: cmake --install build --prefix install --config Release
- name: Package
working-directory: ./build
run: cpack
- name: Upload artifacts
if: success() || failure()
uses: actions/upload-artifact@v4
with:
name: visioncpp-${{ matrix.os }}
path: |
./build/*.tar.gz
./build/*.zip
./tests/results/*.png
compression-level: 0