-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from abdelaziz-mahdy/auto-setup
Auto setup
- Loading branch information
Showing
22 changed files
with
646 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: build examples | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
pull_request: | ||
branches: ["main"] | ||
|
||
jobs: | ||
build-windows: | ||
name: build-windows | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
# flutter-version: '3.16.9' | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: build | ||
run: | | ||
cd example | ||
flutter build windows | ||
flutter build apk --release --target-platform android-arm64,android-arm,android-x64 --split-per-abi | ||
build-ubuntu: | ||
name: build-ubuntu | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
# flutter-version: '3.16.9' | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: setup | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y curl git wget python3 unzip build-essential \ | ||
libgtk-3-dev ffmpeg libavcodec-dev \ | ||
cmake ninja-build nasm libavformat-dev libavutil-dev \ | ||
libswscale-dev libgflags-dev \ | ||
libjpeg-dev libpng-dev libtiff-dev python3-pip | ||
- name: build | ||
run: | | ||
cd example | ||
flutter build linux | ||
flutter build apk --release --target-platform android-arm64,android-arm,android-x64 --split-per-abi | ||
build-macos: | ||
name: build-macos | ||
runs-on: macos-13 | ||
steps: | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
# flutter-version: '3.16.9' | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: build | ||
run: | | ||
cd example | ||
flutter build macos | ||
flutter build apk --release --target-platform android-arm64,android-arm,android-x64 --split-per-abi | ||
flutter build ios --release --no-codesign | ||
build-macos-arm: | ||
name: build-macos-arm | ||
runs-on: macos-14 | ||
steps: | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
# flutter-version: '3.16.9' | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
- name: build | ||
run: | | ||
cd example | ||
flutter build macos | ||
flutter build apk --release --target-platform android-arm64,android-arm,android-x64 --split-per-abi | ||
flutter build ios --release --no-codesign |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" | ||
#include "Generated.xcconfig" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Uncomment this line to define a global platform for your project | ||
# platform :ios, '12.0' | ||
|
||
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. | ||
ENV['COCOAPODS_DISABLE_STATS'] = 'true' | ||
|
||
project 'Runner', { | ||
'Debug' => :debug, | ||
'Profile' => :release, | ||
'Release' => :release, | ||
} | ||
|
||
def flutter_root | ||
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) | ||
unless File.exist?(generated_xcode_build_settings_path) | ||
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" | ||
end | ||
|
||
File.foreach(generated_xcode_build_settings_path) do |line| | ||
matches = line.match(/FLUTTER_ROOT\=(.*)/) | ||
return matches[1].strip if matches | ||
end | ||
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" | ||
end | ||
|
||
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) | ||
|
||
flutter_ios_podfile_setup | ||
|
||
target 'Runner' do | ||
use_frameworks! | ||
use_modular_headers! | ||
|
||
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) | ||
target 'RunnerTests' do | ||
inherit! :search_paths | ||
end | ||
end | ||
|
||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
flutter_additional_ios_build_settings(target) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
PODS: | ||
- Flutter (1.0.0) | ||
- image_picker_ios (0.0.1): | ||
- Flutter | ||
- opencv_dart (0.0.1): | ||
- Flutter | ||
|
||
DEPENDENCIES: | ||
- Flutter (from `Flutter`) | ||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) | ||
- opencv_dart (from `.symlinks/plugins/opencv_dart/ios`) | ||
|
||
EXTERNAL SOURCES: | ||
Flutter: | ||
:path: Flutter | ||
image_picker_ios: | ||
:path: ".symlinks/plugins/image_picker_ios/ios" | ||
opencv_dart: | ||
:path: ".symlinks/plugins/opencv_dart/ios" | ||
|
||
SPEC CHECKSUMS: | ||
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 | ||
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1 | ||
opencv_dart: 818b078a7168d455a7b84e1b1a0f444835ad666b | ||
|
||
PODFILE CHECKSUM: 819463e6a0290f5a72f145ba7cde16e8b6ef0796 | ||
|
||
COCOAPODS: 1.15.2 |
Oops, something went wrong.