Skip to content

Commit

Permalink
feat(webtransport): add WebTransport for WASM environments
Browse files Browse the repository at this point in the history
This PR implements `Transport` for WebTransport for browsers by using web-sys.

Related: #3846.
Resolves: #3825.

Pull-Request: #4015.


  
Co-Authored-By: Yiannis Marangos <[email protected]>
  

  
Co-Authored-By: Maciej Zwoliński <[email protected]>
  

  
Co-Authored-By: Yiannis Marangos <[email protected]>
  • Loading branch information
oblique and oblique authored Jun 23, 2023
1 parent b23a4a7 commit 85a846a
Show file tree
Hide file tree
Showing 41 changed files with 3,909 additions and 310 deletions.
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,41 @@ jobs:
run: |
PACKAGE_VERSION=$(cargo metadata --format-version=1 --no-deps | jq -e -r '.packages[] | select(.name == "'"$CRATE"'") | .version')
SPECIFIED_VERSION=$(tomlq "workspace.dependencies.$CRATE.version" --file ./Cargo.toml)
echo "Package version: $PACKAGE_VERSION";
echo "Specified version: $SPECIFIED_VERSION";
test "$PACKAGE_VERSION" = "$SPECIFIED_VERSION"
wasm_tests:
name: Run all WASM tests
runs-on: ubuntu-latest
env:
CHROMEDRIVER_VERSION: '114.0.5735.90'
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-unknown-unknown

- uses: taiki-e/cache-cargo-install-action@v1
with:
tool: [email protected]

- name: Install Google Chrome
run: |
curl -o /tmp/google-chrome-stable_amd64.deb https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROMEDRIVER_VERSION}-1_amd64.deb
sudo dpkg -i /tmp/google-chrome-stable_amd64.deb
- name: Install chromedriver
uses: nanasess/setup-chromedriver@v2
with:
chromedriver-version: ${{ env.CHROMEDRIVER_VERSION }}

- name: Run all tests
run: ./wasm-tests/run-all.sh

cross:
name: Compile on ${{ matrix.target }}
strategy:
Expand Down Expand Up @@ -284,6 +313,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: dtolnay/rust-toolchain@stable

- id: cargo-metadata
run: |
WORKSPACE_MEMBERS=$(cargo metadata --format-version=1 --no-deps | jq -c '.packages | map(select(.publish == null) | .name)')
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/interop-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
run-multidim-interop:
name: Run multidimensional interoperability tests
runs-on: ${{ fromJSON(github.repository == 'libp2p/rust-libp2p' && '["self-hosted", "linux", "x64", "xlarge"]' || '"ubuntu-latest"') }}
strategy:
matrix:
flavour: [chromium, native]
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Build image
run: docker buildx build --load -t rust-libp2p-head . -f interop-tests/Dockerfile
- uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master
- name: Build ${{ matrix.flavour }} image
run: docker buildx build --load -t ${{ matrix.flavour }}-rust-libp2p-head . -f interop-tests/Dockerfile.${{ matrix.flavour }}
- name: Run ${{ matrix.flavour }} tests
uses: libp2p/test-plans/.github/actions/run-interop-ping-test@master
with:
test-filter: rust-libp2p-head
extra-versions: ${{ github.workspace }}/interop-tests/ping-version.json
test-filter: ${{ matrix.flavour }}-rust-libp2p-head
extra-versions: ${{ github.workspace }}/interop-tests/${{ matrix.flavour }}-ping-version.json
s3-cache-bucket: libp2p-by-tf-aws-bootstrap
s3-access-key-id: ${{ vars.TEST_PLANS_BUILD_CACHE_KEY_ID }}
s3-secret-access-key: ${{ secrets.TEST_PLANS_BUILD_CACHE_KEY }}
Loading

0 comments on commit 85a846a

Please sign in to comment.