doc: udpate usage #60
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: Build and Test | |
on: | |
push: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
build-ios: | |
runs-on: macos-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
strategy: | |
matrix: | |
target: | |
- aarch64-apple-ios | |
- aarch64-apple-ios-sim | |
- x86_64-apple-ios | |
steps: | |
- name: install dependencies | |
run: brew install nasm | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "1.81.0" | |
targets: ${{ matrix.target }} | |
- name: Build | |
run: cd tests && cargo build --target ${{ matrix.target }} | |
build-android: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
strategy: | |
matrix: | |
target: | |
- x86_64-linux-android | |
- aarch64-linux-android | |
steps: | |
- name: install requirements | |
uses: awalsh128/cache-apt-pkgs-action@v1 | |
with: | |
packages: curl xz-utils build-essential cmake m4 nasm libstdc++6 | |
version: 1.0 | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: "1.81.0" | |
targets: ${{ matrix.target }} | |
- name: Install Android NDK | |
run: cargo install cargo-ndk | |
- name: Build | |
run: cd tests && cargo ndk -t ${{ matrix.target }} build | |
test-linux: | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: install requirements | |
uses: awalsh128/cache-apt-pkgs-action@v1 | |
with: | |
packages: curl xz-utils build-essential cmake m4 nasm libstdc++6 | |
version: 1.0 | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: "1.81.0" | |
override: true | |
- name: Run tests | |
run: cd tests && cargo test | |
test-macOS: | |
runs-on: macos-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: install dependencies | |
run: brew install nasm | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: "1.81.0" | |
override: true | |
- name: Run tests | |
run: cd tests && cargo test | |
test-macOS-x86_64: | |
runs-on: macos-13 | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
steps: | |
- name: install dependencies | |
run: brew install nasm | |
- uses: actions/checkout@v4 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: "1.81.0" | |
override: true | |
- name: Run tests | |
run: cd tests && cargo test |