Merge pull request #27 from lucaromagnoli/feat/release_process #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |