Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
130 changes: 130 additions & 0 deletions .github/workflows/pr_build_all_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
name: Build PR Artifacts

on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review

permissions:
contents: read

concurrency:
group: pr-build-artifacts-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
APP_DIR: open_wearable

jobs:
build_ubuntu_targets:
name: Build Android, Linux, and Web
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: "17"
cache: gradle

- name: Install Linux build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
clang \
cmake \
libgtk-3-dev \
ninja-build \
pkg-config

- name: Read Flutter version
run: echo "flutter_version=$(cat $APP_DIR/.flutter_version)" >> "$GITHUB_ENV"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.flutter_version }}
cache: true

- name: Install dependencies
working-directory: ${{ env.APP_DIR }}
run: flutter pub get

- name: Analyze project
working-directory: ${{ env.APP_DIR }}
run: flutter analyze

- name: Build Android APK
working-directory: ${{ env.APP_DIR }}
run: flutter build apk --release

- name: Build Linux bundle
working-directory: ${{ env.APP_DIR }}
run: flutter build linux --release

- name: Build Web bundle
working-directory: ${{ env.APP_DIR }}
run: flutter build web --release

- name: Upload Android APK
uses: actions/upload-artifact@v4
with:
name: android-apk
path: open_wearable/build/app/outputs/flutter-apk/app-release.apk
if-no-files-found: error

- name: Upload Linux bundle
uses: actions/upload-artifact@v4
with:
name: linux-bundle
path: open_wearable/build/linux/x64/release/bundle
if-no-files-found: error

- name: Upload Web bundle
uses: actions/upload-artifact@v4
with:
name: web-bundle
path: open_wearable/build/web
if-no-files-found: error

build_windows_target:
name: Build Windows
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Read Flutter version
shell: bash
run: echo "flutter_version=$(cat $APP_DIR/.flutter_version)" >> "$GITHUB_ENV"

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ env.flutter_version }}
cache: true

- name: Install dependencies
working-directory: ${{ env.APP_DIR }}
run: flutter pub get

- name: Build Windows runner
working-directory: ${{ env.APP_DIR }}
run: flutter build windows --release

- name: Upload Windows runner
uses: actions/upload-artifact@v4
with:
name: windows-runner
path: open_wearable/build/windows/x64/runner/Release
if-no-files-found: error
2 changes: 2 additions & 0 deletions open_wearable/macos/Flutter/GeneratedPluginRegistrant.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import file_picker
import file_selector_macos
import flutter_archive
import open_file_mac
import path_provider_foundation
import share_plus
import shared_preferences_foundation
import universal_ble
Expand All @@ -19,6 +20,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FlutterArchivePlugin.register(with: registry.registrar(forPlugin: "FlutterArchivePlugin"))
OpenFilePlugin.register(with: registry.registrar(forPlugin: "OpenFilePlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))
SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
UniversalBlePlugin.register(with: registry.registrar(forPlugin: "UniversalBlePlugin"))
Expand Down
72 changes: 12 additions & 60 deletions open_wearable/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: characters
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
url: "https://pub.dev"
source: hosted
version: "1.4.1"
version: "1.4.0"
clock:
dependency: transitive
description:
Expand All @@ -57,14 +57,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.2"
code_assets:
dependency: transitive
description:
name: code_assets
sha256: "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
collection:
dependency: transitive
description:
Expand Down Expand Up @@ -336,14 +328,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
glob:
dependency: transitive
description:
name: glob
sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de
url: "https://pub.dev"
source: hosted
version: "2.1.3"
go_router:
dependency: "direct main"
description:
Expand All @@ -352,14 +336,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "14.8.1"
hooks:
dependency: transitive
description:
name: hooks
sha256: "7a08a0d684cb3b8fb604b78455d5d352f502b68079f7b80b831c62220ab0a4f6"
url: "https://pub.dev"
source: hosted
version: "1.0.1"
http:
dependency: "direct main"
description:
Expand Down Expand Up @@ -444,18 +420,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6"
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
url: "https://pub.dev"
source: hosted
version: "0.12.18"
version: "0.12.17"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
url: "https://pub.dev"
source: hosted
version: "0.13.0"
version: "0.11.1"
mcumgr_flutter:
dependency: "direct main"
description:
Expand All @@ -480,14 +456,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
native_toolchain_c:
dependency: transitive
description:
name: native_toolchain_c
sha256: "89e83885ba09da5fdf2cdacc8002a712ca238c28b7f717910b34bcd27b0d03ac"
url: "https://pub.dev"
source: hosted
version: "0.17.4"
nested:
dependency: transitive
description:
Expand All @@ -496,14 +464,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.0"
objective_c:
dependency: transitive
description:
name: objective_c
sha256: "983c7fa1501f6dcc0cb7af4e42072e9993cb28d73604d25ebf4dab08165d997e"
url: "https://pub.dev"
source: hosted
version: "9.2.5"
open_earable_flutter:
dependency: "direct main"
description:
Expand Down Expand Up @@ -612,10 +572,10 @@ packages:
dependency: transitive
description:
name: path_provider_foundation
sha256: "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699"
sha256: "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4"
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.5.1"
path_provider_linux:
dependency: transitive
description:
Expand Down Expand Up @@ -865,10 +825,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "19a78f63e83d3a61f00826d09bc2f60e191bf3504183c001262be6ac75589fb8"
sha256: ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55
url: "https://pub.dev"
source: hosted
version: "0.7.8"
version: "0.7.7"
tuple:
dependency: transitive
description:
Expand Down Expand Up @@ -1037,14 +997,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "6.6.1"
yaml:
dependency: transitive
description:
name: yaml
sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce
url: "https://pub.dev"
source: hosted
version: "3.1.3"
sdks:
dart: ">=3.10.3 <4.0.0"
flutter: ">=3.38.4"
dart: ">=3.10.0 <4.0.0"
flutter: ">=3.38.0"