mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-27 18:51:13 -04:00
210 lines
4.7 KiB
YAML
210 lines
4.7 KiB
YAML
name: Rust tests
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test-matrix-sdk-features:
|
|
name: 🐧 [m], ${{ matrix.name }}
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
name:
|
|
- no-encryption
|
|
- no-sled
|
|
- no-encryption-and-sled
|
|
- sled-cryptostore
|
|
- rustls-tls
|
|
- markdown
|
|
- socks
|
|
- sso-login
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci test-features ${{ matrix.name }}
|
|
|
|
test-matrix-sdk-crypto:
|
|
name: 🐧 [m]-crypto
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci test-crypto
|
|
|
|
test-all-crates:
|
|
name: ${{ matrix.name }}
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- name: 🐧 all crates, 🦀 stable
|
|
rust: stable
|
|
os: ubuntu-latest
|
|
|
|
- name: 🐧 all crates, 🦀 beta
|
|
rust: beta
|
|
os: ubuntu-latest
|
|
|
|
- name: 🍏 all crates, 🦀 stable
|
|
rust: stable
|
|
os: macos-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: nextest
|
|
args: run --workspace
|
|
|
|
- name: Test documentation
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --doc
|
|
|
|
test-wasm:
|
|
name: 🕸️ ${{ matrix.name }}
|
|
if: github.event_name == 'push' || !github.event.pull_request.draft
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
include:
|
|
- name: '[m]-qrcode'
|
|
cmd: matrix-sdk-qrcode
|
|
|
|
- name: '[m]-base'
|
|
cmd: matrix-sdk-base
|
|
|
|
- name: '[m]-common'
|
|
cmd: matrix-sdk-common
|
|
|
|
- name: '[m]-indexeddb, no crypto'
|
|
cmd: indexeddb-no-crypto
|
|
|
|
- name: '[m]-indexeddb, with crypto'
|
|
cmd: indexeddb-with-crypto
|
|
|
|
- name: '[m], no-default, wasm-flags'
|
|
cmd: matrix-sdk-no-default
|
|
|
|
- name: '[m], indexeddb stores'
|
|
cmd: matrix-sdk-indexeddb-stores
|
|
|
|
- name: '[m], indexeddb stores, no crypto'
|
|
cmd: matrix-sdk-indexeddb-stores-no-crypto
|
|
|
|
- name: '[m], wasm-example'
|
|
cmd: matrix-sdk-command-bot
|
|
|
|
steps:
|
|
- name: Checkout the repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
target: wasm32-unknown-unknown
|
|
components: clippy
|
|
profile: minimal
|
|
override: true
|
|
|
|
- name: Install wasm-pack
|
|
uses: jetli/wasm-pack-action@v0.3.0
|
|
with:
|
|
version: latest
|
|
|
|
- name: Load cache
|
|
uses: Swatinem/rust-cache@v1
|
|
|
|
- name: Install nextest
|
|
uses: taiki-e/install-action@nextest
|
|
|
|
- name: Rust Check
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci wasm ${{ matrix.cmd }}
|
|
|
|
- name: Wasm-Pack test
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: run
|
|
args: -p xtask -- ci wasm-pack ${{ matrix.cmd }}
|