-
Notifications
You must be signed in to change notification settings - Fork 41
128 lines (111 loc) · 4.04 KB
/
build-cpp-runtime-bindings.yml
File metadata and controls
128 lines (111 loc) · 4.04 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Copyright 2025 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build and test C++ Runtime Bindings
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-cpp-runtime-bindings:
name: Build and unit tests for C++ runtime bindings
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- name: "with static library"
enable_lvq_leanvec: "ON"
suffix: ""
- name: "public only"
enable_lvq_leanvec: "OFF"
suffix: "-public-only"
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Build Docker image
run: |
docker build -t svs-manylinux228:latest -f docker/x86_64/manylinux228/Dockerfile .
- name: Build libraries in Docker container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
-e ENABLE_LVQ_LEANVEC=${{ matrix.enable_lvq_leanvec }} \
-e SUFFIX=${{ matrix.suffix }} \
svs-manylinux228:latest \
/bin/bash .github/scripts/build-cpp-runtime-bindings.sh
- name: Upload cpp runtime bindings artifacts
uses: actions/upload-artifact@v7
with:
name: svs-cpp-runtime-bindings${{ matrix.suffix }}
path: svs-cpp-runtime-bindings${{ matrix.suffix }}.tar.gz
retention-days: 7 # Reduce retention due to size
- name: Upload conda package artifacts
uses: actions/upload-artifact@v7
with:
name: libsvs-runtime-conda${{ matrix.suffix }}
path: conda-bld/linux-64/libsvs-runtime-*.conda
retention-days: 7
# Run unit tests that were built as part of this job
- name: Run unit tests in Docker container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-w /workspace \
-e ENABLE_LVQ_LEANVEC=${{ matrix.enable_lvq_leanvec }} \
svs-manylinux228:latest \
/bin/bash /workspace/.github/scripts/test-cpp-runtime-unit.sh
# Run full test script using the built artifacts
test:
name: Integration tests for C++ runtime
needs: build-cpp-runtime-bindings
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- name: "with static library"
suffix: ""
- name: "public only"
suffix: "-public-only"
fail-fast: false
steps:
- uses: actions/checkout@v6
- name: Build Docker image
run: |
docker build -t svs-manylinux228:latest -f docker/x86_64/manylinux228/Dockerfile .
# Need to download for a new job
- name: Download conda package
uses: actions/download-artifact@v8
with:
name: libsvs-runtime-conda${{ matrix.suffix }}
path: runtime_conda
- name: List available artifacts
run: |
ls -la runtime_conda/
- name: Test in Docker container
run: |
docker run --rm \
-v ${{ github.workspace }}:/workspace \
-v ${{ github.workspace }}/runtime_conda:/runtime_conda \
-w /workspace \
-e SUFFIX=${{ matrix.suffix }} \
svs-manylinux228:latest \
/bin/bash .github/scripts/test-cpp-runtime-bindings.sh