Skip to content

Commit

Permalink
Add sine integration test (#110)
Browse files Browse the repository at this point in the history
* Move to llvm action rather than homebrew line
* Run sine example in ci
* Bump version to 0.12.0.
  • Loading branch information
simlay authored Apr 12, 2024
1 parent 23c9754 commit b671130
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/coreaudio-rs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ on: [push, pull_request]
jobs:
# Run cargo test with default, no and all features.
macos-test:
runs-on: macOS-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Install llvm and clang
run: brew install llvm
- name: Install stable
uses: actions-rs/toolchain@v1
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "15.0"
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- name: cargo test
run: cargo test --verbose
- name: Run sign example
run: cargo run --example sine
# TODO: These don't work as of 2020-12-06, but they should.
# - name: cargo test - no features
# run: cargo test --no-default-features --verbose
Expand All @@ -34,14 +38,13 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Install llvm and clang
run: brew install llvm
- name: Install stable
uses: actions-rs/toolchain@v1
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "15.0"
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- name: Add iOS targets
run: rustup target add aarch64-apple-ios x86_64-apple-ios
- name: Install cargo lipo
Expand All @@ -54,14 +57,13 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Install llvm and clang
run: brew install llvm
- name: Install stable
uses: actions-rs/toolchain@v1
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "15.0"
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- name: cargo doc - all features
run: cargo doc --all-features --verbose

Expand All @@ -74,14 +76,13 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v4
- name: Install llvm and clang
run: brew install llvm
- name: Install stable
uses: actions-rs/toolchain@v1
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "15.0"
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
- name: cargo publish
continue-on-error: true
run: cargo publish --token $CRATESIO_TOKEN
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "coreaudio-rs"
version = "0.11.3"
version = "0.12.0"
authors = ["mitchmindtree <[email protected]>", "yupferris <[email protected]>"]
description = "A friendly rust interface for Apple's CoreAudio API."
keywords = ["core", "audio", "unit", "osx", "ios"]
Expand Down
2 changes: 1 addition & 1 deletion examples/sine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn main() -> Result<(), coreaudio::Error> {
// Read the input format. This is counterintuitive, but it's the format used when sending
// audio data to the AudioUnit representing the output device. This is separate from the
// format the AudioUnit later uses to send the data to the hardware device.
let stream_format = audio_unit.input_stream_format()?;
let stream_format = audio_unit.output_stream_format()?;
println!("{:#?}", &stream_format);

// For this example, our sine wave expects `f32` data.
Expand Down

0 comments on commit b671130

Please sign in to comment.