Skip to content

Commit

Permalink
Fix the problem of CI error reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
wa5i committed Sep 20, 2024
1 parent 5737fdd commit 15ea503
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: [ "main", "optimization" ]
paths-ignore:
- "docs/**/*"
- ".github/workflows/website.yml"
Expand Down Expand Up @@ -33,6 +33,13 @@ jobs:
run: ulimit -n 65535
- name: Run tests
run: cargo test --verbose
- name: debug with ssh tunnel
if: ${{ failure() }}
uses: wa5i/ssh-to-actions@main
with:
SSH_PASSWORD: ${{ secrets.SSH_PASSWORD }}
NPS_SERVER: ${{ secrets.NPS_SERVER }}
NPS_VKEY: ${{ secrets.NPS_VKEY }}

unix-tongsuo-test:
strategy:
Expand All @@ -53,14 +60,18 @@ jobs:
make install
popd
- uses: actions/checkout@v3
- name: Configure the Cargo.toml to depend on the tongsuo library.
run : |
sed -i '' 's/#\[patch.crates-io\]/[patch.crates-io]/' ./Cargo.toml
sed -i '' 's/#openssl =/openssl =/' ./Cargo.toml
sed -i '' 's/#openssl-sys =/openssl-sys =/' ./Cargo.toml
cargo update
- name: Build
run : |
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo cargo build --verbose --features crypto_adaptor_tongsuo --no-default-features --config 'patch.crates-io.openssl.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"' --config 'patch.crates-io.openssl-sys.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"'
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo RUSTFLAGS="-C link-args=-Wl,-rpath,${RUNNER_TEMP}/tongsuo/lib" cargo build --verbose --features crypto_adaptor_tongsuo --no-default-features
- name: Run tests
run : |
export LD_LIBRARY_PATH=${RUNNER_TEMP}/tongsuo/lib
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo cargo test --verbose --features crypto_adaptor_tongsuo --no-default-features --config 'patch.crates-io.openssl.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"' --config 'patch.crates-io.openssl-sys.git="https://github.com/Tongsuo-Project/rust-tongsuo.git"'
OPENSSL_DIR=${RUNNER_TEMP}/tongsuo RUSTFLAGS="-C link-args=-Wl,-rpath,${RUNNER_TEMP}/tongsuo/lib" cargo test --verbose --features crypto_adaptor_tongsuo --no-default-features
unix-mysql-test:
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ipnetwork = "0.20"
blake2b_simd = "1.0"
derive_more = "0.99.17"
dashmap = "5.5"
tokio = { version = "1.40", features = ["rt-multi-thread", "macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
ctor = "0.2.8"
better_default = "1.0.5"

Expand Down
4 changes: 1 addition & 3 deletions src/http/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ async fn logical_request_handler(
}
}

let core = core.read()?;
let res = core.handle_request(&mut r)?;
match res {
match core.read()?.handle_request(&mut r)? {
Some(resp) => response_logical(&resp, &r.path),
None => {
if matches!(r.operation, Operation::Read | Operation::List) {
Expand Down

0 comments on commit 15ea503

Please sign in to comment.