Skip to content

Commit 49a6a9f

Browse files
phymberthodlen
authored andcommitted
server: disable debug release type sanitizer, simplify trigger (ggml-org#6047)
- increase time out for server - do not fail fast
1 parent 19c6f26 commit 49a6a9f

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

.github/workflows/server.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ jobs:
2525
strategy:
2626
matrix:
2727
sanitizer: [ADDRESS, THREAD, UNDEFINED]
28-
build_type: [Debug, Release]
28+
build_type: [Debug]
2929
include:
3030
- build_type: Release
3131
sanitizer: ""
32-
exclude:
33-
- build_type: Release
34-
sanitizer: ADDRESS
35-
- build_type: Release
32+
- build_type: Debug
3633
sanitizer: THREAD
37-
- build_type: Release
38-
sanitizer: UNDEFINED
34+
disabled_on_pr: true
35+
fail-fast: false # While -DLLAMA_SANITIZE_THREAD=ON is broken
3936

4037
container:
4138
image: ubuntu:latest
@@ -81,13 +78,14 @@ jobs:
8178
8279
- name: Tests
8380
id: server_integration_tests
81+
if: ${{ !matrix.disabled_on_pr || !github.event.pull_request }}
8482
run: |
8583
cd examples/server/tests
8684
PORT=8888 ./tests.sh
8785
8886
- name: Slow tests
8987
id: server_integration_tests_slow
90-
if: ${{ github.event.schedule != '' && matrix.build_type == 'Release' || github.event.inputs.slow_tests == 'true' }}
88+
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
9189
run: |
9290
cd examples/server/tests
9391
PORT=8888 ./tests.sh --stop --no-skipped --no-capture --tags slow
@@ -124,13 +122,14 @@ jobs:
124122
125123
- name: Tests
126124
id: server_integration_tests
125+
if: ${{ !matrix.disabled_on_pr || !github.event.pull_request }}
127126
run: |
128127
cd examples/server/tests
129128
behave.exe --summary --stop --no-capture --exclude 'issues|wrong_usages|passkey' --tags llama.cpp
130129
131130
- name: Slow tests
132131
id: server_integration_tests_slow
133-
if: ${{ github.event.schedule != '' || github.event.inputs.slow_tests == 'true' }}
132+
if: ${{ (github.event.schedule || github.event.inputs.slow_tests == 'true') && matrix.build_type == 'Release' }}
134133
run: |
135134
cd examples/server/tests
136135
behave.exe --stop --no-skipped --no-capture --tags slow

examples/server/tests/features/steps/steps.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,18 @@ def step_server_metrics(context):
119119
def step_start_server(context):
120120
start_server_background(context)
121121
attempts = 0
122+
max_attempts = 20
123+
if 'GITHUB_ACTIONS' in os.environ:
124+
max_attempts *= 2
125+
122126
while True:
123127
with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
124128
result = sock.connect_ex((context.server_fqdn, context.server_port))
125129
if result == 0:
126130
print("\x1b[33;46mserver started!\x1b[0m")
127131
return
128132
attempts += 1
129-
if attempts > 20:
133+
if attempts > max_attempts:
130134
assert False, "server not started"
131135
print(f"waiting for server to start, connect error code = {result}...")
132136
time.sleep(0.1)
@@ -943,6 +947,9 @@ async def wait_for_health_status(context,
943947
print(f"Starting checking for health for expected_health_status={expected_health_status}\n")
944948
interval = 0.5
945949
counter = 0
950+
if 'GITHUB_ACTIONS' in os.environ:
951+
timeout *= 2
952+
946953
async with aiohttp.ClientSession() as session:
947954
while True:
948955
async with await session.get(f'{base_url}/health', params=params) as health_response:

0 commit comments

Comments
 (0)