You've already forked AstralRinth
forked from didirus/AstralRinth
Use Nightly + Cranelift for dev, only fail on warnings in CI (#4388)
* Switch to nightly + cranelift * Fail on warnings only in CI * Fix check errors * Don't use mold on Linux to fix CI * Pin nightly toolchain and add default rustup components * Fix another CI thing * PR comment
This commit is contained in:
@@ -1,9 +1,16 @@
|
||||
# Windows has stack overflows when calling from Tauri, so we increase the default stack size used by the compiler
|
||||
[target.'cfg(windows)']
|
||||
rustflags = ["-C", "link-args=/STACK:16777220", "--cfg", "tokio_unstable"]
|
||||
# Enable Cranelift for debug builds, improving iterative compile times
|
||||
[unstable]
|
||||
codegen-backend = true
|
||||
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
linker = "rust-lld"
|
||||
[profile.dev]
|
||||
codegen-backend = "cranelift"
|
||||
|
||||
[build]
|
||||
rustflags = ["--cfg", "tokio_unstable"]
|
||||
|
||||
# Windows has stack overflows when calling from Tauri, so we increase the default stack size used by the compiler
|
||||
[target.'cfg(windows)']
|
||||
rustflags = ["--cfg", "tokio_unstable", "-C", "link-args=/STACK:16777220"]
|
||||
|
||||
[target.x86_64-pc-windows-msvc]
|
||||
linker = "rust-lld"
|
||||
|
||||
5
.github/workflows/turbo-ci.yml
vendored
5
.github/workflows/turbo-ci.yml
vendored
@@ -18,6 +18,11 @@ jobs:
|
||||
FORCE_COLOR: 3
|
||||
# Make cargo nextest successfully ignore projects without tests
|
||||
NEXTEST_NO_TESTS: pass
|
||||
# Fail on warnings in CI
|
||||
# (but don't do this in the root `Cargo.toml`,
|
||||
# since we don't want warnings to become errors
|
||||
# while developing)
|
||||
RUSTFLAGS: -Dwarnings
|
||||
|
||||
steps:
|
||||
- name: 📥 Check out code
|
||||
|
||||
@@ -218,10 +218,6 @@ todo = "warn"
|
||||
unnested_or_patterns = "warn"
|
||||
wildcard_dependencies = "warn"
|
||||
|
||||
[workspace.lints.rust]
|
||||
# Turn warnings into errors by default
|
||||
warnings = "deny"
|
||||
|
||||
[patch.crates-io]
|
||||
wry = { git = "https://github.com/modrinth/wry", rev = "f2ce0b0" }
|
||||
|
||||
|
||||
@@ -1010,7 +1010,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_version_sorting() {
|
||||
let versions = vec![
|
||||
let versions = [
|
||||
get_version(4, None, months_ago(6)),
|
||||
get_version(3, None, months_ago(7)),
|
||||
get_version(2, Some(1), months_ago(6)),
|
||||
|
||||
@@ -73,12 +73,6 @@ pub struct InitialVersionData {
|
||||
pub ordering: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
struct InitialFileData {
|
||||
#[serde(default = "HashMap::new")]
|
||||
pub file_types: HashMap<String, Option<FileType>>,
|
||||
}
|
||||
|
||||
// under `/api/v1/version`
|
||||
#[post("version")]
|
||||
pub async fn version_create(
|
||||
|
||||
@@ -519,11 +519,14 @@ impl CacheValue {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, PartialEq, Eq, Debug, Copy, Clone)]
|
||||
#[derive(
|
||||
Deserialize, Serialize, PartialEq, Eq, Debug, Copy, Clone, Default,
|
||||
)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum CacheBehaviour {
|
||||
/// Serve expired data. If fetch fails / launcher is offline, errors are ignored
|
||||
/// and expired data is served
|
||||
#[default]
|
||||
StaleWhileRevalidateSkipOffline,
|
||||
// Serve expired data, revalidate in background
|
||||
StaleWhileRevalidate,
|
||||
@@ -533,12 +536,6 @@ pub enum CacheBehaviour {
|
||||
Bypass,
|
||||
}
|
||||
|
||||
impl Default for CacheBehaviour {
|
||||
fn default() -> Self {
|
||||
Self::StaleWhileRevalidateSkipOffline
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct CachedEntry {
|
||||
id: String,
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
[toolchain]
|
||||
channel = "1.89.0"
|
||||
channel = "nightly-2025-09-18"
|
||||
profile = "default"
|
||||
components = [
|
||||
"rust-analyzer",
|
||||
# use cranelift in debug builds to improve compile times
|
||||
# also see `.cargo/config.toml`
|
||||
"rustc-codegen-cranelift-preview"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user