Skip to content

Commit a496485

Browse files
Merge pull request #37 from mitchmindtree/maintainer_qol
Maintainer quality-of-life improvements (CI, auto-publising, docs for apple-darwin, testing).
2 parents c917e2e + 37a1198 commit a496485

5 files changed

Lines changed: 66 additions & 22 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: coreaudio-sys
2+
on: [push, pull_request]
3+
jobs:
4+
# Run cargo test with default, no and all features.
5+
macos-test:
6+
runs-on: macOS-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: Install llvm and clang
10+
run: brew install llvm
11+
- name: Install stable
12+
uses: actions-rs/toolchain@v1
13+
with:
14+
profile: minimal
15+
toolchain: stable
16+
override: true
17+
- name: cargo test
18+
run: cargo test --verbose
19+
- name: cargo test - no features
20+
run: cargo test --no-default-features --verbose
21+
- name: cargo test - all features
22+
run: cargo test --all-features --verbose
23+
24+
# Build the docs with all features to make sure docs.rs will work.
25+
macos-docs:
26+
runs-on: macOS-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Install llvm and clang
30+
run: brew install llvm
31+
- name: Install stable
32+
uses: actions-rs/toolchain@v1
33+
with:
34+
profile: minimal
35+
toolchain: stable
36+
override: true
37+
- name: cargo doc - all features
38+
run: cargo doc --all-features --verbose
39+
40+
# Publish a new version when pushing to master.
41+
# Will succeed if the version has been updated, otherwise silently fails.
42+
cargo-publish:
43+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
44+
env:
45+
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
46+
runs-on: macOS-latest
47+
steps:
48+
- uses: actions/checkout@v2
49+
- name: Install llvm and clang
50+
run: brew install llvm
51+
- name: Install stable
52+
uses: actions-rs/toolchain@v1
53+
with:
54+
profile: minimal
55+
toolchain: stable
56+
override: true
57+
- name: cargo publish
58+
continue-on-error: true
59+
run: cargo publish --token $CRATESIO_TOKEN

.travis.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ audio_unit = []
2222
core_audio = []
2323
open_al = []
2424
core_midi = []
25+
26+
[package.metadata.docs.rs]
27+
all-features = true
28+
default-target = "x86_64-apple-darwin"
29+
targets = ["x86_64-apple-darwin", "x86_64-apple-ios"]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

33
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.
44

build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ fn build(sdk_path: Option<&str>, target: &str) {
3737
use std::env;
3838
use std::path::PathBuf;
3939

40-
let mut headers = vec![];
40+
let mut headers: Vec<&'static str> = vec![];
4141

4242
#[cfg(feature = "audio_toolbox")]
4343
{

0 commit comments

Comments
 (0)