diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9c11249..c6391d6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ env: CARGO_TERM_COLOR: always CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse # Keep in sync with version in `rust-toolchain.toml` and `xtask/src/ci.rs` - NIGHTLY: nightly-2023-07-03 + NIGHTLY: nightly-2023-11-08 on: push: diff --git a/crates/ruma-client-api/build.rs b/crates/ruma-client-api/build.rs new file mode 100644 index 00000000..a83086e1 --- /dev/null +++ b/crates/ruma-client-api/build.rs @@ -0,0 +1,6 @@ +fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); +} diff --git a/crates/ruma-client/build.rs b/crates/ruma-client/build.rs index 755adb3a..0e176c4c 100644 --- a/crates/ruma-client/build.rs +++ b/crates/ruma-client/build.rs @@ -1,6 +1,11 @@ use std::{env, process}; fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); + let tls_features = [ ("tls-native", env::var_os("CARGO_FEATURE_TLS_NATIVE").is_some()), ("tls-rustls-native-roots", env::var_os("CARGO_FEATURE_TLS_RUSTLS_NATIVE_ROOTS").is_some()), diff --git a/crates/ruma-common/build.rs b/crates/ruma-common/build.rs new file mode 100644 index 00000000..a83086e1 --- /dev/null +++ b/crates/ruma-common/build.rs @@ -0,0 +1,6 @@ +fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); +} diff --git a/crates/ruma-federation-api/build.rs b/crates/ruma-federation-api/build.rs new file mode 100644 index 00000000..a83086e1 --- /dev/null +++ b/crates/ruma-federation-api/build.rs @@ -0,0 +1,6 @@ +fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); +} diff --git a/crates/ruma-html/build.rs b/crates/ruma-html/build.rs new file mode 100644 index 00000000..a83086e1 --- /dev/null +++ b/crates/ruma-html/build.rs @@ -0,0 +1,6 @@ +fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); +} diff --git a/crates/ruma/build.rs b/crates/ruma/build.rs new file mode 100644 index 00000000..a83086e1 --- /dev/null +++ b/crates/ruma/build.rs @@ -0,0 +1,6 @@ +fn main() { + // Prevent unnecessary rerunning of this build script + println!("cargo:rerun-if-changed=build.rs"); + // Prevent nightly CI from erroring on docsrs attributes + println!("cargo:rustc-check-cfg=cfg(docsrs)"); +} diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1ba4931b..9ac81209 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] # Keep in sync with version in `xtask/src/ci.rs` and `.github/workflows/ci.yml` -channel = "nightly-2023-07-03" +channel = "nightly-2023-11-08" components = ["rustfmt", "clippy"] diff --git a/xtask/src/ci.rs b/xtask/src/ci.rs index 5ad8c164..ef36c1d8 100644 --- a/xtask/src/ci.rs +++ b/xtask/src/ci.rs @@ -226,7 +226,7 @@ impl CiTask { /// /// Also checks that all features that are used in the code exist. fn nightly_all(&self) -> Result<()> { - cmd!("rustup run {NIGHTLY} cargo check --workspace --all-features -Z unstable-options -Z check-cfg=features") + cmd!("rustup run {NIGHTLY} cargo check --workspace --all-features -Z unstable-options -Z check-cfg") .env("RUSTFLAGS", "-D warnings") .run() .map_err(Into::into) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index 0226bbb5..0d0836e1 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -15,7 +15,7 @@ use serde::Deserialize; use serde_json::from_str as from_json_str; // Keep in sync with version in `rust-toolchain.toml` and `.github/workflows/ci.yml` -const NIGHTLY: &str = "nightly-2023-07-03"; +const NIGHTLY: &str = "nightly-2023-11-08"; #[cfg(feature = "default")] mod cargo;