Pr/ci docs refresh #26
Workflow file for this run
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] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| XLINGS_VERSION: v0.4.0 | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install system deps | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y curl git build-essential | |
| - name: Install Xlings | |
| env: | |
| XLINGS_NON_INTERACTIVE: 1 | |
| run: | | |
| VERSION_NUM="${XLINGS_VERSION#v}" | |
| TARBALL="xlings-${VERSION_NUM}-linux-x86_64.tar.gz" | |
| curl -fSL -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}" | |
| tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP" | |
| EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1) | |
| chmod +x "$EXTRACT_DIR/bin/xlings" | |
| "$EXTRACT_DIR/bin/xlings" self install | |
| echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV" | |
| - name: Install project dependencies via Xlings | |
| run: | | |
| xlings install | |
| xmake --version | |
| gcc --version | |
| - name: Build with xmake | |
| run: | | |
| xmake f -m release -y -vvD | |
| xmake -a -j"$(nproc)" | |
| - name: Run tests | |
| run: | | |
| xmake run test_socket -y | |
| xmake run test_tls -y | |
| xmake run test_http -y | |
| xmake run test_sse -y | |
| xmake run test_http_stream -y | |
| xmake run test_proxy -y | |
| xmake run test_integration -y | |
| xmake run test_types -y | |
| xmake run test_serialization -y | |
| xmake run test_coro -y | |
| xmake run test_client -y | |
| xmake run test_openai_serialize -y | |
| xmake run test_anthropic_serialize -y | |
| xmake run test_tool_calling -y | |
| xmake run test_structured_output -y | |
| xmake run test_embeddings -y | |
| xmake run test_llmapi_integration -y | |
| build-macos: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Xlings | |
| env: | |
| XLINGS_NON_INTERACTIVE: 1 | |
| run: | | |
| VERSION_NUM="${XLINGS_VERSION#v}" | |
| TARBALL="xlings-${VERSION_NUM}-macosx-arm64.tar.gz" | |
| curl -fSL -o "$RUNNER_TEMP/$TARBALL" "https://github.com/d2learn/xlings/releases/download/${XLINGS_VERSION}/${TARBALL}" | |
| tar -xzf "$RUNNER_TEMP/$TARBALL" -C "$RUNNER_TEMP" | |
| EXTRACT_DIR=$(find "$RUNNER_TEMP" -maxdepth 1 -type d -name "xlings-*" | head -1) | |
| xattr -dr com.apple.quarantine "$EXTRACT_DIR" 2>/dev/null || true | |
| chmod +x "$EXTRACT_DIR/bin/xlings" | |
| "$EXTRACT_DIR/bin/xlings" self install | |
| echo "PATH=$HOME/.xlings/subos/current/bin:$PATH" >> "$GITHUB_ENV" | |
| - name: Install project dependencies via Xlings | |
| run: | | |
| xlings install | |
| clang --version | |
| - name: Configure xmake | |
| run: | | |
| LLVM_ROOT="$HOME/.xlings/data/xpkgs/xim-x-llvm" | |
| LLVM_SDK=$(find "$LLVM_ROOT" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -1) | |
| test -d "$LLVM_SDK" | |
| "$LLVM_SDK/bin/clang++" --version | |
| xmake f -m release --toolchain=llvm --sdk="$LLVM_SDK" -y -vvD | |
| - name: Build with xmake | |
| run: xmake -a -j"$(sysctl -n hw.logicalcpu)" | |
| - name: Run tests | |
| run: | | |
| xmake run test_socket -y | |
| xmake run test_tls -y | |
| xmake run test_http -y | |
| xmake run test_sse -y | |
| xmake run test_http_stream -y | |
| xmake run test_proxy -y | |
| xmake run test_integration -y | |
| xmake run test_types -y | |
| xmake run test_serialization -y | |
| xmake run test_coro -y | |
| xmake run test_client -y | |
| xmake run test_openai_serialize -y | |
| xmake run test_anthropic_serialize -y | |
| xmake run test_tool_calling -y | |
| xmake run test_structured_output -y | |
| xmake run test_embeddings -y | |
| xmake run test_llmapi_integration -y | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup xmake | |
| uses: xmake-io/github-action-setup-xmake@v1 | |
| with: | |
| xmake-version: latest | |
| - name: Build with xmake | |
| shell: pwsh | |
| run: | | |
| xmake f -m release -y -vvD | |
| xmake -a -j$env:NUMBER_OF_PROCESSORS | |
| - name: Run tests | |
| shell: pwsh | |
| run: | | |
| xmake run test_socket -y | |
| xmake run test_tls -y | |
| xmake run test_http -y | |
| xmake run test_sse -y | |
| xmake run test_http_stream -y | |
| xmake run test_proxy -y | |
| xmake run test_integration -y | |
| xmake run test_types -y | |
| xmake run test_serialization -y | |
| xmake run test_coro -y | |
| xmake run test_client -y | |
| xmake run test_openai_serialize -y | |
| xmake run test_anthropic_serialize -y | |
| xmake run test_tool_calling -y | |
| xmake run test_structured_output -y | |
| xmake run test_embeddings -y | |
| xmake run test_llmapi_integration -y |