Skip to content

Commit c201f7e

Browse files
Sunrisepeakclaude
andcommitted
ci: add GitHub Actions workflow for Linux, macOS, Windows
Uses xlings for one-command environment setup (xmake + toolchains). Runs offline tests on all three platforms. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 183d42d commit c201f7e

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.github/workflows/ci.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Xlings
16+
env:
17+
XLINGS_NON_INTERACTIVE: 1
18+
run: |
19+
curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/main/tools/other/quick_install.sh | bash
20+
echo "XLINGS_HOME=$HOME/.xlings" >> "$GITHUB_ENV"
21+
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
22+
23+
- name: Install dependencies
24+
run: xlings install
25+
26+
- name: Build
27+
run: xmake build -a
28+
29+
- name: Test
30+
run: |
31+
xmake run test_types
32+
xmake run test_serialization
33+
xmake run test_coro
34+
xmake run test_client
35+
xmake run test_openai_serialize
36+
xmake run test_anthropic_serialize
37+
xmake run test_llmapi_integration
38+
39+
build-macos:
40+
runs-on: macos-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
44+
- name: Install Xlings
45+
env:
46+
XLINGS_NON_INTERACTIVE: 1
47+
run: |
48+
curl -fsSL https://raw.githubusercontent.com/d2learn/xlings/main/tools/other/quick_install.sh | bash
49+
echo "XLINGS_HOME=$HOME/.xlings" >> "$GITHUB_ENV"
50+
echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH"
51+
52+
- name: Install dependencies
53+
run: xlings install
54+
55+
- name: Build
56+
run: xmake build -a
57+
58+
- name: Test
59+
run: |
60+
xmake run test_types
61+
xmake run test_serialization
62+
xmake run test_coro
63+
xmake run test_client
64+
xmake run test_openai_serialize
65+
xmake run test_anthropic_serialize
66+
xmake run test_llmapi_integration
67+
68+
build-windows:
69+
runs-on: windows-latest
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- name: Install Xlings
74+
env:
75+
XLINGS_NON_INTERACTIVE: "1"
76+
shell: pwsh
77+
run: |
78+
irm https://raw.githubusercontent.com/d2learn/xlings/main/tools/other/quick_install.ps1 | iex
79+
echo "XLINGS_HOME=$env:USERPROFILE\.xlings" >> $env:GITHUB_ENV
80+
echo "$env:USERPROFILE\.xlings\subos\current\bin" >> $env:GITHUB_PATH
81+
82+
- name: Install dependencies
83+
run: xlings install
84+
85+
- name: Build
86+
run: xmake build -a
87+
88+
- name: Test
89+
run: |
90+
xmake run test_types
91+
xmake run test_serialization
92+
xmake run test_coro
93+
xmake run test_client
94+
xmake run test_openai_serialize
95+
xmake run test_anthropic_serialize
96+
xmake run test_llmapi_integration

0 commit comments

Comments
 (0)