Files
olcrtc/.github/workflows/ci.yml

236 lines
5.9 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
pull_request:
branches: ["main", "master"]
schedule:
# Nightly full E2E - 00:17 UTC (03:17 MSK)
- cron: "17 0 * * *"
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Run tests
run: go test -count=1 ./...
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Run tests with coverage
run: go test -count=1 ./... --cover
race:
name: Test (-race)
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Run tests with -race
run: go test -count=1 -race ./...
real-e2e:
name: Real E2E (Providers x Transports)
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Install media tools
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run real provider e2e matrix
run: |
go test -count=1 -v ./internal/e2e \
-olcrtc.real-carriers=telemost,wbstream,jitsi \
-run '^TestRealProviderTransportMatrix$' \
-olcrtc.real-e2e
stress-soak:
name: Real E2E Stress Soak (Nightly)
# Long-form stress over real carriers: only on schedule or manual
# dispatch. Push and PR runs stay fast.
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Install media tools
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run real stress soak
run: |
go test -count=1 -v ./internal/e2e \
-run '^TestRealProviderTransportStress$' \
-timeout=85m \
-olcrtc.real-e2e \
-olcrtc.stress \
-olcrtc.real-carriers=telemost,wbstream,jitsi \
-olcrtc.stress-bulk-duration=90s \
-olcrtc.stress-duration=120s \
-olcrtc.stress-echo-size=1024 \
-olcrtc.stress-case-timeout=8m
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: golangci-lint
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
$(go env GOPATH)/bin/golangci-lint run --timeout=5m
build-cli:
name: Build CLI (Binaries)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Install Mage
run: go install github.com/magefile/mage@latest
- name: Build CLI (Cross)
run: mage cross
- name: Upload CLI Artifacts
uses: actions/upload-artifact@v4
with:
name: olcrtc-cli-binaries
path: build/
build-android:
name: Build Android (AAR)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
- name: Install gomobile
run: |
go install golang.org/x/mobile/cmd/gomobile@latest
gomobile init
- name: Install Mage
run: go install github.com/magefile/mage@latest
- name: Build Mobile
run: mage mobile
- name: Upload Android Artifact
uses: actions/upload-artifact@v4
with:
name: olcrtc-android
path: build/olcrtc.aar
nightly-soak:
name: Nightly Soak (All Carriers × Transports)
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26.x"
- name: Install media tools
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Run real soak (all carriers × dc+vp8, 10m each)
run: |
go test -count=1 -v ./internal/e2e \
-run '^TestRealThroughputSoak$' \
-timeout=170m \
-olcrtc.real-e2e \
-olcrtc.real-soak \
-olcrtc.real-soak-carrier=telemost,jitsi,wbstream \
-olcrtc.real-soak-transport=datachannel,vp8channel \
-olcrtc.real-soak-duration=10m
- name: Run local soak with chaos (all transports, 6m, reconnect every 30s)
run: |
go test -count=1 -v ./internal/e2e \
-run '^TestLocalThroughputSoak$' \
-timeout=60m \
-olcrtc.local-soak \
-olcrtc.local-soak-transport=all \
-olcrtc.local-soak-duration=6m \
-olcrtc.local-soak-chaos=30s