Skip to content
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.

feat: Fix nightly builds and add to CI. #690

Merged
merged 1 commit into from
Nov 6, 2023
Merged
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
22 changes: 17 additions & 5 deletions .github/workflows/run_test_suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,45 @@ 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-rust-test-suite:
name: 'Run Rust test suite'
strategy:
matrix:
features: ['test-kubo,headers', 'test-kubo,headers,rocksdb']
platform: ['ubuntu-latest', 'windows-latest', 'macos-13']
toolchain: ['stable']
toolchain: ['stable', 'nightly']
exclude:
- platform: 'windows-latest'
features: 'test-kubo,headers,rocksdb'
- platform: 'macos-13'
toolchain: 'nightly'
- platform: 'windows-latest'
toolchain: 'nightly'
- features: 'test-kubo,headers,rocksdb'
toolchain: 'nightly'
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 4 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
4 changes: 1 addition & 3 deletions rust/noosphere-ns/src/bin/orb-ns/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ mod utils;

#[cfg(not(target_arch = "wasm32"))]
mod inner {
pub use crate::cli;
pub use anyhow::{anyhow, Result};
pub use noosphere::key::{InsecureKeyStorage, KeyStorage};
pub use noosphere::key::InsecureKeyStorage;
pub use noosphere_core::tracing::initialize_tracing;
pub use tokio;
pub use tracing::*;
}

#[cfg(not(target_arch = "wasm32"))]
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 = { version = "0.1.4", features = ["proc_macros", "python-headers"] }
tokio = { workspace = true, features = ["full"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
Expand Down
2 changes: 2 additions & 0 deletions rust/noosphere/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use cfg_aliases::cfg_aliases;

fn main() {
println!("cargo:rerun-if-changed=build.rs");

cfg_aliases! {
// Platforms
wasm: { target_arch = "wasm32" },
Expand Down
5 changes: 1 addition & 4 deletions rust/noosphere/src/ffi/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// TODO(getditto/safer_ffi#181): Re-enable this lint
#![allow(clippy::incorrect_clone_impl_on_copy_type, non_snake_case)]

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