diff --git a/.github/workflows/coreaudio-sys.yml b/.github/workflows/coreaudio-sys.yml new file mode 100644 index 0000000..aecdee2 --- /dev/null +++ b/.github/workflows/coreaudio-sys.yml @@ -0,0 +1,59 @@ +name: coreaudio-sys +on: [push, pull_request] +jobs: + # Run cargo test with default, no and all features. + macos-test: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - name: Install llvm and clang + run: brew install llvm + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: cargo test + run: cargo test --verbose + - name: cargo test - no features + run: cargo test --no-default-features --verbose + - name: cargo test - all features + run: cargo test --all-features --verbose + + # Build the docs with all features to make sure docs.rs will work. + macos-docs: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - name: Install llvm and clang + run: brew install llvm + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: cargo doc - all features + run: cargo doc --all-features --verbose + + # Publish a new version when pushing to master. + # Will succeed if the version has been updated, otherwise silently fails. + cargo-publish: + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + env: + CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }} + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - name: Install llvm and clang + run: brew install llvm + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - name: cargo publish + continue-on-error: true + run: cargo publish --token $CRATESIO_TOKEN diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c48317b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: rust -rust: -- stable -- beta -- nightly -notifications: - email: - - mitchell.nordine@gmail.com -os: -- osx -- linux -before_script: -- rustc --version -- cargo --version -- rustup component add rustfmt -- if [ "$TRAVIS_OS_NAME" = linux ]; then rustup target add x86_64-apple-darwin; fi -script: -- if [ "$TRAVIS_OS_NAME" = linux ]; then curl -sL https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.13.sdk.tar.xz | tar -Jxf -; export COREAUDIO_SDK_PATH="$PWD/MacOSX10.13.sdk"; fi -- cargo build --verbose --target=x86_64-apple-darwin -- if [ "$TRAVIS_OS_NAME" = osx ]; then cargo test --verbose; fi diff --git a/Cargo.toml b/Cargo.toml index 053bfd0..56d86da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,8 @@ audio_unit = [] core_audio = [] open_al = [] core_midi = [] + +[package.metadata.docs.rs] +all-features = true +default-target = "x86_64-apple-darwin" +targets = ["x86_64-apple-darwin", "x86_64-apple-ios"] diff --git a/README.md b/README.md index 2b6557c..060543d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# coreaudio-sys [![Build Status](https://travis-ci.org/RustAudio/coreaudio-sys.svg?branch=master)](https://travis-ci.org/RustAudio/coreaudio-sys) [![Crates.io](https://img.shields.io/crates/v/coreaudio-sys.svg)](https://crates.io/crates/coreaudio-sys) [![Crates.io](https://img.shields.io/crates/l/coreaudio-sys.svg)](https://github.com/RustAudio/coreaudio-sys/blob/master/LICENSE) +# coreaudio-sys [![Actions Status](https://github.com/rustaudio/coreaudio-sys/workflows/coreaudio-sys/badge.svg)](https://github.com/rustaudio/coreaudio-sys/actions) [![Crates.io](https://img.shields.io/crates/v/coreaudio-sys.svg)](https://crates.io/crates/coreaudio-sys) [![Crates.io](https://img.shields.io/crates/l/coreaudio-sys.svg)](https://github.com/RustAudio/coreaudio-sys/blob/master/LICENSE) Raw bindings to Apple's Core Audio API for macos and iOS generated using [rust-bindgen](https://github.com/rust-lang-nursery/rust-bindgen). [coreaudio-rs](https://github.com/RustAudio/coreaudio-rs) is an attempt at offering a higher level API around this crate. diff --git a/build.rs b/build.rs index fc328f1..3a7a80e 100644 --- a/build.rs +++ b/build.rs @@ -37,7 +37,7 @@ fn build(sdk_path: Option<&str>, target: &str) { use std::env; use std::path::PathBuf; - let mut headers = vec![]; + let mut headers: Vec<&'static str> = vec![]; #[cfg(feature = "audio_toolbox")] {