diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e164fe0..f99fef5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.74.0 + toolchain: stable - name: cargo build run: cargo build --release --features ${{ matrix.feature }} - name: Create release directory @@ -66,7 +66,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.74.0 + toolchain: stable - name: Install cargo bundle run: cargo install cargo-bundle - name: cargo build @@ -92,7 +92,7 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable with: - toolchain: 1.74.0 + toolchain: stable - name: cargo build run: cargo build --release - name: Download butler diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2277dad..f094927 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -2,6 +2,8 @@ name: test on: push: + branches-ignore: + - main paths-ignore: - "doc/**" - ".vscode/**" diff --git a/.github/workflows/test_build.yaml b/.github/workflows/test_build.yaml new file mode 100644 index 0000000..56ce934 --- /dev/null +++ b/.github/workflows/test_build.yaml @@ -0,0 +1,70 @@ +name: Build and run + +on: + push: + branches-ignore: + - main + paths-ignore: + - "doc/**" + - ".vscode/**" + - "html/**" + - "data/**" + - "promo/**" + - "py/**" + - "**.md" +jobs: + ubuntu: + strategy: + matrix: + include: + - os: ubuntu-20.04 + version: 20 + feature: speech_dispatcher_0_9 + - os: ubuntu-22.04 + version: 22 + feature: speech_dispatcher_0_11 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: apt update + run: sudo apt-get update + - name: install + run: sudo apt install clang libspeechd-dev pkg-config libssl-dev alsa librust-alsa-sys-dev + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Run and quit + run: cargo run --release --features ${{ matrix.feature }} -- -q + macos: + strategy: + matrix: + include: + - os: macos-11 + version: 11 + - os: macos-12 + version: 12 + - os: macos-13 + version: 13 + - os: macos-14 + version: 14 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Run and quit + run: cargo run --release -- -q + windows: + name: Windows + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - name: Run and quit + run: cargo run --release -- -q diff --git a/Cargo.lock b/Cargo.lock index 90ae694..c4d6a9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -105,7 +105,7 @@ dependencies = [ [[package]] name = "audio" -version = "0.2.3" +version = "0.2.4" dependencies = [ "chrono", "common", @@ -238,7 +238,7 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cacophony" -version = "0.2.3" +version = "0.2.4" dependencies = [ "audio", "clap", @@ -396,7 +396,7 @@ dependencies = [ [[package]] name = "common" -version = "0.2.3" +version = "0.2.4" dependencies = [ "clap", "directories", @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "input" -version = "0.2.3" +version = "0.2.4" dependencies = [ "clap", "common", @@ -1034,7 +1034,7 @@ dependencies = [ [[package]] name = "io" -version = "0.2.3" +version = "0.2.4" dependencies = [ "audio", "common", @@ -1880,7 +1880,7 @@ checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" [[package]] name = "render" -version = "0.2.3" +version = "0.2.4" dependencies = [ "audio", "colorgrad", @@ -2211,7 +2211,7 @@ dependencies = [ [[package]] name = "text" -version = "0.2.3" +version = "0.2.4" dependencies = [ "common", "csv", diff --git a/Cargo.toml b/Cargo.toml index 4fde32e..c3dbab4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ members = ["audio", "common", "input", "io", "render", "text"] [workspace.package] -version = "0.2.3" +version = "0.2.4" authors = ["Esther Alter "] description = "A minimalist and ergonomic MIDI sequencer" documentation = "https://github.com/subalterngames/cacophony" @@ -86,7 +86,7 @@ speech_dispatcher_0_9 = ["text/speech_dispatcher_0_9"] [package] name = "cacophony" -version = "0.2.3" +version = "0.2.4" authors = ["Esther Alter "] description = "A minimalist and ergonomic MIDI sequencer" documentation = "https://github.com/subalterngames/cacophony" @@ -122,7 +122,7 @@ path = "text" name = "Cacophony" identifier = "com.subalterngames.cacophony" icon = ["icon/32.png", "icon/64.png", "icon/128.png", "icon/256.png"] -version = "0.2.3" +version = "0.2.4" resources = ["data/*"] copyright = "Copyright (c) Subaltern Games LLC 2023. All rights reserved." short_description = "A minimalist and ergonomic MIDI sequencer." diff --git a/common/src/args.rs b/common/src/args.rs index cab3000..e4757c4 100644 --- a/common/src/args.rs +++ b/common/src/args.rs @@ -3,7 +3,7 @@ use clap::Parser; use std::path::PathBuf; /// Command-line arguments. -#[derive(Parser)] +#[derive(Parser, Debug)] #[command(author, version, about)] pub struct Args { /// Open the project from disk. @@ -26,4 +26,7 @@ pub struct Args { /// This is meant to be used for debugging. #[arg(short, long)] pub events: Option, + /// If included, immediately quit. This is useful for debugging. + #[arg(short, long)] + pub quit: bool } diff --git a/data/text.csv b/data/text.csv index a7a84f8..eef306b 100644 --- a/data/text.csv +++ b/data/text.csv @@ -360,9 +360,9 @@ PIANO_ROLL_PANEL_INPUT_TTS_TIME_7,\0 to set the playback time to the cursor. PIANO_ROLL_PANEL_INPUT_TTS_VIEW_SINGLE_TRACK_0,"\0, \1, \2, and \3 to move the view." PIANO_ROLL_PANEL_INPUT_TTS_VIEW_SINGLE_TRACK_1,\0 and \1 to set the view to the start and end. PIANO_ROLL_PANEL_INPUT_TTS_VIEW_SINGLE_TRACk_2,\0 and \1 to zoom in and out. -PIANO_ROLL_PANEL_INPUT_TTS_VIEW_SINGLE_TRACK_3,\0 to reset the zoom level." +PIANO_ROLL_PANEL_INPUT_TTS_VIEW_SINGLE_TRACK_3,\0 to reset the zoom level. PIANO_ROLL_PANEL_INPUT_TTS_VIEW_MULTI_TRACK_0,\0 and \1 to move the view. -PIANO_ROLL_PANEL_INPUT_TTS_VIEW_MULTI_TRACK_1,\0 and \1 to set the view to the start and end." +PIANO_ROLL_PANEL_INPUT_TTS_VIEW_MULTI_TRACK_1,\0 and \1 to set the view to the start and end. PIANO_ROLL_MODE_TIME,Time PIANO_ROLL_MODE_VIEW,View PIANO_ROLL_MODE_SELECT,Select diff --git a/src/main.rs b/src/main.rs index aa0be3b..80c5715 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,6 +22,11 @@ async fn main() { // Parse and load the command line arguments. let args = Args::parse(); + // Immediately quit. + if args.quit { + return; + } + // Get the paths, initialized in loading the window configuration. let paths = Paths::get();