-
Notifications
You must be signed in to change notification settings - Fork 4
59 lines (50 loc) · 1.56 KB
/
Copy pathtest.yml
File metadata and controls
59 lines (50 loc) · 1.56 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
name: test
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
unit-tests:
name: unit-tests (linux-x64)
runs-on: ubuntu-22.04
env:
VCPKG_BINARY_SOURCES: clear;default,readwrite
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build tools
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ninja-build
- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- name: Restore vcpkg binary cache
uses: actions/cache@v4
with:
path: ${{ env.VCPKG_DEFAULT_BINARY_CACHE }}
key: vcpkg-v2-test-ubuntu-22.04-x64-linux-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.json', 'ports/**') }}
restore-keys: |
vcpkg-v2-test-ubuntu-22.04-x64-linux-
- name: Configure
shell: bash
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \
-DVCPKG_TARGET_TRIPLET=x64-linux \
-DVCPKG_MANIFEST_FEATURES=tests \
-DBUILD_TESTING=ON
- name: Build CLI and test binary
shell: bash
run: cmake --build build --target acecode acecode_unit_tests
- name: Validate bundled models.dev registry
shell: bash
run: ./build/acecode --validate-models-registry
- name: Run ctest
shell: bash
run: ctest --test-dir build --output-on-failure