|
| 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 |
0 commit comments