Skip to content

Commit 26c06c9

Browse files
authored
ci: Run CI on all platforms (#1162)
* ci: Run CI on all platforms * fix * fix linux build * use sudo * run on Android * fix android build
1 parent cc26ce5 commit 26c06c9

File tree

16 files changed

+296
-37
lines changed

16 files changed

+296
-37
lines changed

.github/workflows/supabase_flutter.yml

Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ permissions:
3232

3333
jobs:
3434
test:
35-
name: Test Flutter v${{ matrix.flutter-version }}
35+
name: Test Flutter v${{ matrix.flutter-version }} on ${{ matrix.os }}
3636
strategy:
3737
fail-fast: false
3838
matrix:
39-
os: [ubuntu-latest]
39+
os: [ubuntu-latest, macos-latest, windows-latest]
4040
flutter-version: ['3.19.x', '3.x']
4141

4242
defaults:
@@ -46,47 +46,81 @@ jobs:
4646
runs-on: ${{ matrix.os }}
4747

4848
steps:
49-
- name: Checks-out repo
49+
- name: Checkout repository
5050
uses: actions/checkout@v4
5151

52-
- uses: subosito/flutter-action@v2
52+
- name: Setup Flutter
53+
uses: subosito/flutter-action@v2
5354
with:
5455
flutter-version: ${{ matrix.flutter-version }}
5556
channel: 'stable'
5657

57-
- run: flutter --version
58+
- name: Show Flutter version
59+
run: flutter --version
5860

5961
- name: Bootstrap workspace
6062
run: |
6163
cd ../../
6264
dart pub global activate melos
6365
melos bootstrap
6466
65-
- name: flutterfmt
67+
- name: Run formatter
6668
if: ${{ matrix.flutter-version == '3.x'}}
6769
run: dart format lib test -l 80 --set-exit-if-changed
6870

69-
- name: analyzer
71+
- name: Run analyzer
7072
if: ${{ matrix.flutter-version == '3.x'}}
7173
run: flutter analyze --fatal-warnings --fatal-infos .
7274

73-
- name: Run tests
75+
- name: Run unit tests
7476
run: flutter test --concurrency=1
7577

76-
- name: Run tests on chrome with js
77-
if: ${{ matrix.flutter-version == '3.x'}}
78-
run: flutter test --platform chrome
79-
80-
- name: Run tests on chrome with wasm
81-
if: ${{ matrix.flutter-version == '3.x'}}
82-
run: flutter test --platform chrome --wasm
83-
8478
- name: Run tests with downgraded app_links
8579
run: |
8680
flutter pub downgrade app_links
8781
flutter test --concurrency=1
8882
89-
- name: Verify if Flutter web build is successful
83+
- name: Build and test web (JS)
84+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
85+
run: |
86+
flutter test --platform chrome
87+
cd example && flutter build web
88+
89+
- name: Build and test web (WASM)
90+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
91+
run: |
92+
flutter test --platform chrome --wasm
93+
cd example && flutter build web --wasm
94+
95+
- name: Build macOS app
96+
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}}
97+
run: |
98+
cd example
99+
flutter build macos
100+
101+
- name: Build Windows app
102+
if: ${{ matrix.os == 'windows-latest' && matrix.flutter-version == '3.x'}}
103+
run: |
104+
cd example
105+
flutter build windows
106+
107+
- name: Build Linux app
108+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
109+
run: |
110+
sudo apt-get update
111+
sudo apt-get install -y libgtk-3-dev libblkid-dev liblzma-dev
112+
cd example
113+
flutter build linux
114+
115+
- name: Build iOS app
116+
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}}
117+
run: |
118+
cd example
119+
flutter build ios --no-codesign
120+
121+
- name: Build Android app
122+
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}}
90123
run: |
91124
cd example
92-
flutter build web
125+
flutter build apk
126+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
kotlin.version=2.1.20

packages/supabase_flutter/example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip

packages/supabase_flutter/example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ pluginManagement {
1818

1919
plugins {
2020
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
21-
id "com.android.application" version "7.3.0" apply false
22-
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
21+
id "com.android.application" version "8.1.0" apply false
22+
id "org.jetbrains.kotlin.android" version "2.1.20" apply false
2323
}
2424

2525
include ":app"

packages/supabase_flutter/example/ios/Flutter/AppFrameworkInfo.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
<key>CFBundleVersion</key>
2222
<string>1.0</string>
2323
<key>MinimumOSVersion</key>
24-
<string>9.0</string>
24+
<string>12.0</string>
2525
</dict>
2626
</plist>

packages/supabase_flutter/example/ios/Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Uncomment this line to define a global platform for your project
2-
# platform :ios, '9.0'
2+
# platform :ios, '12.0'
33

44
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
55
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
PODS:
2+
- app_links (0.0.2):
3+
- Flutter
4+
- Flutter (1.0.0)
5+
- path_provider_foundation (0.0.1):
6+
- Flutter
7+
- FlutterMacOS
8+
- shared_preferences_foundation (0.0.1):
9+
- Flutter
10+
- FlutterMacOS
11+
- url_launcher_ios (0.0.1):
12+
- Flutter
13+
14+
DEPENDENCIES:
15+
- app_links (from `.symlinks/plugins/app_links/ios`)
16+
- Flutter (from `Flutter`)
17+
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
18+
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
19+
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
20+
21+
EXTERNAL SOURCES:
22+
app_links:
23+
:path: ".symlinks/plugins/app_links/ios"
24+
Flutter:
25+
:path: Flutter
26+
path_provider_foundation:
27+
:path: ".symlinks/plugins/path_provider_foundation/darwin"
28+
shared_preferences_foundation:
29+
:path: ".symlinks/plugins/shared_preferences_foundation/darwin"
30+
url_launcher_ios:
31+
:path: ".symlinks/plugins/url_launcher_ios/ios"
32+
33+
SPEC CHECKSUMS:
34+
app_links: f3e17e4ee5e357b39d8b95290a9b2c299fca71c6
35+
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
36+
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
37+
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
38+
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
39+
40+
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011
41+
42+
COCOAPODS: 1.15.2

packages/supabase_flutter/example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 50;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
1010
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1111
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12+
5C86DE89EB321645D8A407BB /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89CEA82799D734CC486F5D5A /* Pods_Runner.framework */; };
1213
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
1314
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
1415
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
@@ -31,30 +32,54 @@
3132
/* Begin PBXFileReference section */
3233
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
3334
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
35+
30FDA3F5BEC6015DB035C81F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
3436
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3537
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
3638
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
3739
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
40+
89CEA82799D734CC486F5D5A /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3841
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
3942
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
4043
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
4144
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
4245
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
4346
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4447
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
48+
9F7A42A0F8397A30C48EF6B6 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
49+
FC8416E7A50F84EA287634DD /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
4550
/* End PBXFileReference section */
4651

4752
/* Begin PBXFrameworksBuildPhase section */
4853
97C146EB1CF9000F007C117D /* Frameworks */ = {
4954
isa = PBXFrameworksBuildPhase;
5055
buildActionMask = 2147483647;
5156
files = (
57+
5C86DE89EB321645D8A407BB /* Pods_Runner.framework in Frameworks */,
5258
);
5359
runOnlyForDeploymentPostprocessing = 0;
5460
};
5561
/* End PBXFrameworksBuildPhase section */
5662

5763
/* Begin PBXGroup section */
64+
26183A2CE09CC2DB5377CFB5 /* Pods */ = {
65+
isa = PBXGroup;
66+
children = (
67+
30FDA3F5BEC6015DB035C81F /* Pods-Runner.debug.xcconfig */,
68+
9F7A42A0F8397A30C48EF6B6 /* Pods-Runner.release.xcconfig */,
69+
FC8416E7A50F84EA287634DD /* Pods-Runner.profile.xcconfig */,
70+
);
71+
name = Pods;
72+
path = Pods;
73+
sourceTree = "<group>";
74+
};
75+
286867CA0283BA2B6B97F0D0 /* Frameworks */ = {
76+
isa = PBXGroup;
77+
children = (
78+
89CEA82799D734CC486F5D5A /* Pods_Runner.framework */,
79+
);
80+
name = Frameworks;
81+
sourceTree = "<group>";
82+
};
5883
9740EEB11CF90186004384FC /* Flutter */ = {
5984
isa = PBXGroup;
6085
children = (
@@ -72,6 +97,8 @@
7297
9740EEB11CF90186004384FC /* Flutter */,
7398
97C146F01CF9000F007C117D /* Runner */,
7499
97C146EF1CF9000F007C117D /* Products */,
100+
26183A2CE09CC2DB5377CFB5 /* Pods */,
101+
286867CA0283BA2B6B97F0D0 /* Frameworks */,
75102
);
76103
sourceTree = "<group>";
77104
};
@@ -105,12 +132,14 @@
105132
isa = PBXNativeTarget;
106133
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107134
buildPhases = (
135+
480B690171218F5B3D5C4D32 /* [CP] Check Pods Manifest.lock */,
108136
9740EEB61CF901F6004384FC /* Run Script */,
109137
97C146EA1CF9000F007C117D /* Sources */,
110138
97C146EB1CF9000F007C117D /* Frameworks */,
111139
97C146EC1CF9000F007C117D /* Resources */,
112140
9705A1C41CF9048500538489 /* Embed Frameworks */,
113141
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142+
CCD9ADE3A12B55EB0481C7FA /* [CP] Embed Pods Frameworks */,
114143
);
115144
buildRules = (
116145
);
@@ -127,7 +156,7 @@
127156
97C146E61CF9000F007C117D /* Project object */ = {
128157
isa = PBXProject;
129158
attributes = {
130-
LastUpgradeCheck = 1300;
159+
LastUpgradeCheck = 1510;
131160
ORGANIZATIONNAME = "";
132161
TargetAttributes = {
133162
97C146ED1CF9000F007C117D = {
@@ -171,10 +200,12 @@
171200
/* Begin PBXShellScriptBuildPhase section */
172201
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173202
isa = PBXShellScriptBuildPhase;
203+
alwaysOutOfDate = 1;
174204
buildActionMask = 2147483647;
175205
files = (
176206
);
177207
inputPaths = (
208+
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
178209
);
179210
name = "Thin Binary";
180211
outputPaths = (
@@ -183,8 +214,31 @@
183214
shellPath = /bin/sh;
184215
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185216
};
217+
480B690171218F5B3D5C4D32 /* [CP] Check Pods Manifest.lock */ = {
218+
isa = PBXShellScriptBuildPhase;
219+
buildActionMask = 2147483647;
220+
files = (
221+
);
222+
inputFileListPaths = (
223+
);
224+
inputPaths = (
225+
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
226+
"${PODS_ROOT}/Manifest.lock",
227+
);
228+
name = "[CP] Check Pods Manifest.lock";
229+
outputFileListPaths = (
230+
);
231+
outputPaths = (
232+
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
233+
);
234+
runOnlyForDeploymentPostprocessing = 0;
235+
shellPath = /bin/sh;
236+
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
237+
showEnvVarsInLog = 0;
238+
};
186239
9740EEB61CF901F6004384FC /* Run Script */ = {
187240
isa = PBXShellScriptBuildPhase;
241+
alwaysOutOfDate = 1;
188242
buildActionMask = 2147483647;
189243
files = (
190244
);
@@ -197,6 +251,23 @@
197251
shellPath = /bin/sh;
198252
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199253
};
254+
CCD9ADE3A12B55EB0481C7FA /* [CP] Embed Pods Frameworks */ = {
255+
isa = PBXShellScriptBuildPhase;
256+
buildActionMask = 2147483647;
257+
files = (
258+
);
259+
inputFileListPaths = (
260+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
261+
);
262+
name = "[CP] Embed Pods Frameworks";
263+
outputFileListPaths = (
264+
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
265+
);
266+
runOnlyForDeploymentPostprocessing = 0;
267+
shellPath = /bin/sh;
268+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
269+
showEnvVarsInLog = 0;
270+
};
200271
/* End PBXShellScriptBuildPhase section */
201272

202273
/* Begin PBXSourcesBuildPhase section */
@@ -272,7 +343,7 @@
272343
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273344
GCC_WARN_UNUSED_FUNCTION = YES;
274345
GCC_WARN_UNUSED_VARIABLE = YES;
275-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
346+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
276347
MTL_ENABLE_DEBUG_INFO = NO;
277348
SDKROOT = iphoneos;
278349
SUPPORTED_PLATFORMS = iphoneos;
@@ -349,7 +420,7 @@
349420
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
350421
GCC_WARN_UNUSED_FUNCTION = YES;
351422
GCC_WARN_UNUSED_VARIABLE = YES;
352-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
423+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
353424
MTL_ENABLE_DEBUG_INFO = YES;
354425
ONLY_ACTIVE_ARCH = YES;
355426
SDKROOT = iphoneos;
@@ -398,7 +469,7 @@
398469
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
399470
GCC_WARN_UNUSED_FUNCTION = YES;
400471
GCC_WARN_UNUSED_VARIABLE = YES;
401-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
472+
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
402473
MTL_ENABLE_DEBUG_INFO = NO;
403474
SDKROOT = iphoneos;
404475
SUPPORTED_PLATFORMS = iphoneos;

0 commit comments

Comments
 (0)