Skip to content

build(deps): bump github.com/pion/webrtc/v3 from 3.2.17 to 3.2.18 #148

build(deps): bump github.com/pion/webrtc/v3 from 3.2.17 to 3.2.18

build(deps): bump github.com/pion/webrtc/v3 from 3.2.17 to 3.2.18 #148

Workflow file for this run

name: CI
on: [push]
jobs:
build_multi_platform:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Build for multi-platform
run: |
set -xeu
DIST=dist
mkdir $DIST
# (from: https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04)
platforms=("linux/amd64" "darwin/amd64" "windows/amd64" "linux/arm")
for platform in "${platforms[@]}"
do
platform_split=(${platform//\// })
export GOOS=${platform_split[0]}
export GOARCH=${platform_split[1]}
[ $GOOS = "windows" ] && EXTENSION='.exe' || EXTENSION=''
BUILD_PATH=webrtc-piping-$GOOS-$GOARCH
mkdir $BUILD_PATH
# Build
CGO_ENABLED=0 go build -o "${BUILD_PATH}/webrtc-piping${EXTENSION}" main.go
done
operational_test:
runs-on: ubuntu-20.04
timeout-minutes: 2
defaults:
run:
shell: bash
steps:
- name: Run Nginx
run: docker run -d -p 8888:80 nginx:alpine
- name: Run Piping Server
run: docker run -d -p 8080:8080 nwtgck/piping-server:v1.12.4
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
- run: CGO_ENABLED=0 go build -o webrtc-piping main.go
- name: TCP tunnel
run: |
set -eux
./webrtc-piping -s http://localhost:8080 tunnel 8888 mypath &
./webrtc-piping -s http://localhost:8080 tunnel -l 9999 mypath &
sleep 1
curl -fsS localhost:9999
curl -fsS localhost:9999
- name: Duplex communication
run: |
set -eux
(echo hello1 | ./webrtc-piping -s http://localhost:8080 duplex path1 path2 > peer1-out.txt) &
(echo hello2 | ./webrtc-piping -s http://localhost:8080 duplex path2 path1 > peer2-out.txt) &
sleep 1
diff <(echo hello2) peer1-out.txt
diff <(echo hello1) peer2-out.txt
- name: Peer1 TCP tunneling
run: |
set -eu
path=$(echo ${{ secrets.PATH_SALT }} ${{ github.sha }} | sha256sum | cut -d' ' -f1)
./webrtc-piping -s https://ppng.io --ice-servers='[{"urls": "stun:stun.l.google.com:19302"}]' tunnel 8888 ${path} &
sleep 10
operational_test_peer2:
runs-on: ubuntu-20.04
timeout-minutes: 2
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
- run: CGO_ENABLED=0 go build -o webrtc-piping main.go
- name: Peer2 TCP tunneling
run: |
set -eu
path=$(echo ${{ secrets.PATH_SALT }} ${{ github.sha }} | sha256sum | cut -d' ' -f1)
./webrtc-piping -s https://ppng.io --ice-servers='[{"urls": "stun:stun.l.google.com:19302"}]' tunnel -l 9999 ${path} &
sleep 1
curl -fsS localhost:9999
curl -fsS localhost:9999