Skip to content

add multi-platform CI and mcpplibs-index-add skill #2

add multi-platform CI and mcpplibs-index-add skill

add multi-platform CI and mcpplibs-index-add skill #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
XLINGS_NON_INTERACTIVE: 1
jobs:
linux:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
test:
- { name: templates, dir: tests/t/templates, target: templates_test, run: true }
- { name: cmdline, dir: tests/c/cmdline, target: cmdline_test, run: true, run_args: test_input }
- { name: llmapi, dir: tests/l/llmapi, target: llmapi_test, run: false }
- { name: llmapi-capi,dir: tests/l/llmapi/capi, target: llmapi_test_c, run: false }
- { name: lua, dir: tests/l/lua, target: lua_test, run: true }
name: ${{ matrix.test.name }} (linux)
steps:
- uses: actions/checkout@v4
- name: Install xlings
run: curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/main/tools/other/quick_install.sh | bash
- name: Install toolchain
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xlings install gcc@15.1.0 -y
- name: Configure
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$HOME/.xlings/data/xpkgs/gcc/15.1.0/bin:$PATH"
xmake f -y --toolchain=gcc --sdk=$HOME/.xlings/data/xpkgs/gcc/15.1.0
- name: Build
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$HOME/.xlings/data/xpkgs/gcc/15.1.0/bin:$PATH"
xmake build -y ${{ matrix.test.target }}
- name: Run
if: matrix.test.run
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$HOME/.xlings/data/xpkgs/gcc/15.1.0/bin:$PATH"
xmake run ${{ matrix.test.target }} ${{ matrix.test.run_args }}
macos:
runs-on: macos-15
strategy:
fail-fast: false
matrix:
test:
- { name: templates, dir: tests/t/templates, target: templates_test, run: true }
- { name: cmdline, dir: tests/c/cmdline, target: cmdline_test, run: true, run_args: test_input }
- { name: llmapi, dir: tests/l/llmapi, target: llmapi_test, run: false }
- { name: llmapi-capi,dir: tests/l/llmapi/capi, target: llmapi_test_c, run: false }
- { name: lua, dir: tests/l/lua, target: lua_test, run: true }
name: ${{ matrix.test.name }} (macos)
steps:
- uses: actions/checkout@v4
- name: Install xlings
run: curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/main/tools/other/quick_install.sh | bash
- name: Install toolchain
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
brew install llvm@20
- name: Configure
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xmake f -y --toolchain=llvm --sdk=/opt/homebrew/opt/llvm@20
- name: Build
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xmake build -y ${{ matrix.test.target }}
- name: Run
if: matrix.test.run
working-directory: ${{ matrix.test.dir }}
run: |
export PATH="$HOME/.xlings/subos/current/bin:$PATH"
xmake run ${{ matrix.test.target }} ${{ matrix.test.run_args }}
windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
test:
- { name: templates, dir: tests/t/templates, target: templates_test, run: true }
- { name: cmdline, dir: tests/c/cmdline, target: cmdline_test, run: true, run_args: test_input }
- { name: llmapi, dir: tests/l/llmapi, target: llmapi_test, run: false }
- { name: llmapi-capi,dir: tests/l/llmapi/capi, target: llmapi_test_c, run: false }
- { name: lua, dir: tests/l/lua, target: lua_test, run: true }
name: ${{ matrix.test.name }} (windows)
steps:
- uses: actions/checkout@v4
- name: Install xlings
run: irm https://raw.githubusercontent.com/d2learn/xlings/refs/heads/main/tools/other/quick_install.ps1 | iex
- name: Configure
working-directory: ${{ matrix.test.dir }}
run: |
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
xmake f -y
- name: Build
working-directory: ${{ matrix.test.dir }}
run: |
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
xmake build -y ${{ matrix.test.target }}
- name: Run
if: matrix.test.run
working-directory: ${{ matrix.test.dir }}
run: |
$env:PATH = "$env:USERPROFILE\.xlings\subos\current\bin;$env:PATH"
xmake run ${{ matrix.test.target }} ${{ matrix.test.run_args }}