Initial changes for adding visionOS support #96
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: coreaudio-rs | |
on: [push, pull_request] | |
jobs: | |
# Run cargo test with default, no and all features. | |
macos-test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2.0.2 | |
with: | |
version: "15.0" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: cargo test | |
run: cargo test --verbose | |
- name: Run sign example | |
run: cargo run --example sine | |
# TODO: These don't work as of 2020-12-06, but they should. | |
# - name: cargo test - no features | |
# run: cargo test --no-default-features --verbose | |
# - name: cargo test - all features | |
# run: cargo test --all-features --verbose | |
security-audit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: rustsec/audit-check@v1.4.1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ios-build: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2.0.2 | |
with: | |
version: "15.0" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Add iOS targets | |
run: rustup target add aarch64-apple-ios x86_64-apple-ios | |
- name: Install cargo lipo | |
run: cargo install cargo-lipo | |
- name: Build iphonesimulator feedback example | |
run: cd examples/ios && xcodebuild ONLY_ACTIVE_ARCH=NO ARCHS=x86_64 -scheme coreaudio-ios-example -configuration Debug -derivedDataPath build -sdk iphonesimulator | |
apple-tier-3-check: | |
runs-on: macOS-14 | |
strategy: | |
matrix: | |
target: [ | |
aarch64-apple-visionos, | |
aarch64-apple-visionos-sim, | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly | |
components: rust-src | |
- name: Install Xcode Command Line Tools | |
# TODO: Remove this when xcode 15.2 or later is the default in | |
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode | |
run: sudo xcode-select --switch /Applications/Xcode_15.4.app/Contents/Developer | |
- name: Build for visionOS target ${{matrix.target}} | |
run: cargo +nightly build -Z build-std --target=${{matrix.target}} | |
# Build the docs with all features to make sure docs.rs will work. | |
macos-docs: | |
runs-on: macOS-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2.0.2 | |
with: | |
version: "15.0" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- 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@v4 | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v2.0.2 | |
with: | |
version: "15.0" | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: cargo publish | |
continue-on-error: true | |
run: cargo publish --token $CRATESIO_TOKEN |