Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(webtransport): add WebTransport for WASM environments #4015

Merged
merged 24 commits into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
649bd1e
feat(noise): add WebTransport certhashes extension
oblique Jun 9, 2023
b46517d
chore(wasm-ext): Replace `parity-send-wrapper` with `send-wrapper`
oblique Jun 1, 2023
1cc6656
feat(transport): add WebTransport for web-sys environments
oblique Jun 9, 2023
d92590d
chore(webtransport): add interop-tests support with wasm
zvolin Jun 14, 2023
1c2cafd
Merge remote-tracking branch 'origin/master' into webtransport-wasm-ext
oblique Jun 14, 2023
c8a83c3
Update transports/webtransport-websys/CHANGELOG.md
oblique Jun 14, 2023
147fa32
Update interop-tests/README.md
oblique Jun 14, 2023
de728e8
Split maybe_init_and_poll in two different methods
oblique Jun 14, 2023
5bb685c
Log multaddr parse failure as a warning
oblique Jun 14, 2023
75ff1af
Fix typo
oblique Jun 17, 2023
2ccfd67
Move webtransport tests under wasm-tests
oblique Jun 21, 2023
51335e4
Make Transport and related types Send
oblique Jun 21, 2023
1ab2856
Update wasm-tests CI
oblique Jun 21, 2023
8f25ad7
Add readme
oblique Jun 21, 2023
57a4ad2
Merge remote-tracking branch 'origin/master' into webtransport-wasm-ext
oblique Jun 21, 2023
ceff6a3
Upgrade dependencies
oblique Jun 21, 2023
1ad26dc
disable publish on webtransport-tests
oblique Jun 21, 2023
3a464b4
webtransport: add test for leftovers
oblique Jun 21, 2023
0d7cc02
update openssl to make cargo-deny happy
oblique Jun 21, 2023
4287d9f
add license for webtransport-tests
oblique Jun 21, 2023
8bfa085
Make tests cleaner
oblique Jun 22, 2023
cfec286
Align Chrome and chromedriver versions
oblique Jun 22, 2023
c2cfa8a
fix minor lints in run.sh
oblique Jun 22, 2023
46395d0
Merge branch 'master' into webtransport-wasm-ext
mxinden Jun 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 42 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,51 @@ 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"

webtransport_tests:
name: Test WebTransport
runs-on: ubuntu-latest
defaults:
run:
working-directory: transports/webtransport-websys
steps:
- uses: actions/checkout@v3

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

- uses: docker/setup-buildx-action@v2

- uses: taiki-e/cache-cargo-install-action@v1
with:
tool: wasm-pack@0.11.1

- name: Install Google Chrome
run: |
CHROME_VERSION=114.0.5735.106
curl -O https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_$CHROME_VERSION-1_amd64.deb
sudo dpkg -i google-chrome-stable_$CHROME_VERSION-1_amd64.deb

- name: Install chromedriver
run: |
CHROMEDRIVER_VERSION=114.0.5735.90
curl -O https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip
unzip chromedriver_linux64.zip

- name: Build echo-server
run: docker buildx build -o type=local,dest=echo-server -t echo-server echo-server

- name: Run wasm-pack test (Chrome)
run: |
./echo-server/echo-server &
wasm-pack test --chrome --chromedriver=./chromedriver --headless

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

- uses: dtolnay/rust-toolchain@stable
thomaseizinger marked this conversation as resolved.
Show resolved Hide resolved

- 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