Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ab35fcf906 | |||
| 32991301dd | |||
| c5fd928dcb |
@@ -25,6 +25,18 @@ jobs:
|
|||||||
id: meta
|
id: meta
|
||||||
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
run: echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
# ── Free disk space ────────────────────────────────────────────────
|
||||||
|
# A 2-ABI release build (arm64 + armv7) generates ~15 GB of target/
|
||||||
|
# output. Remove pre-installed runner tooling that is never used
|
||||||
|
# during an Android build to reclaim ~10 GB before we start.
|
||||||
|
- name: Free disk space
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /usr/local/lib/android # runner pre-installed SDK
|
||||||
|
sudo rm -rf /usr/share/dotnet
|
||||||
|
sudo rm -rf /opt/ghc
|
||||||
|
sudo rm -rf /usr/local/share/boost
|
||||||
|
df -h /
|
||||||
|
|
||||||
# ── System dependencies ────────────────────────────────────────────
|
# ── System dependencies ────────────────────────────────────────────
|
||||||
- name: Install system dependencies
|
- name: Install system dependencies
|
||||||
run: |
|
run: |
|
||||||
@@ -67,8 +79,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
rustup target add \
|
rustup target add \
|
||||||
aarch64-linux-android \
|
aarch64-linux-android \
|
||||||
armv7-linux-androideabi \
|
armv7-linux-androideabi
|
||||||
x86_64-linux-android
|
|
||||||
|
|
||||||
# ── Cargo caches ───────────────────────────────────────────────────
|
# ── Cargo caches ───────────────────────────────────────────────────
|
||||||
- name: Cache Cargo registry
|
- name: Cache Cargo registry
|
||||||
@@ -110,6 +121,10 @@ jobs:
|
|||||||
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
|
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOLS_VERSION }}
|
||||||
PLATFORM: ${{ env.PLATFORM }}
|
PLATFORM: ${{ env.PLATFORM }}
|
||||||
PROFILE: release
|
PROFILE: release
|
||||||
|
# arm64-v8a covers all modern Android phones; armeabi-v7a covers
|
||||||
|
# legacy ARM devices. x86_64 is emulator-only and dropped to
|
||||||
|
# stay within the runner's ~25 GB disk budget.
|
||||||
|
ABIS: arm64-v8a armeabi-v7a
|
||||||
KEYSTORE: /tmp/solitaire-release.jks
|
KEYSTORE: /tmp/solitaire-release.jks
|
||||||
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
|
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }}
|
||||||
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
|
||||||
|
|||||||
@@ -20,4 +20,4 @@ resources:
|
|||||||
images:
|
images:
|
||||||
- name: solitaire-server
|
- name: solitaire-server
|
||||||
newName: git.aleshym.co/funman300/solitaire-server
|
newName: git.aleshym.co/funman300/solitaire-server
|
||||||
newTag: 533bcec2
|
newTag: f6907671
|
||||||
|
|||||||
@@ -143,10 +143,10 @@ pub struct Settings {
|
|||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub window_geometry: Option<WindowGeometry>,
|
pub window_geometry: Option<WindowGeometry>,
|
||||||
/// Identifier of the active card-art theme. Matches `meta.id` from
|
/// Identifier of the active card-art theme. Matches `meta.id` from
|
||||||
/// the theme's `theme.ron` manifest. `"classic"` and `"dark"` are
|
/// the theme's `theme.ron` manifest. `"dark"` and `"classic"` are
|
||||||
/// always present; user-supplied themes register under their own ids.
|
/// always present; user-supplied themes register under their own ids.
|
||||||
/// Older `settings.json` files that stored `"default"` will fall
|
/// Older `settings.json` files that stored `"default"` or `"classic"`
|
||||||
/// back to the dark embedded theme at runtime.
|
/// are migrated to `"dark"` by [`Settings::sanitized`].
|
||||||
#[serde(default = "default_theme_id")]
|
#[serde(default = "default_theme_id")]
|
||||||
pub selected_theme_id: String,
|
pub selected_theme_id: String,
|
||||||
/// Set to `true` once the achievement-onboarding info-toast has been
|
/// Set to `true` once the achievement-onboarding info-toast has been
|
||||||
@@ -272,7 +272,7 @@ fn default_music_volume() -> f32 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn default_theme_id() -> String {
|
fn default_theme_id() -> String {
|
||||||
"classic".to_string()
|
"dark".to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Default tooltip-hover dwell delay in seconds. Mirrors
|
/// Default tooltip-hover dwell delay in seconds. Mirrors
|
||||||
@@ -395,6 +395,13 @@ impl Settings {
|
|||||||
/// their respective ranges after deserialization or hand-editing of
|
/// their respective ranges after deserialization or hand-editing of
|
||||||
/// `settings.json`.
|
/// `settings.json`.
|
||||||
pub fn sanitized(self) -> Self {
|
pub fn sanitized(self) -> Self {
|
||||||
|
// Migrate stale theme IDs: "default" was removed when the theme was
|
||||||
|
// renamed to "dark"; "classic" was briefly the default before "dark"
|
||||||
|
// was restored as the shipped default.
|
||||||
|
let selected_theme_id = match self.selected_theme_id.as_str() {
|
||||||
|
"default" | "classic" => "dark".to_string(),
|
||||||
|
_ => self.selected_theme_id,
|
||||||
|
};
|
||||||
Self {
|
Self {
|
||||||
sfx_volume: self.sfx_volume.clamp(0.0, 1.0),
|
sfx_volume: self.sfx_volume.clamp(0.0, 1.0),
|
||||||
music_volume: self.music_volume.clamp(0.0, 1.0),
|
music_volume: self.music_volume.clamp(0.0, 1.0),
|
||||||
@@ -407,6 +414,7 @@ impl Settings {
|
|||||||
replay_move_interval_secs: self
|
replay_move_interval_secs: self
|
||||||
.replay_move_interval_secs
|
.replay_move_interval_secs
|
||||||
.clamp(REPLAY_MOVE_INTERVAL_MIN_SECS, REPLAY_MOVE_INTERVAL_MAX_SECS),
|
.clamp(REPLAY_MOVE_INTERVAL_MIN_SECS, REPLAY_MOVE_INTERVAL_MAX_SECS),
|
||||||
|
selected_theme_id,
|
||||||
..self
|
..self
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,8 +100,8 @@ fn build_registry_on_startup(mut registry: bevy::ecs::system::ResMut<ThemeRegist
|
|||||||
/// [`user_theme_dir`].
|
/// [`user_theme_dir`].
|
||||||
pub fn build_registry(user_dir: &Path) -> ThemeRegistry {
|
pub fn build_registry(user_dir: &Path) -> ThemeRegistry {
|
||||||
let mut entries = Vec::new();
|
let mut entries = Vec::new();
|
||||||
entries.push(classic_entry());
|
|
||||||
entries.push(dark_entry());
|
entries.push(dark_entry());
|
||||||
|
entries.push(classic_entry());
|
||||||
entries.extend(discover_user_themes(user_dir));
|
entries.extend(discover_user_themes(user_dir));
|
||||||
ThemeRegistry { entries }
|
ThemeRegistry { entries }
|
||||||
}
|
}
|
||||||
@@ -264,8 +264,8 @@ mod tests {
|
|||||||
let tmp = tempfile::tempdir().unwrap();
|
let tmp = tempfile::tempdir().unwrap();
|
||||||
let registry = build_registry(tmp.path());
|
let registry = build_registry(tmp.path());
|
||||||
assert_eq!(registry.len(), BUNDLED_COUNT);
|
assert_eq!(registry.len(), BUNDLED_COUNT);
|
||||||
assert_eq!(registry.entries[0].id, "classic");
|
assert_eq!(registry.entries[0].id, "dark");
|
||||||
assert_eq!(registry.entries[1].id, "dark");
|
assert_eq!(registry.entries[1].id, "classic");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
Reference in New Issue
Block a user