-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (64 loc) · 1.96 KB
/
macos-ci.yml
File metadata and controls
75 lines (64 loc) · 1.96 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
name: macOS CI
on:
workflow_dispatch: # Manual trigger only
push:
branches: [ main ] # Only run on main branch pushes
paths-ignore: # Skip for documentation changes
- '**.md'
- 'docs/**'
- '.github/**'
jobs:
build-and-test-macos:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
# Cache CMake build directory
- name: Cache CMake build
uses: actions/cache@v4
with:
path: |
build
!build/tests/llmcpp_tests
!build/examples
key: macos-cmake-${{ hashFiles('CMakeLists.txt', '**/CMakeLists.txt', 'src/**/*', 'include/**/*') }}
restore-keys: |
macos-cmake-
# Cache Homebrew packages
- name: Cache Homebrew (macOS)
uses: actions/cache@v4
with:
path: |
~/Library/Caches/Homebrew
/opt/homebrew/Cellar
key: macos-homebrew-${{ hashFiles('.github/workflows/macos-ci.yml') }}
restore-keys: macos-homebrew-
- name: Install dependencies (macOS)
run: |
brew install cmake ninja nlohmann-json
- name: Disable pre-commit hook
run: |
if [ -f .git/hooks/pre-commit ]; then
mv .git/hooks/pre-commit .git/hooks/pre-commit.disabled
fi
- name: Configure CMake
run: |
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLMCPP_BUILD_TESTS=ON
- name: Build
timeout-minutes: 20
run: cmake --build build --config Release --parallel
- name: Test
working-directory: build
timeout-minutes: 10
run: |
echo "Running CI-safe tests (excluding integration tests)..."
./tests/llmcpp_tests "~[integration]" --reporter compact
- name: Upload build artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos-build-logs
path: |
build/CMakeFiles/*.log
build/Testing/Temporary/LastTest.log