Skip to content

Commit 4fe6e8d

Browse files
Merge pull request #71 from mitchmindtree/ci
CI Improvements - GitHub workflow, make docs.rs default to macos
2 parents 415aefd + 890629b commit 4fe6e8d

File tree

4 files changed

+66
-39
lines changed

4 files changed

+66
-39
lines changed

.github/workflows/coreaudio-rs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: coreaudio-rs
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+
# TODO: These don't work as of 2020-12-06, but they should.
20+
# - name: cargo test - no features
21+
# run: cargo test --no-default-features --verbose
22+
# - name: cargo test - all features
23+
# run: cargo test --all-features --verbose
24+
25+
# Build the docs with all features to make sure docs.rs will work.
26+
macos-docs:
27+
runs-on: macOS-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- name: Install llvm and clang
31+
run: brew install llvm
32+
- name: Install stable
33+
uses: actions-rs/toolchain@v1
34+
with:
35+
profile: minimal
36+
toolchain: stable
37+
override: true
38+
- name: cargo doc - all features
39+
run: cargo doc --all-features --verbose
40+
41+
# Publish a new version when pushing to master.
42+
# Will succeed if the version has been updated, otherwise silently fails.
43+
cargo-publish:
44+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
45+
env:
46+
CRATESIO_TOKEN: ${{ secrets.CRATESIO_TOKEN }}
47+
runs-on: macOS-latest
48+
steps:
49+
- uses: actions/checkout@v2
50+
- name: Install llvm and clang
51+
run: brew install llvm
52+
- name: Install stable
53+
uses: actions-rs/toolchain@v1
54+
with:
55+
profile: minimal
56+
toolchain: stable
57+
override: true
58+
- name: cargo publish
59+
continue-on-error: true
60+
run: cargo publish --token $CRATESIO_TOKEN

.travis.yml

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

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@ core_midi = ["coreaudio-sys/core_midi"]
2323
[dependencies]
2424
bitflags = "1.0"
2525
coreaudio-sys = { version = "0.2", default-features = false }
26+
27+
[package.metadata.docs.rs]
28+
all-features = true
29+
default-target = "x86_64-apple-darwin"
30+
targets = ["x86_64-apple-darwin", "x86_64-apple-ios"]

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# coreaudio-rs [![Build Status](https://travis-ci.org/RustAudio/coreaudio-rs.svg?branch=master)](https://travis-ci.org/RustAudio/coreaudio-rs) [![Crates.io](https://img.shields.io/crates/v/coreaudio-rs.svg)](https://crates.io/crates/coreaudio-rs) [![Crates.io](https://img.shields.io/crates/l/coreaudio-rs.svg)](https://github.com/RustAudio/coreaudio-rs/blob/master/LICENSE-MIT)
1+
# coreaudio-rs [![Actions Status](https://github.com/rustaudio/coreaudio-rs/workflows/coreaudio-rs/badge.svg)](https://github.com/rustaudio/coreaudio-rs/actions) [![Crates.io](https://img.shields.io/crates/v/coreaudio-rs.svg)](https://crates.io/crates/coreaudio-rs) [![Crates.io](https://img.shields.io/crates/l/coreaudio-rs.svg)](https://github.com/RustAudio/coreaudio-rs/blob/master/LICENSE-MIT) [![docs.rs](https://docs.rs/coreaudio-rs/badge.svg)](https://docs.rs/coreaudio-rs/)
22

33
A friendly rust interface for [Apple's Core Audio API](https://developer.apple.com/library/ios/documentation/MusicAudio/Conceptual/CoreAudioOverview/CoreAudioEssentials/CoreAudioEssentials.html).
44

55
This crate aims to expose and wrap the functionality of the original C API in a zero-cost, safe, Rust-esque manner.
66

77
If you just want direct access to the unsafe bindings, use [coreaudio-sys](https://crates.io/crates/coreaudio-sys).
8-
9-
[Documentation](http://rustaudio.github.io/coreaudio-rs/coreaudio)

0 commit comments

Comments
 (0)