Skip to content

Commit

Permalink
feat: Fix nightly builds and add to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsantell committed Oct 19, 2023
1 parent 9e5c83b commit f31e4a6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/run_test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,31 +61,43 @@ jobs:

run-linting-linux:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- toolchain: stable
- toolchain: nightly
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: 'Setup Rust'
run: |
curl -sSf https://sh.rustup.rs | sh -s -- -y
rustup component add clippy
rustup component add rustfmt
rustup toolchain install ${{matrix.toolchain}}
rustup +${{matrix.toolchain}} component add clippy
rustup +${{matrix.toolchain}} component add rustfmt
- name: 'Install environment packages'
run: |
sudo apt-get update -qqy
sudo apt-get install jq protobuf-compiler cmake
- name: 'Check Format'
run: cargo fmt --all -- --check
run: cargo +${{matrix.toolchain}} fmt --all -- --check
- name: 'Run Linter'
run: cargo clippy --all -- -D warnings
run: cargo +${{matrix.toolchain}} clippy --all -- -D warnings

run-test-suite-linux:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- toolchain: stable
- toolchain: nightly
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: 'Setup Rust'
run: |
curl -sSf https://sh.rustup.rs | sh -s -- -y
rustup toolchain install ${{matrix.toolchain}}
- name: 'Install environment packages'
run: |
sudo apt-get update -qqy
Expand All @@ -96,7 +108,7 @@ jobs:
ipfs_version: v0.17.0
run_daemon: true
- name: 'Run Rust native target tests'
run: NOOSPHERE_LOG=deafening cargo test --features test-kubo,headers
run: NOOSPHERE_LOG=deafening cargo +${{matrix.toolchain}} test --features test-kubo,headers

run-test-suite-linux-rocksdb:
runs-on: ubuntu-latest
Expand Down
6 changes: 2 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/noosphere-gateway/src/handlers/v0alpha2/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub async fn push_route<C, S>(
stream: BodyStream,
) -> Result<StreamBody<impl Stream<Item = Result<Bytes, std::io::Error>>>, GatewayErrorResponse>
where
C: HasMutableSphereContext<S>,
for<'a> C: HasMutableSphereContext<S> + 'a,
S: Storage + 'static,
{
debug!("Invoking push route...");
Expand Down
2 changes: 1 addition & 1 deletion rust/noosphere/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ features = [
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
safer-ffi = { version = "0.1.2", features = ["proc_macros", "python-headers"] }
safer-ffi = { git = "https://github.com/jsantell/safer_ffi", branch = "fix-190", features = ["proc_macros", "python-headers"] }
tokio = { workspace = true, features = ["full"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rust/noosphere/src/ffi/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// TODO(getditto/safer_ffi#181): Re-enable this lint
#![allow(clippy::incorrect_clone_impl_on_copy_type, non_snake_case)]
#![allow(clippy::non_canonical_clone_impl, non_snake_case)]

//! This module defins a C FFI for Noosphere, suitable for cross-language
//! embedding on many different targets
Expand Down

0 comments on commit f31e4a6

Please sign in to comment.