fix: improve llmapi + tinyhttps package definitions #91
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'packages/**' | |
| - 'tests/**' | |
| - '.github/**' | |
| - '.xlings.json' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'packages/**' | |
| - 'tests/**' | |
| - '.github/**' | |
| - '.xlings.json' | |
| env: | |
| XLINGS_NON_INTERACTIVE: 1 | |
| jobs: | |
| detect-changes: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| templates: ${{ steps.filter.outputs.templates }} | |
| cmdline: ${{ steps.filter.outputs.cmdline }} | |
| llmapi: ${{ steps.filter.outputs.llmapi }} | |
| lua: ${{ steps.filter.outputs.lua }} | |
| xpkg: ${{ steps.filter.outputs.xpkg }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| templates: | |
| - 'packages/t/templates/**' | |
| - 'tests/t/templates/**' | |
| - '.github/**' | |
| cmdline: | |
| - 'packages/c/cmdline/**' | |
| - 'tests/c/cmdline/**' | |
| - '.github/**' | |
| llmapi: | |
| - 'packages/l/llmapi/**' | |
| - 'tests/l/llmapi/**' | |
| - '.github/**' | |
| lua: | |
| - 'packages/m/mcpplibs-capi-lua/**' | |
| - 'tests/l/lua/**' | |
| - '.github/**' | |
| xpkg: | |
| - 'packages/m/mcpplibs-xpkg/**' | |
| - 'tests/m/mcpplibs-xpkg/**' | |
| - '.github/**' | |
| build: | |
| needs: detect-changes | |
| if: >- | |
| needs.detect-changes.outputs.templates == 'true' || | |
| needs.detect-changes.outputs.cmdline == 'true' || | |
| needs.detect-changes.outputs.llmapi == 'true' || | |
| needs.detect-changes.outputs.lua == 'true' || | |
| needs.detect-changes.outputs.xpkg == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-24.04, shell: bash } | |
| - { os: macos-15, shell: bash } | |
| - { os: windows-latest, shell: pwsh } | |
| runs-on: ${{ matrix.os }} | |
| name: build (${{ matrix.os }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-toolchain | |
| - name: Configure (linux) | |
| if: runner.os == 'Linux' | |
| working-directory: tests | |
| run: xmake f -P . -y | |
| - name: Configure (macos) | |
| if: runner.os == 'macOS' | |
| working-directory: tests | |
| run: xmake f -P . -y --toolchain=llvm | |
| - name: Configure (windows) | |
| if: runner.os == 'Windows' | |
| working-directory: tests | |
| run: xmake f -P . -y | |
| # templates | |
| - name: templates (unix) | |
| if: runner.os != 'Windows' && needs.detect-changes.outputs.templates == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y templates_test | |
| xmake run -P . templates_test | |
| - name: templates (windows) | |
| if: runner.os == 'Windows' && needs.detect-changes.outputs.templates == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y templates_test | |
| xmake run -P . templates_test | |
| # cmdline | |
| - name: cmdline (unix) | |
| if: runner.os != 'Windows' && needs.detect-changes.outputs.cmdline == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y cmdline_test | |
| xmake run -P . cmdline_test test_input | |
| - name: cmdline (windows) | |
| if: runner.os == 'Windows' && needs.detect-changes.outputs.cmdline == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y cmdline_test | |
| xmake run -P . cmdline_test test_input | |
| # llmapi (build only, needs API key to run) | |
| - name: llmapi (unix) | |
| if: runner.os != 'Windows' && needs.detect-changes.outputs.llmapi == 'true' | |
| working-directory: tests | |
| run: xmake build -P . -y llmapi_test | |
| - name: llmapi (windows) | |
| if: runner.os == 'Windows' && needs.detect-changes.outputs.llmapi == 'true' | |
| working-directory: tests | |
| run: xmake build -P . -y llmapi_test | |
| # lua | |
| - name: lua (unix) | |
| if: runner.os != 'Windows' && needs.detect-changes.outputs.lua == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y lua_test | |
| xmake run -P . lua_test | |
| - name: lua (windows) | |
| if: runner.os == 'Windows' && needs.detect-changes.outputs.lua == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y lua_test | |
| xmake run -P . lua_test | |
| # mcpplibs-xpkg | |
| - name: mcpplibs-xpkg (unix) | |
| if: runner.os != 'Windows' && needs.detect-changes.outputs.xpkg == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y mcpplibs-xpkg_test | |
| xmake run -P . mcpplibs-xpkg_test | |
| - name: mcpplibs-xpkg (windows) | |
| if: runner.os == 'Windows' && needs.detect-changes.outputs.xpkg == 'true' | |
| working-directory: tests | |
| run: | | |
| xmake build -P . -y mcpplibs-xpkg_test | |
| xmake run -P . mcpplibs-xpkg_test |