Skip to content

Commit 8ba4564

Browse files
committed
Add github workflow CI
1 parent 415aefd commit 8ba4564

File tree

1 file changed

+59
-0
lines changed

1 file changed

+59
-0
lines changed

.github/workflows/coreaudio-rs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
- 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

0 commit comments

Comments
 (0)