Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesFoundation committed Aug 28, 2024
1 parent 327c930 commit 00c3cfd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
- run: cargo install --locked cargo-audit
- run: cargo audit

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ffi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
- run: cargo install cbindgen@^0.24
- run: |
cbindgen --config ffi/cbindgen.toml \
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
- run: sudo apt-get install -y cmake nlohmann-json3-dev
- run: |
cmake -S ffi/integration/ \
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
- run: cargo check
# The foundation-ffi crate won't compile for x86_64 targets because it
# requires a nightly Rust compiler for defining a global allocator and
# the exception handler.
#
# So, disable it for now.
- run: cargo check --no-default-features --workspace --exclude foundation-ffi
- run: cargo check --no-default-features --workspace --exclude foundation-ffi --exclude stratum-v1
- run: cargo check --all-features

is-the-code-formatted:
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
components: rustfmt
- run: cargo fmt --all -- --check

Expand All @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
components: clippy
- run: cargo clippy

Expand All @@ -60,7 +60,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.74
toolchain: 1.75
- run: cargo test
- run: cargo test --no-default-features --workspace --exclude foundation-ffi
- run: cargo test --all-features
9 changes: 6 additions & 3 deletions stratum-v1/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl<C: Read + ReadReady + Write, const RX_BUF_SIZE: usize, const TX_BUF_SIZE: u
"Received Message [{}..{}], free pos: {}",
start, stop, self.rx_free_pos
);
trace!("{}", line);
trace!("{:x?}", line);
if let Some(id) = response::parse_id(line)? {
// it's a Response
match self.reqs.get(&id) {
Expand Down Expand Up @@ -200,7 +200,10 @@ impl<C: Read + ReadReady + Write, const RX_BUF_SIZE: usize, const TX_BUF_SIZE: u
.await
.map_err(|_| Error::NetworkError)?;
debug!("read {} bytes @{}", n, self.rx_free_pos);
trace!("{}", &self.rx_buf[self.rx_free_pos..self.rx_free_pos + n]);
trace!(
"{:x?}",
&self.rx_buf[self.rx_free_pos..self.rx_free_pos + n]
);
self.rx_free_pos += n;
}
Ok(msg)
Expand All @@ -216,7 +219,7 @@ impl<C: Read + ReadReady + Write, const RX_BUF_SIZE: usize, const TX_BUF_SIZE: u

async fn send_req(&mut self, req_len: usize) -> Result<()> {
self.tx_buf[req_len] = 0x0a;
trace!("{}", &self.tx_buf[..req_len + 1]);
trace!("{:x?}", &self.tx_buf[..req_len + 1]);
self.network_conn
.write_all(&self.tx_buf[..req_len + 1])
.await
Expand Down

0 comments on commit 00c3cfd

Please sign in to comment.