2023-06-19 16:21:53 +02:00
|
|
|
name: Build and Test
|
2023-04-04 16:43:53 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-11-22 16:43:03 +01:00
|
|
|
branches: [ "main" ]
|
2023-04-04 16:43:53 +02:00
|
|
|
pull_request:
|
2023-11-12 17:32:57 +01:00
|
|
|
branches: [ "main", "dev" ]
|
2023-04-04 16:43:53 +02:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2023-11-19 23:15:12 +01:00
|
|
|
linux:
|
2023-04-04 16:43:53 +02:00
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
2023-08-26 15:08:47 +02:00
|
|
|
|
2023-04-04 16:43:53 +02:00
|
|
|
steps:
|
2023-11-12 17:30:49 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-07-14 11:58:12 +02:00
|
|
|
- name: Clone spacebar server
|
2023-04-15 17:26:44 +02:00
|
|
|
run: |
|
2023-05-13 15:49:07 +02:00
|
|
|
git clone https://github.com/bitfl0wer/server.git
|
2024-01-31 22:43:54 +01:00
|
|
|
- uses: actions/setup-node@v4
|
2023-07-14 11:58:12 +02:00
|
|
|
with:
|
2023-08-25 21:30:07 +02:00
|
|
|
node-version: 18
|
2023-07-14 11:58:12 +02:00
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: server/package-lock.json
|
2023-05-13 15:49:07 +02:00
|
|
|
- name: Prepare and start Spacebar server
|
2023-04-15 17:26:44 +02:00
|
|
|
run: |
|
2023-04-15 17:44:58 +02:00
|
|
|
npm install
|
|
|
|
npm run setup
|
2023-04-15 17:26:44 +02:00
|
|
|
npm run start &
|
2023-05-13 15:49:07 +02:00
|
|
|
working-directory: ./server
|
2023-07-14 11:58:12 +02:00
|
|
|
- uses: Swatinem/rust-cache@v2
|
2023-08-26 13:32:35 +02:00
|
|
|
with:
|
|
|
|
cache-all-crates: "true"
|
2023-11-19 23:15:12 +01:00
|
|
|
prefix-key: "linux"
|
2023-08-25 20:58:46 +02:00
|
|
|
- name: Build, Test and Publish Coverage
|
|
|
|
run: |
|
2023-08-26 18:02:21 +02:00
|
|
|
if [ -n "${{ secrets.COVERALLS_REPO_TOKEN }}" ]; then
|
2023-11-20 12:38:39 +01:00
|
|
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
2023-08-26 18:02:21 +02:00
|
|
|
cargo binstall --no-confirm cargo-tarpaulin --force
|
2023-11-20 13:33:45 +01:00
|
|
|
cargo tarpaulin --all-features --avoid-cfg-tarpaulin --tests --verbose --skip-clean --coveralls ${{ secrets.COVERALLS_REPO_TOKEN }} --timeout 120
|
2023-08-26 18:02:21 +02:00
|
|
|
else
|
|
|
|
echo "Code Coverage step is skipped on forks!"
|
|
|
|
cargo build --verbose --all-features
|
|
|
|
cargo test --verbose --all-features
|
|
|
|
fi
|
2023-12-03 15:57:03 +01:00
|
|
|
# wasm-safari:
|
|
|
|
# runs-on: macos-latest
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v4
|
|
|
|
# - name: Clone spacebar server
|
|
|
|
# run: |
|
|
|
|
# git clone https://github.com/bitfl0wer/server.git
|
2024-01-31 22:43:54 +01:00
|
|
|
# - uses: actions/setup-node@v4
|
2023-12-03 15:57:03 +01:00
|
|
|
# with:
|
|
|
|
# node-version: 18
|
|
|
|
# cache: 'npm'
|
|
|
|
# cache-dependency-path: server/package-lock.json
|
|
|
|
# - name: Prepare and start Spacebar server
|
|
|
|
# run: |
|
|
|
|
# npm install
|
|
|
|
# npm run setup
|
|
|
|
# npm run start &
|
|
|
|
# working-directory: ./server
|
|
|
|
# - uses: Swatinem/rust-cache@v2
|
|
|
|
# with:
|
|
|
|
# cache-all-crates: "true"
|
|
|
|
# prefix-key: "macos-safari"
|
|
|
|
# - name: Run WASM tests with Safari, Firefox, Chrome
|
|
|
|
# run: |
|
|
|
|
# rustup target add wasm32-unknown-unknown
|
|
|
|
# curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
# cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.88" --force
|
|
|
|
# SAFARIDRIVER=$(which safaridriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt" --no-fail-fast
|
2023-11-22 15:13:26 +01:00
|
|
|
wasm-gecko:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clone spacebar server
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/bitfl0wer/server.git
|
2024-01-31 22:43:54 +01:00
|
|
|
- uses: actions/setup-node@v4
|
2023-11-22 15:13:26 +01:00
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: server/package-lock.json
|
|
|
|
- name: Prepare and start Spacebar server
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run setup
|
|
|
|
npm run start &
|
|
|
|
working-directory: ./server
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
with:
|
|
|
|
cache-all-crates: "true"
|
|
|
|
prefix-key: "macos"
|
|
|
|
- name: Run WASM tests with Safari, Firefox, Chrome
|
|
|
|
run: |
|
|
|
|
rustup target add wasm32-unknown-unknown
|
|
|
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.88" --force
|
Primitive voice implementation (feature/voice) (#457)
* Add Webrtc Identify & Ready
* Add more webrtc typings
* Attempt an untested voice gateway implementation
* fmt
* Merge with main
* Same allow as for voice as normal gateway
* Test error observer
* Minor updates
* More derives
* Even more derives
* Small types update
* e
* Minor doc fixes
* Modernise voice gateway
* Add default impl for voicegatewayerror
* Make voice event fields pub
* Event updates via the scientific method
* ??
* Fix bad request in voice gateway init
* Voice gateway updates
* Fix error failing to 'deserialize' properly
* Update voice identify
* Clarify FIXME related to #430
* Update to v7
* Create seperate voice_gateway.rs and voice_udp.rs
* Restructure voice to new module
* fix: deserialization error in speaking bitflags
* feat: kinda janky ip discovery impl
* feat: return ip discovery data + minor update
* feat: packet parsing!
* fix: voice works again
* feat: add voice_media_sink_wants
(comitting uncommited changes to merge)
* chore: rename events/webrtc to events/voice_gateway
* Add UdpHandle
* chore: clippy + other misc updates
* fix: attempt to fix failing wasm build
* chore: yes clippy, that is indeed an unneeded return statement
* feat: add VoiceData struct
* feat: add VoiceData reference to UdpHandler
* feat: decryption?
* chore: formatting
* feat: add ssrc definition (op 12)
* feat: add untested sending & asbtract nonce generation
* feat: Public api! (sorta)
* small updates
* feat: add sequence number
* chore: yes
* feat: merge VoiceHandler into official development
* chore: yes clippy, you are special
* fix: duplicated gateway events
* feat: first try at vgw wasm compat
* fix: blunder
* fix: gateway connect using wrong url
* fix: properly using encrypted data, bad practice for buffer creation
* chore: split voice udp
* feat: udp error handling, create udp/backends
* fix: its the same
* chore: clarify UDP on WASM
* api: split voice gateway and udp features, test for voice gateway in WASM
* feat: new encryption modes, minor code quality
* docs: document voice encryption modes
* chore: unused imports
* chore: update getrandom version to match wasm version
* chore: update on packet size FIXME
* drop buf asap
* Okay can't do that actually
* tests: add nonce test
* normal tests work?
* docs: fix doc warning, fix incorrect refrences to 'webrtc'
* chore: json isn't a doc test
* tests: better gateway auth test
* testing tests
* update voice heartbeat, fix the new test issue
* committed too much
* fix: unused import
* fix: use ip discovery address as string, not as Vec<u8>
* chore: less obnoxious logging
* chore: better unimplemented voice modes handling
* chore: remove unused variable
* chore: use matches macro
* add voice examples, make gateway ones clearer
* rename voice example
* chore: remove unused VoiceHandler
* fix: implement gateway Reconnect and InvalidSession
* Typo
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
* Fix a bunch of typos
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
* fix: error handling while loading native certs
* fix: guh
* use be for nonce bytes
* fix: refactor gw and vgw closures
* remove outdated docs
---------
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
|
|
|
GECKODRIVER=$(which geckodriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|
2023-11-22 15:13:26 +01:00
|
|
|
wasm-chrome:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Clone spacebar server
|
|
|
|
run: |
|
|
|
|
git clone https://github.com/bitfl0wer/server.git
|
2024-01-31 22:43:54 +01:00
|
|
|
- uses: actions/setup-node@v4
|
2023-11-22 15:13:26 +01:00
|
|
|
with:
|
|
|
|
node-version: 18
|
|
|
|
cache: 'npm'
|
|
|
|
cache-dependency-path: server/package-lock.json
|
|
|
|
- name: Prepare and start Spacebar server
|
|
|
|
run: |
|
|
|
|
npm install
|
|
|
|
npm run setup
|
|
|
|
npm run start &
|
|
|
|
working-directory: ./server
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
with:
|
|
|
|
cache-all-crates: "true"
|
|
|
|
prefix-key: "macos"
|
|
|
|
- name: Run WASM tests with Safari, Firefox, Chrome
|
|
|
|
run: |
|
|
|
|
rustup target add wasm32-unknown-unknown
|
|
|
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
cargo binstall --no-confirm wasm-bindgen-cli --version "0.2.88" --force
|
Primitive voice implementation (feature/voice) (#457)
* Add Webrtc Identify & Ready
* Add more webrtc typings
* Attempt an untested voice gateway implementation
* fmt
* Merge with main
* Same allow as for voice as normal gateway
* Test error observer
* Minor updates
* More derives
* Even more derives
* Small types update
* e
* Minor doc fixes
* Modernise voice gateway
* Add default impl for voicegatewayerror
* Make voice event fields pub
* Event updates via the scientific method
* ??
* Fix bad request in voice gateway init
* Voice gateway updates
* Fix error failing to 'deserialize' properly
* Update voice identify
* Clarify FIXME related to #430
* Update to v7
* Create seperate voice_gateway.rs and voice_udp.rs
* Restructure voice to new module
* fix: deserialization error in speaking bitflags
* feat: kinda janky ip discovery impl
* feat: return ip discovery data + minor update
* feat: packet parsing!
* fix: voice works again
* feat: add voice_media_sink_wants
(comitting uncommited changes to merge)
* chore: rename events/webrtc to events/voice_gateway
* Add UdpHandle
* chore: clippy + other misc updates
* fix: attempt to fix failing wasm build
* chore: yes clippy, that is indeed an unneeded return statement
* feat: add VoiceData struct
* feat: add VoiceData reference to UdpHandler
* feat: decryption?
* chore: formatting
* feat: add ssrc definition (op 12)
* feat: add untested sending & asbtract nonce generation
* feat: Public api! (sorta)
* small updates
* feat: add sequence number
* chore: yes
* feat: merge VoiceHandler into official development
* chore: yes clippy, you are special
* fix: duplicated gateway events
* feat: first try at vgw wasm compat
* fix: blunder
* fix: gateway connect using wrong url
* fix: properly using encrypted data, bad practice for buffer creation
* chore: split voice udp
* feat: udp error handling, create udp/backends
* fix: its the same
* chore: clarify UDP on WASM
* api: split voice gateway and udp features, test for voice gateway in WASM
* feat: new encryption modes, minor code quality
* docs: document voice encryption modes
* chore: unused imports
* chore: update getrandom version to match wasm version
* chore: update on packet size FIXME
* drop buf asap
* Okay can't do that actually
* tests: add nonce test
* normal tests work?
* docs: fix doc warning, fix incorrect refrences to 'webrtc'
* chore: json isn't a doc test
* tests: better gateway auth test
* testing tests
* update voice heartbeat, fix the new test issue
* committed too much
* fix: unused import
* fix: use ip discovery address as string, not as Vec<u8>
* chore: less obnoxious logging
* chore: better unimplemented voice modes handling
* chore: remove unused variable
* chore: use matches macro
* add voice examples, make gateway ones clearer
* rename voice example
* chore: remove unused VoiceHandler
* fix: implement gateway Reconnect and InvalidSession
* Typo
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
* Fix a bunch of typos
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
* fix: error handling while loading native certs
* fix: guh
* use be for nonce bytes
* fix: refactor gw and vgw closures
* remove outdated docs
---------
Co-authored-by: Flori <39242991+bitfl0wer@users.noreply.github.com>
2024-04-16 17:18:21 +02:00
|
|
|
CHROMEDRIVER=$(which chromedriver) cargo test --target wasm32-unknown-unknown --no-default-features --features="client, rt, voice_gateway"
|