Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Rust native app

# Pull request checks for rust/: format, lint, tests, the headless
# self-check and a windowed smoke test, all on the debug build so each job
# compiles wxWidgets once. Release builds and packaging live in
# rust-build.yml.
# compiles wxWidgets once. Pushes to dev run the same checks and seed the
# debug caches that pull requests restore. Release builds and packaging live
# in rust-build.yml.

on:
pull_request:
paths: ["rust/**", ".github/workflows/rust.yml"]
push:
branches: [dev]
paths: ["rust/**", ".github/workflows/rust.yml"]
tags: ["v*"]
workflow_dispatch:

Expand Down Expand Up @@ -39,8 +42,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
# The CHANGELOG gate compares against the base branch.
fetch-depth: ${{ matrix.os == 'ubuntu-latest' && 0 || 1 }}
# The CHANGELOG gate compares against the base branch. Quoted: a bare 0
# is falsy in expressions, so `&& 0 || 1` always picked 1.
fetch-depth: ${{ matrix.os == 'ubuntu-latest' && '0' || '1' }}
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
Expand All @@ -49,6 +53,9 @@ jobs:
workspaces: rust
shared-key: debug-${{ runner.os }}
cache-on-failure: false
# Only dev saves, so pull requests restore its cache instead of
# uploading their own.
save-if: ${{ github.ref == 'refs/heads/dev' }}

- name: Linux build dependencies
if: runner.os == 'Linux'
Expand Down
2 changes: 1 addition & 1 deletion rust/crates/aw-ai/src/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ mod tests {
steps.push(Step::Send(sse_chunk(None, None, Some(usage))));
steps.push(Step::Send(b"data: [DONE]\n\n".to_vec()));
let server = TestServer::start(vec![Reply::sse(steps)]);
let result = stream(&server, limits(0.5, 0.5, 10.0)).unwrap();
let result = stream(&server, limits(0.5, 1.0, 10.0)).unwrap();
assert_eq!(
result,
ChatStream {
Expand Down
Loading