From 50daa6cf36c381db47bfcf0d5db9e9db76f20691 Mon Sep 17 00:00:00 2001 From: Connor Slade Date: Sat, 25 Nov 2023 21:03:42 -0500 Subject: [PATCH] CI Install deps --- .github/workflows/rust.yml | 4 +++- src/args.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ceee58f..fc3621c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v2 - + - name: Install Dependencies + if: runner.os == 'Linux' + run: sudo apt install libasound2-dev libx11-dev libxi-dev xorg-dev - name: Build run: cargo build diff --git a/src/args.rs b/src/args.rs index 5872e58..53084e9 100644 --- a/src/args.rs +++ b/src/args.rs @@ -2,6 +2,8 @@ use std::{path::PathBuf, process}; use anyhow::{Context, Result}; use clap::Parser; +#[cfg(target_os = "linux")] +use midir::os::unix::VirtualOutput; use midir::{MidiOutput, MidiOutputConnection}; #[derive(Parser)] @@ -66,7 +68,7 @@ impl Midi { } }; println!("Connecting to port {}", input.port_name(&port)?); - input.connect(&port, "makey-midi output")? + input.connect(&port, "makey-midi output").unwrap() } Midi::List => { let input = MidiOutput::new("42synth input")?;