diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 0000000..cfcc765 --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,49 @@ +name: Builds + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + - os: windows-latest + target: aarch64-pc-windows-msvc + - os: macos-latest + target: x86_64-apple-darwin + - os: macos-latest + target: aarch64-apple-darwin + + name: Build (${{ matrix.target }}) + runs-on: ${{ matrix.os }} + steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup target add ${{ matrix.target }} + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build + run: cargo build --release --verbose --target ${{ matrix.target }} + + - name: Build examples + working-directory: examples + run: cargo build --release --verbose --target ${{ matrix.target }} + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bdbc3eb..b957c2c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,17 +14,13 @@ jobs: strategy: matrix: include: + # Platform supports is limited for tests (no aarch64) - os: windows-latest target: x86_64-pc-windows-msvc - - os: windows-latest - target: aarch64-pc-windows-msvc - os: macos-latest target: x86_64-apple-darwin - code-target: darwin-x64 - - os: macos-latest - target: aarch64-apple-darwin - name: Run tests (${{ matrix.target }}) + name: Build (${{ matrix.target }}) runs-on: ${{ matrix.os }} steps: - name: Install Protoc @@ -44,7 +40,7 @@ jobs: - name: Build run: cargo build --release --verbose --target ${{ matrix.target }} - - name: Tests + - name: Test run: cargo test --release --verbose --target ${{ matrix.target }} diff --git a/README.md b/README.md index b36fd58..33ddb80 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # 📹🎙️🦀 Rust Client SDK for LiveKit [![crates.io](https://img.shields.io/crates/v/livekit.svg)](https://crates.io/crates/livekit) -[![Tests & Build](https://github.com/livekit/client-sdk-native/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/livekit/client-sdk-native/actions/workflows/rust.yml) +[![Builds](https://github.com/livekit/client-sdk-native/actions/workflows/builds.yml/badge.svg?branch=main)](https://github.com/livekit/client-sdk-native/actions/workflows/builds.yml) +[![Tests](https://github.com/livekit/client-sdk-native/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/livekit/client-sdk-native/actions/workflows/tests.yml) ⚠️ Warning