-
Notifications
You must be signed in to change notification settings - Fork 4
152 lines (124 loc) · 4.43 KB
/
test.yml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: Test Suite
on:
push:
branches:
- main
- jigar/setup-test-suite
# pull_request:
# branches:
# - main
env:
GOPRIVATE: github.com/getlantern
jobs:
test-suite:
runs-on: ubuntu-latest-16-cores
# runs-on: macos-13-large
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
lfs: true
- name: Pull LFS objects
run: git lfs pull
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
- name: Granting private modules access
run: git config --global url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "https://github.com/"
- name: GCloud Auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
- name: 'Set up Cloud SDK'
uses: google-github-actions/setup-gcloud@v2
- name: Setup protoc
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install latest protoc-gen-go
run: go install github.com/golang/protobuf/protoc-gen-go@latest
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: 'gradle'
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Activate dart plugins
run: |
dart pub global activate protoc_plugin
dart pub global activate patrol_cli
- name: Install dependencies
run: flutter pub get
- name: Generate app.env
env:
ANDROID_INTERSTITIAL_AD_ID: ${{ secrets.INTERSTITIAL_AD_UNIT_ID }}
IOS_INTERSTITIAL_AD_ID: ${{ secrets.INTERSTITIAL_AD_UNIT_ID_IOS }}
TAPSELL_VIDEO_INTERSTITIAL_ZONE_ID: ${{ secrets.TAPSELL_VIDEO_INTERSTITIAL_ZONE_ID }}
TAPSELL_INTERSTITIAL_ZONE_ID: ${{ secrets.TAPSELL_INTERSTITIAL_ZONE_ID }}
run: |
touch app.env
echo "Android_interstitialAd=$ANDROID_INTERSTITIAL_AD_ID" > app.env
echo "IOS_interstitialAd=$IOS_INTERSTITIAL_AD_ID" >> app.env
echo "VideoInterstitialZoneId=$TAPSELL_VIDEO_INTERSTITIAL_ZONE_ID" >> app.env
echo "InterstitialZoneId=$TAPSELL_INTERSTITIAL_ZONE_ID" >> app.env
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
if: runner.os == 'macOS'
with:
xcode-version: latest-stable
- name: Install Linux dependencies
if: runner.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y network-manager dbus-x11
sudo apt-get install -y libwebkit2gtk-4.1-dev
sudo apt-get install -y libunwind-dev libstdc++-12-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-d cmake
sudo apt-get install -y libgtk-3-0 libblkid1 liblzma5
sudo apt-get install -y libpcap-dev libgtk-3-dev libayatana-appindicator3-dev ruby ruby-dev && sudo gem install bundler -v 2.2.26
- name: Install the ninja build tool
if: runner.os == 'linux'
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build Libraries
run: |
make android ANDROID_ARCH=all
echo "Building macos libraries"
if [[ "$RUNNER_OS" == "macOS" ]]; then
make macos
elif [[ "$RUNNER_OS" == "Linux" ]]; then
make linux
elif [[ "$RUNNER_OS" == "Windows" ]]; then
make windows
fi
make ffigen
# - name: Running widget tests
# run: make widget-tests
- name: Check disk space
run: df -h
- name: Clean up space
run: |
rm -rf ~/.gradle/caches
sudo rm -rf /tmp/*
flutter clean
flutter pub get
- name: Check disk space
run: df -h
- name: Running workflow test for android on Firebase test labs
run: make ci-android-test
- name: Running workflow test for macos
run: make desktopWorkflowTest
if: runner.os == 'macOS'
timeout-minutes: 60
- name: Running workflow test for linux
uses: coactions/setup-xvfb@v1
if: runner.os == 'linux'
timeout-minutes: 60
with:
run: |
sudo systemctl start dbus
sudo systemctl start NetworkManager
make linuxDesktopTest