Skip to content

Commit

Permalink
Merge pull request #8 from AlexKnauth/github-workflows
Browse files Browse the repository at this point in the history
Simplify github workflows
  • Loading branch information
AlexKnauth authored Apr 27, 2024
2 parents 1986544 + 6831d21 commit e5bcf9c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -116,6 +117,7 @@ jobs:
os: macOS-latest
features: auto-splitting
cross: skip
install_target: true

steps:
- name: Checkout Commit
Expand All @@ -124,7 +126,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 != ''
Expand Down Expand Up @@ -157,20 +159,20 @@ 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 }}
TARGET: ${{ matrix.target }}
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-*.*
Expand Down
1 change: 1 addition & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<()> {
Expand Down
1 change: 1 addition & 0 deletions src/timer_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ impl<T: Widget<MainState>> Widget<MainState> for WithMenu<T> {
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(),
);
Expand Down

0 comments on commit e5bcf9c

Please sign in to comment.