Bump version to v2.32.1 #206
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: RingRTC CI | |
on: | |
push: | |
branches: [ main, 'staging/*' ] | |
pull_request: # all target branches | |
jobs: | |
code_formatting: | |
name: Code Formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --component rustfmt | |
- name: Check rust format | |
run: cargo fmt -- --check | |
working-directory: src/rust | |
- name: Install for node | |
run: yarn install --frozen-lockfile | |
working-directory: src/node | |
- name: Check typescript format | |
run: yarn format -c | |
working-directory: src/node | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cargo Cache | |
uses: Swatinem/rust-cache@e207df5d269b42b69c8bc5101da26f7d31feddb4 # v2.6.2 | |
with: | |
cache-targets: "false" | |
- name: Install protoc | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- uses: actions/checkout@v3 | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --component clippy --target aarch64-linux-android,aarch64-apple-ios | |
- name: Install extra Rust tools | |
run: cargo +stable install --version 0.5.6 --locked cargo-about | |
- run: shellcheck **/*.sh bin/build-aar bin/build-call_sim-cli bin/build-cli bin/build-electron bin/build-gctc bin/build-ios bin/build-javadoc bin/build-rustdoc bin/build-target bin/fetch-artifact bin/gsync-webrtc bin/prepare-workspace bin/rust-lint-check bin/set-up-for-cocoapods src/rust/scripts/run-tests | |
- name: Check acknowledgments | |
run: ./bin/regenerate_acknowledgments.sh && git diff --name-status --exit-code acknowledgments | |
- name: Clippy | |
run: cargo clippy --tests --features sim -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (Android) | |
run: cargo clippy --target aarch64-linux-android -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (iOS) | |
run: cargo clippy --target aarch64-apple-ios -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (Electron) | |
run: cargo clippy --features electron -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (group_call) | |
run: cargo clippy --bin group_call --features native,http -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (call_link) | |
run: cargo clippy --bin call_link --features sim,http,rand_chacha -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (call_sim-cli) | |
run: cargo clippy --bin call_sim-cli --features call_sim -- -D warnings | |
working-directory: src/rust | |
- name: Clippy (call_sim) | |
run: cargo clippy -- -D warnings | |
working-directory: call_sim | |
- name: Clippy (signaling_server) | |
run: cargo clippy -- -D warnings | |
working-directory: call_sim/docker/signaling_server | |
- name: Install for node | |
run: yarn install --frozen-lockfile | |
working-directory: src/node | |
- name: Check typescript | |
run: yarn lint | |
working-directory: src/node | |
- name: Check package.json for prebuildChecksum | |
run: >- | |
grep -q '"prebuildChecksum": ""' package.json | |
working-directory: src/node | |
tests: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install protoc | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- uses: actions/checkout@v3 | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal | |
- name: Run rust tests | |
run: cd src/rust && ./scripts/run-tests | |
electron: | |
name: Electron Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
install-deps: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
test-runner: xvfb-run --auto-servernum | |
- os: windows-latest | |
install-deps: choco install protoc | |
- os: macos-latest | |
install-deps: brew install protobuf coreutils | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash # as opposed to PowerShell | |
steps: | |
- name: Install dependencies | |
run: ${{ matrix.install-deps }} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: 'src/node/.nvmrc' | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal | |
- run: bin/fetch-artifact -p desktop | |
- run: bin/build-electron --release --ringrtc-only | |
- run: yarn install --frozen-lockfile | |
working-directory: src/node | |
- run: yarn build | |
working-directory: src/node | |
- run: ${{ matrix.test-runner }} yarn test | |
working-directory: src/node | |
android: | |
name: Android Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install protoc | |
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
- uses: actions/checkout@v3 | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --target aarch64-linux-android,armv7-linux-androideabi,x86_64-linux-android,i686-linux-android | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 17 | |
- run: bin/fetch-artifact -p android | |
- run: bin/build-aar --release --ringrtc-only | |
ios: | |
name: iOS Tests | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: brew install protobuf coreutils # for grealpath | |
- run: rustup toolchain install $(cat rust-toolchain) --profile minimal --target x86_64-apple-ios | |
- run: bin/fetch-artifact -p ios | |
- run: bin/build-ios --release --ringrtc-only --host-sim-only | |
- run: pod install | |
working-directory: src/ios/SignalRingRTC | |
# Pick a phone model here that's likely to work on recent Xcodes. | |
- run: xcodebuild test -workspace SignalRingRTC.xcworkspace -scheme SignalRingRTC -destination 'platform=iOS Simulator,name=iPhone 13' | |
working-directory: src/ios/SignalRingRTC | |
env: | |
TEST_RUNNER_RINGRTC_MAX_LOG_LEVEL: 2 # warnings only |