Skip to content

Commit

Permalink
fix(relay): rust build fails after tokio bump from 0.2.25 to 1.18.5
Browse files Browse the repository at this point in the history
    Additionally:
    - upgrade other dependencies for relay
    - added tls based unit test in relay

Signed-off-by: Sandeep Nishad <sandeep.nishad1@ibm.com>
  • Loading branch information
sandeepnRES committed Mar 28, 2023
1 parent 61c43af commit 131fc06
Show file tree
Hide file tree
Showing 25 changed files with 3,382 additions and 2,114 deletions.
96 changes: 94 additions & 2 deletions .github/workflows/test_weaver-relay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ jobs:
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
- name: Build Protos RS
run: make build
run: |
export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin"
make build
working-directory: weaver/common/protos-rs

- name: Get Latest Relay Dependencies
Expand Down Expand Up @@ -59,9 +61,60 @@ jobs:
sleep 30
cargo run --bin client 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc
working-directory: weaver/core/relay

relay-tls-local:
# if: ${{ false }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install RUST Toolchain minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy

- name: Use Protoc 3.15
run: |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip
unzip protoc-3.15.6-linux-x86_64.zip -d protoc
- name: Build Protos RS
run: |
export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin"
make build
working-directory: weaver/common/protos-rs

- name: Get Latest Relay Dependencies
run: |
make protos-local
cargo update -p nom
cargo update -p lexical-core
working-directory: weaver/core/relay

- name: Build Image
run: make
working-directory: weaver/core/relay

- name: Run Dummy Relay
run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin server &> relay-dummy.out &
working-directory: weaver/core/relay

- name: Run Dummy Driver
run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin dummy-driver &> driver-dummy.out &
working-directory: weaver/core/relay

- name: Mock Client Test
run: |
echo "Waiting for Dummy Relay and Driver to come up"
sleep 30
cargo run --bin client-tls 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc
working-directory: weaver/core/relay

relay:
# if: ${{ false }}
if: ${{ false }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down Expand Up @@ -97,4 +150,43 @@ jobs:
echo "Waiting for Dummy Relay and Driver to come up"
sleep 30
cargo run --bin client 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc
working-directory: weaver/core/relay

relay-tls:
if: ${{ false }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install RUST Toolchain minimal stable with clippy and rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy

- name: Get Latest Relay Dependencies
run: |
cargo update -p nom
cargo update -p lexical-core
working-directory: weaver/core/relay

- name: Build Image
run: make build
working-directory: weaver/core/relay

- name: Run Dummy Relay
run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin server &> relay-dummy.out &
working-directory: weaver/core/relay

- name: Run Dummy Driver
run: RELAY_CONFIG=config/Dummy_Relay_tls.toml cargo run --bin dummy-driver &> driver-dummy.out &
working-directory: weaver/core/relay

- name: Mock Client Test
run: |
echo "Waiting for Dummy Relay and Driver to come up"
sleep 30
cargo run --bin client-tls 9085 localhost:9085/Dummy_Network/abc:abc:abc:abc
working-directory: weaver/core/relay
Loading

0 comments on commit 131fc06

Please sign in to comment.