forked from webrtc-rs/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- remove all other crates - remove client-related TURN code - add TCP transport for TURN Co-authored-by: Kai Ren <tyranron@gmail.com>
- Loading branch information
Showing
959 changed files
with
4,703 additions
and
169,403 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
|
||
[*.md] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = false | ||
max_line_length = off | ||
|
||
[*.rs] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.toml] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab | ||
indent_size = 4 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: ["master"] | ||
tags: ["v*"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUST_BACKTRACE: 1 | ||
|
||
jobs: | ||
|
||
################ | ||
# Pull Request # | ||
################ | ||
|
||
pr: | ||
if: ${{ github.event_name == 'pull_request' }} | ||
needs: | ||
- clippy | ||
#- msrv | ||
- rustdoc | ||
- rustfmt | ||
- test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: true | ||
|
||
|
||
|
||
|
||
########################## | ||
# Linting and formatting # | ||
########################## | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
components: clippy | ||
|
||
- run: make cargo.lint | ||
|
||
rustfmt: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
components: rustfmt | ||
|
||
- run: make cargo.fmt check=yes | ||
|
||
|
||
|
||
|
||
########### | ||
# Testing # | ||
########### | ||
|
||
msrv: | ||
name: MSRV | ||
if: ${{ false }} # TODO: re-enable once fully refactored | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
msrv: ["1.70.0"] | ||
os: ["ubuntu", "macOS", "windows"] | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: nightly | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.msrv }} | ||
|
||
- run: cargo +nightly update -Z minimal-versions | ||
|
||
- run: make test.cargo | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
toolchain: ["stable", "beta", "nightly"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.toolchain }} | ||
components: rust-src | ||
|
||
- run: cargo install cargo-careful | ||
if: ${{ matrix.toolchain == 'nightly' }} | ||
|
||
- run: make test.cargo | ||
careful=${{ (matrix.toolchain == 'nightly' && 'yes') | ||
|| 'no' }} | ||
|
||
|
||
|
||
|
||
################# | ||
# Documentation # | ||
################# | ||
|
||
rustdoc: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- run: make cargo.doc private=yes open=no | ||
env: | ||
RUSTFLAGS: -D warnings | ||
|
||
|
||
|
||
|
||
############# | ||
# Releasing # | ||
############# | ||
|
||
publish: | ||
name: publish (crates.io) | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
needs: ["release-github"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dtolnay/rust-toolchain@v1 | ||
with: | ||
toolchain: stable | ||
|
||
- run: cargo publish -p medea-turn | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATESIO_TOKEN }} | ||
|
||
release-github: | ||
name: release (GitHub) | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
needs: ["clippy", "msrv", "rustdoc", "rustfmt", "test"] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Parse release version | ||
id: release | ||
run: echo "version=${GITHUB_REF#refs/tags/v}" | ||
>> $GITHUB_OUTPUT | ||
- name: Verify release version matches Cargo manifest | ||
run: | | ||
test "${{ steps.release.outputs.version }}" \ | ||
== "$(grep -m1 'version = "' Cargo.toml | cut -d'"' -f2)" | ||
- name: Parse CHANGELOG link | ||
id: changelog | ||
run: echo "link=${{ github.server_url }}/${{ github.repository }}/blob/v${{ steps.release.outputs.version }}/CHANGELOG.md#$(sed -n '/^## \[${{ steps.release.outputs.version }}\]/{s/^## \[\(.*\)\][^0-9]*\([0-9].*\)/\1--\2/;s/[^0-9a-z-]*//g;p;}' CHANGELOG.md)" | ||
>> $GITHUB_OUTPUT | ||
|
||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: ${{ steps.release.outputs.version }} | ||
body: | | ||
[API docs](https://docs.rs/medea-turn/${{ steps.release.outputs.version }}) | ||
[Changelog](${{ steps.changelog.outputs.link }}) | ||
prerelease: ${{ contains(steps.release.outputs.version, '-') }} |
Oops, something went wrong.