Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2049a88
feat: add Linux desktop support to firebase_core, auth, firestore, da…
akshaynexus Jul 17, 2026
61cdba4
fix(linux): resolve static link failures with single --start-group SD…
akshaynexus Jul 17, 2026
329b473
fix(linux): expose Firebase SDK headers PUBLIC from firebase_core; dr…
akshaynexus Jul 18, 2026
b3f9a8c
chore: restore font_awesome_flutter dep in auth example
akshaynexus Jul 18, 2026
22df197
fix(auth): bump font_awesome_flutter to ^11.0.0 in example
akshaynexus Jul 18, 2026
8ff93c2
test(linux): add Linux runner to tests app
akshaynexus Jul 18, 2026
9b6f874
chore(auth): bump flutter_signin_button to ^2.1.1 in example
akshaynexus Jul 18, 2026
9679156
fix(auth): use latest font_awesome_flutter 11 + flutter_signin_button…
akshaynexus Jul 18, 2026
86ff00a
chore: correct copyright year in new Linux sources
akshaynexus Jul 18, 2026
375c612
ci(linux): align workflow with zizmor policy
akshaynexus Jul 18, 2026
c1f35df
fix(ci): add license headers to Linux runner sources and apply clang-…
akshaynexus Jul 20, 2026
3a8c5b3
fix(core,linux): regenerate CoreFirebaseOptions codec with recaptchaS…
akshaynexus Jul 20, 2026
9d1deee
feat(functions,linux): implement Cloud Functions for Linux desktop
akshaynexus Jul 20, 2026
510fdcd
Merge branch 'firebase:main' into add-linux-support
akshaynexus Jul 21, 2026
95930c3
test(linux): run e2e suites on Linux desktop
akshaynexus Jul 21, 2026
58c0d36
Merge remote-tracking branch 'upstream/main' into add-linux-support
akshaynexus Jul 21, 2026
ea41078
test(linux): harden e2e suites for the Linux desktop run
akshaynexus Jul 21, 2026
506a112
fix(functions,storage,linux): enforce call timeouts; report unimpleme…
akshaynexus Jul 21, 2026
b5ae539
fix(firestore,linux): encode Firestore blobs as codec custom type
akshaynexus Jul 21, 2026
006893d
Update README.md
akshaynexus Jul 21, 2026
de5f4b6
refactor(functions,linux): drop local Functions instance cache
akshaynexus Jul 21, 2026
784f95e
refactor(firestore,linux): use g_warning for unsupported aggregate wa…
akshaynexus Jul 21, 2026
3844cb3
refactor(firestore,linux): replace remaining std::cerr logging with g…
akshaynexus Jul 21, 2026
623c654
fix(linux): review-round hardening across desktop plugins
akshaynexus Jul 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: e2e-linux

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-linux
cancel-in-progress: true

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'website/**'
- '**/example/**'
- '!**/example/integration_test/**'
- '**/flutterfire_ui/**'
- '**.md'
push:
branches:
- main
paths-ignore:
- 'docs/**'
- 'website/**'
- '**/example/**'
- '!**/example/integration_test/**'
- '**/flutterfire_ui/**'
- '**.md'
workflow_call:
inputs:
nightly_test_mode:
type: boolean
default: false

permissions:
contents: read

jobs:
linux:
runs-on: ubuntu-latest
timeout-minutes: ${{ inputs.nightly_test_mode && 5 || 45 }}
strategy:
fail-fast: false
matrix:
working_directory:
['tests', 'packages/cloud_firestore/cloud_firestore/example']
exclude:
- working_directory: ${{ inputs.nightly_test_mode && 'packages/cloud_firestore/cloud_firestore/example' || 'none' }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- uses: actions/setup-java@1bcf9fb12cf4aa7d266a90ae39939e61372fe520
with:
distribution: 'temurin'
java-version: '21'
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a
name: Install Node.js 20
with:
node-version: '20'
- name: "Install Linux desktop build dependencies"
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libgtk-3-dev libsecret-1-dev xvfb
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2
with:
channel: 'stable'
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:"
pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:"
- uses: bluefireteam/melos-action@705015c3d2bc4ab94201ac24accb2bbe070cf533
with:
run-bootstrap: false
melos-version: '5.3.0'
- name: "Bootstrap package"
run: melos bootstrap --scope tests && melos bootstrap --scope "cloud_firestore*"
- name: "Install Tools"
run: npm install -g firebase-tools
- name: "Build Application"
working-directory: ${{ matrix.working_directory }}
run: flutter build linux --debug --target=./integration_test/e2e_test.dart --dart-define=CI=true
- name: Start Firebase Emulator and run tests
working-directory: ./.github/workflows/scripts
env:
WORKDIR: ${{ matrix.working_directory }}
run: |
firebase emulators:exec --project flutterfire-e2e-tests \
"cd \"$GITHUB_WORKSPACE/$WORKDIR\" && xvfb-run -a flutter test integration_test/e2e_test.dart -d linux --dart-define=CI=true --timeout 10x"
38 changes: 19 additions & 19 deletions README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/cloud_firestore/cloud_firestore/example/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ migration:
- platform: web
create_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
base_revision: a14f74ff3a1cbd521163c5f03d68113d50af93d3
- platform: linux
create_revision: ad70ec4617166f1c38e5d2bfd388af71fda14f06
base_revision: ad70ec4617166f1c38e5d2bfd388af71fda14f06

# User provided section

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
import 'dart:math';

import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

import 'platform_utils.dart';

void runCollectionReferenceTests() {
group('$CollectionReference', () {
late FirebaseFirestore firestore;
Expand Down Expand Up @@ -80,7 +81,7 @@ void runCollectionReferenceTests() {
]),
);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

group(
Expand Down Expand Up @@ -205,7 +206,7 @@ void runCollectionReferenceTests() {
},
);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

import 'platform_utils.dart';

void runDocumentChangeTests() {
group('$DocumentChange', () {
late FirebaseFirestore firestore;
Expand Down Expand Up @@ -81,7 +83,7 @@ void runDocumentChangeTests() {
);
},
timeout: const Timeout.factor(8),
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

test(
Expand Down Expand Up @@ -132,8 +134,7 @@ void runDocumentChangeTests() {
expect(removeChange.type, equals(DocumentChangeType.removed));
expect(removeChange.doc.data()!['name'], equals('doc1'));
},
skip: defaultTargetPlatform == TargetPlatform.windows ||
defaultTargetPlatform == TargetPlatform.android,
skip: isDesktopCppSdk || defaultTargetPlatform == TargetPlatform.android,
);

test(
Expand Down Expand Up @@ -190,7 +191,7 @@ void runDocumentChangeTests() {
expect(change.type, equals(DocumentChangeType.modified));
expect(change.doc.id, equals('doc1'));
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

import 'platform_utils.dart';

void runDocumentReferenceTests() {
group('$DocumentReference', () {
late FirebaseFirestore firestore;
Expand Down Expand Up @@ -113,7 +115,7 @@ void runDocumentReferenceTests() {
},
// Listening from cache is not supported on Windows (see
// DocumentReference.snapshots in cloud_firestore).
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

test(
Expand Down Expand Up @@ -142,7 +144,7 @@ void runDocumentReferenceTests() {
});
},
// Listening from cache is not supported on Windows.
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

test('listens to multiple documents', () async {
Expand Down Expand Up @@ -453,8 +455,7 @@ void runDocumentReferenceTests() {
'null': null,
'timestamp': Timestamp.now(),
'geopoint': const GeoPoint(1, 2),
if (defaultTargetPlatform != TargetPlatform.windows)
'vectorValue': const VectorValue([1, 2, 3]),
if (!isDesktopCppSdk) 'vectorValue': const VectorValue([1, 2, 3]),
'reference': firestore.doc('foo/bar'),
'nan': double.nan,
'infinity': double.infinity,
Expand Down Expand Up @@ -491,7 +492,7 @@ void runDocumentReferenceTests() {
expect(data['geopoint'], isA<GeoPoint>());
expect((data['geopoint'] as GeoPoint).latitude, equals(1));
expect((data['geopoint'] as GeoPoint).longitude, equals(2));
if (defaultTargetPlatform != TargetPlatform.windows) {
if (!isDesktopCppSdk) {
expect(data['vectorValue'], isA<VectorValue>());
expect(
(data['vectorValue'] as VectorValue).toArray(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import 'firebase_options.dart';
import 'geo_point_e2e.dart';
import 'instance_e2e.dart';
import 'load_bundle_e2e.dart';
import 'platform_utils.dart';
import 'query_e2e.dart';
import 'second_database.dart';
import 'settings_e2e.dart';
Expand Down Expand Up @@ -61,7 +62,7 @@ void main() {
runWriteBatchTests();
runLoadBundleTests();
runWebSnapshotListenersTests();
if (defaultTargetPlatform != TargetPlatform.windows) {
if (!isDesktopCppSdk) {
runSecondDatabaseTests();
}
if (kIsWeb) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ class DefaultFirebaseOptions {
TargetPlatform.iOS => ios,
TargetPlatform.macOS => macos,
TargetPlatform.windows => android,
TargetPlatform.linux => throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
),
TargetPlatform.linux => android,
_ => throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class DefaultFirebaseOptions {
TargetPlatform.iOS => ios,
TargetPlatform.macOS => macos,
TargetPlatform.windows => android,
TargetPlatform.linux => android,
_ => throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';

import 'platform_utils.dart';

void runInstanceTests() {
group(
'$FirebaseFirestore.instance',
Expand Down Expand Up @@ -213,7 +215,7 @@ void runInstanceTests() {
// ignore: experimental_member_use
await firestore.setIndexConfigurationFromJSON(json);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

test('setLoggingEnabled should resolve without issue', () async {
Expand Down Expand Up @@ -266,7 +268,7 @@ void runInstanceTests() {
test(
'`PersistenceCacheIndexManager` with default persistence settings for each platform',
() async {
if (defaultTargetPlatform == TargetPlatform.windows) {
if (isDesktopCppSdk) {
try {
// Windows does not have `PersistenceCacheIndexManager` support
FirebaseFirestore.instance.persistentCacheIndexManager();
Expand Down Expand Up @@ -346,7 +348,7 @@ void runInstanceTests() {
await indexManager.deleteAllIndexes();
}
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);

test(
Expand Down Expand Up @@ -376,7 +378,7 @@ void runInstanceTests() {
expect(indexManager, isNull);
}
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:http/http.dart' as http;

import 'platform_utils.dart';

void runLoadBundleTests() {
group('$DocumentReference', () {
late FirebaseFirestore firestore;
Expand Down Expand Up @@ -134,7 +136,7 @@ void runLoadBundleTests() {
),
);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
});

Expand Down Expand Up @@ -185,7 +187,7 @@ void runLoadBundleTests() {
),
);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
});

Expand Down Expand Up @@ -236,7 +238,7 @@ void runLoadBundleTests() {
),
);
},
skip: defaultTargetPlatform == TargetPlatform.windows,
skip: isDesktopCppSdk,
);
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright 2026, the Chromium project authors. Please see the AUTHORS file
Comment thread
akshaynexus marked this conversation as resolved.
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'package:flutter/foundation.dart';

/// Whether the tests are running against the desktop implementations backed by
/// the Firebase C++ SDK (Windows and Linux). Both platforms share the same
/// C++ SDK, so they have identical feature limitations in the e2e suites.
///
/// The `!kIsWeb` check matters because web e2e tests run on Linux CI runners,
/// where `defaultTargetPlatform` reports [TargetPlatform.linux].
bool get isDesktopCppSdk =>
!kIsWeb &&
(defaultTargetPlatform == TargetPlatform.windows ||
defaultTargetPlatform == TargetPlatform.linux);
Loading
Loading