From 22357b0cba5537d7bb37cc3aab1086f76c0cf198 Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Sat, 27 Apr 2024 18:56:32 -0400 Subject: [PATCH 1/3] Simplify github workflows --- .github/workflows/rust.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a2ba156..d539713 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -124,7 +124,7 @@ jobs: - name: Install Rust uses: hecrj/setup-rust-action@v2 with: - rust-version: ${{ matrix.toolchain || 'stable' }} + rust-version: 'stable' - name: Install Target if: matrix.install_target != '' @@ -157,12 +157,12 @@ jobs: env: TARGET: ${{ matrix.target }} SKIP_CROSS: ${{ matrix.cross }} - IS_DEPLOY: ${{ startsWith(github.ref, 'refs/tags/') && (matrix.release_anyway != '' || !(startsWith(matrix.toolchain, 'nightly') || startsWith(matrix.toolchain, 'beta'))) }} + IS_DEPLOY: ${{ startsWith(github.ref, 'refs/tags/') }} FEATURES: ${{ matrix.features }} RUSTFLAGS: ${{ matrix.rust_flags }} - name: Prepare Release - if: startsWith(github.ref, 'refs/tags/') && matrix.release == '' + if: startsWith(github.ref, 'refs/tags/') run: bash .github/workflows/before_deploy.sh env: OS_NAME: ${{ matrix.os }} @@ -170,7 +170,7 @@ jobs: RELEASE_TARGET: ${{ matrix.target_rename || matrix.target }} - name: Release - if: startsWith(github.ref, 'refs/tags/') && matrix.release == '' + if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v2 with: files: livesplit-one-*.* From eedb9a8bd2e70765ef1164599bc1d0f1ed130b64 Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Sat, 27 Apr 2024 19:11:01 -0400 Subject: [PATCH 2/3] install_target: true --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d539713..029c532 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -108,6 +108,7 @@ jobs: os: macOS-latest features: auto-splitting cross: skip + install_target: true - label: macOS x86_64-v3 target: x86_64-apple-darwin @@ -116,6 +117,7 @@ jobs: os: macOS-latest features: auto-splitting cross: skip + install_target: true steps: - name: Checkout Commit From 6831d217f4ecc548d9272b2cfd42128ec7a44aab Mon Sep 17 00:00:00 2001 From: Alex Knauth Date: Sat, 27 Apr 2024 19:22:08 -0400 Subject: [PATCH 3/3] cfg feature auto-splitting --- src/config.rs | 1 + src/timer_form.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/config.rs b/src/config.rs index 90e22d0..6eaca1b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -251,6 +251,7 @@ impl Config { &mut self, shared_timer: &SharedTimer, layout_data: &mut LayoutData, + #[cfg(feature = "auto-splitting")] auto_splitter: &livesplit_core::auto_splitting::Runtime, path: PathBuf, ) -> Result<()> { diff --git a/src/timer_form.rs b/src/timer_form.rs index 3767d0d..b038d9b 100644 --- a/src/timer_form.rs +++ b/src/timer_form.rs @@ -351,6 +351,7 @@ impl> Widget for WithMenu { let result = data.config.borrow_mut().open_splits( &data.timer, &mut data.layout_data.borrow_mut(), + #[cfg(feature = "auto-splitting")] &data.auto_splitter, file_info.path().to_path_buf(), );