-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (82 loc) · 3.44 KB
/
Copy pathinstallers.yml
File metadata and controls
89 lines (82 loc) · 3.44 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
name: Installers
# Smoke-tests the install scripts on every supported platform.
# Runs ONLY when an install script changes — installing from the latest
# published release validates both the script and the release assets.
on:
push:
# branches: keeps tag pushes from triggering this — GitHub ignores the
# paths filter on tag events, which would otherwise run against a release
# that may not exist yet.
branches: [main]
paths:
- install.sh
- install.ps1
pull_request:
paths:
- install.sh
- install.ps1
workflow_dispatch:
jobs:
install:
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
label: linux-amd64
- os: macos-latest
label: macos-arm64
- os: windows-latest
label: windows-amd64
# Relative path keeps it shell-agnostic (no Windows backslash vs. bash issues).
env:
INSTALL_DIR: qtsurfer-mcp-install
steps:
- uses: actions/checkout@v4
- name: Run install.sh (Linux · macOS)
if: runner.os != 'Windows'
shell: bash
run: bash ./install.sh
- name: Run install.ps1 (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: ./install.ps1
- name: Verify binary starts and MCP stub session works
shell: bash
run: |
BIN="$INSTALL_DIR/qtsurfer-mcp"
[ -f "$BIN.exe" ] && BIN="$BIN.exe"
[ -x "$BIN" ] || { echo "::error::installed binary not found at $BIN"; exit 1; }
echo "== --help =="
"$BIN" --help | tee help.txt
grep -Eq 'qtsurfer-mcp [0-9]+\.[0-9]+\.[0-9]+' help.txt \
|| { echo "::error::version banner missing or shows 'dev'"; exit 1; }
# Exercise the MCP server end-to-end without a backend. This is the
# real check: a native image missing reflection/serialization metadata
# starts fine but crashes here (UnsupportedFeatureError / HTTP 0).
#
# The stdio server answers as messages arrive but never exits on its
# own, so: feed the requests through a pipe kept open by a trailing
# sleep (an immediate EOF makes it close before replying), then kill
# it by name. `timeout` is avoided — macOS runners don't ship it.
echo "== MCP stub session (initialize + tools/list) =="
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"ci","version":"0"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' > session.jsonl
( cat session.jsonl; sleep 6 ) | "$BIN" --stub > mcp.out 2> mcp.err &
sleep 9
if command -v taskkill >/dev/null 2>&1; then
taskkill //F //IM qtsurfer-mcp.exe >/dev/null 2>&1 || true
else
pkill -f qtsurfer-mcp 2>/dev/null || true
fi
cat mcp.out
grep -q '"list_exchanges"' mcp.out \
|| { echo "::error::tools/list did not return the expected tools"; cat mcp.err; exit 1; }
grep -q '"submit_backtest"' mcp.out \
|| { echo "::error::tools/list incomplete"; cat mcp.err; exit 1; }
echo "OK: installer + binary + MCP stub all good on ${{ matrix.label }}"