2020-12-08 10:21:09 +00:00
|
|
|
name: CI
|
2020-12-08 09:42:05 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2020-12-08 10:21:09 +00:00
|
|
|
style:
|
|
|
|
name: Check style
|
2020-12-08 09:42:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2020-12-08 10:08:41 +00:00
|
|
|
- name: Checkout the repo
|
|
|
|
uses: actions/checkout@v2
|
2020-12-08 10:21:09 +00:00
|
|
|
|
2020-12-08 10:08:41 +00:00
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
2020-12-08 09:42:05 +00:00
|
|
|
with:
|
|
|
|
toolchain: stable
|
2020-12-08 10:21:09 +00:00
|
|
|
components: rustfmt
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
2020-12-08 09:42:05 +00:00
|
|
|
|
2020-12-08 10:08:41 +00:00
|
|
|
- name: Cargo fmt
|
|
|
|
uses: actions-rs/cargo@v1
|
2020-12-08 09:42:05 +00:00
|
|
|
with:
|
|
|
|
command: fmt
|
2020-12-08 09:44:19 +00:00
|
|
|
args: --all -- --check
|
2020-12-08 09:42:05 +00:00
|
|
|
|
2020-12-08 10:21:09 +00:00
|
|
|
clippy:
|
|
|
|
name: Run clippy
|
|
|
|
needs: [style]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
components: clippy
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
2020-12-08 10:08:41 +00:00
|
|
|
- name: Clippy
|
2020-12-08 11:45:16 +00:00
|
|
|
uses: actions-rs/cargo@v1
|
2020-12-08 09:42:05 +00:00
|
|
|
with:
|
2020-12-08 11:45:16 +00:00
|
|
|
command: clippy
|
2020-12-08 09:42:05 +00:00
|
|
|
args: --all-targets -- -D warnings
|
2020-12-08 10:36:01 +00:00
|
|
|
|
2021-04-21 08:51:11 +00:00
|
|
|
- name: Clippy without default features
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: clippy
|
|
|
|
# TODO: add `--all-targets` once all warnings in examples are resolved
|
|
|
|
args: --no-default-features --features native-tls -- -D warnings
|
|
|
|
|
2021-03-23 10:56:43 +00:00
|
|
|
check-wasm:
|
|
|
|
name: Check if WASM support compiles
|
|
|
|
needs: [clippy]
|
2021-03-23 11:02:32 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-03-23 10:56:43 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout the repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
2021-03-23 11:11:05 +00:00
|
|
|
target: wasm32-unknown-unknown
|
2021-03-23 10:56:43 +00:00
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
2021-03-23 11:43:38 +00:00
|
|
|
- name: Install emscripten
|
|
|
|
uses: mymindstorm/setup-emsdk@v7
|
|
|
|
|
2021-03-23 10:56:43 +00:00
|
|
|
- name: Check
|
2021-03-23 11:26:46 +00:00
|
|
|
run: |
|
|
|
|
cd matrix_sdk/examples/wasm_command_bot
|
2021-03-23 11:31:17 +00:00
|
|
|
cargo check --target wasm32-unknown-unknown
|
2021-03-23 10:56:43 +00:00
|
|
|
|
2021-04-12 19:05:07 +00:00
|
|
|
test-features:
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
needs: [clippy]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
name:
|
|
|
|
- linux / features-no-encryption
|
|
|
|
- linux / features-no-sled
|
|
|
|
- linux / features-no-encryption-and-sled
|
|
|
|
- linux / features-sled_cryptostore
|
|
|
|
- linux / features-rustls-tls
|
|
|
|
- linux / features-markdown
|
|
|
|
- linux / features-socks
|
|
|
|
- linux / features-sso_login
|
2021-04-26 15:31:25 +00:00
|
|
|
- linux / features-require_auth_for_profile_requests
|
2021-04-12 19:05:07 +00:00
|
|
|
|
|
|
|
include:
|
|
|
|
- name: linux / features-no-encryption
|
|
|
|
cargo_args: --no-default-features --features "sled_state_store, native-tls"
|
|
|
|
|
|
|
|
- name: linux / features-no-sled
|
|
|
|
cargo_args: --no-default-features --features "encryption, native-tls"
|
|
|
|
|
|
|
|
- name: linux / features-no-encryption-and-sled
|
|
|
|
cargo_args: --no-default-features --features "native-tls"
|
|
|
|
|
|
|
|
- name: linux / features-sled_cryptostore
|
|
|
|
cargo_args: --no-default-features --features "encryption, sled_cryptostore, native-tls"
|
|
|
|
|
|
|
|
- name: linux / features-rustls-tls
|
|
|
|
cargo_args: --no-default-features --features rustls-tls
|
|
|
|
|
2021-04-26 15:31:25 +00:00
|
|
|
- name: linux / features-require_auth_for_profile_requests
|
|
|
|
cargo_args: --no-default-features --features "require_auth_for_profile_requests, native-tls"
|
|
|
|
|
2021-04-12 19:05:07 +00:00
|
|
|
- name: linux / features-markdown
|
|
|
|
cargo_args: --features markdown
|
|
|
|
|
|
|
|
- name: linux / features-socks
|
|
|
|
cargo_args: --features socks
|
|
|
|
|
|
|
|
- name: linux / features-sso_login
|
|
|
|
cargo_args: --features sso_login
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust || 'stable' }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Check
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: check
|
|
|
|
args: --manifest-path matrix_sdk/Cargo.toml ${{ matrix.cargo_args }}
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|
|
|
|
args: --manifest-path matrix_sdk/Cargo.toml ${{ matrix.cargo_args }}
|
|
|
|
|
2020-12-08 10:36:01 +00:00
|
|
|
test:
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
needs: [clippy]
|
|
|
|
|
|
|
|
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
name:
|
|
|
|
- linux / stable
|
|
|
|
- linux / beta
|
|
|
|
- macOS / stable
|
|
|
|
- windows / stable-x86_64-msvc
|
|
|
|
|
|
|
|
include:
|
|
|
|
- name: linux / stable
|
|
|
|
|
|
|
|
- name: linux / beta
|
|
|
|
rust: beta
|
|
|
|
|
|
|
|
- name: macOS / stable
|
|
|
|
os: macOS-latest
|
|
|
|
|
|
|
|
- name: windows / stable-x86_64-msvc
|
|
|
|
os: windows-latest
|
|
|
|
target: x86_64-pc-windows-msvc
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Install rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: ${{ matrix.rust || 'stable' }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: test
|