Repository navigation
120 lines (113 loc) · 3.5 KB
/
Copy pathci.yml
File metadata and controls
120 lines (113 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
# The release workflow runs this as its test gate.
workflow_call:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Analyze and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- name: Lobby server
working-directory: server
run: |
dart pub get
dart analyze
dart test
real-webrtc:
# Two sessions over real flutter_webrtc on the Linux desktop: the unit
# tests use a fake adapter, and this is what catches platform differences.
name: Real WebRTC (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Linux desktop dependencies
# gstreamer: audioplayers_linux. weston: the headless Wayland display.
# pulseaudio: the app aborts at startup with no audio server to open.
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config \
libgtk-3-dev liblzma-dev libstdc++-12-dev libpulse-dev \
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
weston pulseaudio
- name: Audio server
# A private runtime dir, so the app and the daemon agree on where the
# pulse socket is. A null sink stands in for a sound card.
run: |
export XDG_RUNTIME_DIR="$RUNNER_TEMP/xdg"
mkdir -p -m 700 "$XDG_RUNTIME_DIR"
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR" >> "$GITHUB_ENV"
pulseaudio --daemonize --exit-idle-time=-1
pactl load-module module-null-sink sink_name=ci
pactl set-default-sink ci
- run: flutter pub get
- run: scripts/with-weston.sh flutter test integration_test/real_webrtc_test.dart -d linux
build-web:
name: Build web
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- name: Build
# Self-contained (no CDN) so the COOP/COEP headers in the Caddyfile
# cannot block the renderer.
run: >-
flutter build web --wasm --no-web-resources-cdn
--dart-define=GIT_SHA=${{ github.sha }}
- uses: actions/upload-artifact@v7
with:
name: web
path: build/web
build-android:
name: Build Android
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: 21
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: >-
flutter build apk --release
--dart-define=GIT_SHA=${{ github.sha }}
- uses: actions/upload-artifact@v7
with:
name: android-apk
path: build/app/outputs/flutter-apk/app-release.apk
lobby-image:
name: Lobby image
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v7
- run: docker build -f server/deploy/Dockerfile server