-
Notifications
You must be signed in to change notification settings - Fork 1
160 lines (142 loc) · 5.06 KB
/
ci.yml
File metadata and controls
160 lines (142 loc) · 5.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
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