-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Splitted Jobs for each platform in github actions
- Loading branch information
Showing
41 changed files
with
1,401 additions
and
1,349 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 |
---|---|---|
|
@@ -6,40 +6,49 @@ on: | |
name: Release Builds | ||
jobs: | ||
linux: | ||
name: Android & Linux & Web | ||
name: Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
git clone https://github.com/flutter/flutter.git | ||
cd flutter | ||
git checkout 4df8fdb7df | ||
git checkout 5663e02645 | ||
- run: echo ::add-path::`pwd`"/flutter/bin" | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'app' | ||
|
||
- run: | | ||
cd app | ||
flutter config --enable-linux-desktop | ||
flutter config --enable-web | ||
flutter pub get | ||
flutter build linux --release | ||
flutter build apk -t lib/main.mobile.dart --release | ||
flutter build web -t lib/main.mobile.dart --release | ||
cd build/linux/ | ||
zip -r linux-release.zip release | ||
- name: Create Android & linux Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'app/build/linux/linux-release.zip' | ||
token: ${{ secrets.TOKEN }} | ||
allowUpdates: true | ||
|
||
# - run: | | ||
# cd app | ||
# npm i | ||
# npm run upload apk ${{ secrets.ACCOUNT }} | ||
# npm run upload linux ${{ secrets.ACCOUNT }} | ||
web: | ||
name: Web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
git clone https://github.com/flutter/flutter.git | ||
cd flutter | ||
git checkout 5663e02645 | ||
- run: echo ::add-path::`pwd`"/flutter/bin" | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'app' | ||
|
||
- run: | | ||
cd app | ||
flutter config --enable-web | ||
flutter pub get | ||
flutter build web -t lib/main.mobile.dart --release | ||
- name: Deploy to Firebase | ||
uses: w9jds/[email protected] | ||
with: | ||
|
@@ -48,10 +57,29 @@ jobs: | |
PROJECT_PATH: 'app' | ||
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | ||
|
||
android: | ||
name: Android | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
git clone https://github.com/flutter/flutter.git | ||
cd flutter | ||
git checkout 5663e02645 | ||
- run: echo ::add-path::`pwd`"/flutter/bin" | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: '12.x' | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'app' | ||
- run: | | ||
cd app | ||
flutter pub get | ||
flutter build apk -t lib/main.mobile.dart --release | ||
- name: Create Android & linux Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'app/build/app/outputs/apk/release/app-release.apk,app/build/linux/linux-release.zip' | ||
artifacts: 'app/build/app/outputs/apk/release/app-release.apk' | ||
token: ${{ secrets.TOKEN }} | ||
allowUpdates: true | ||
|
||
|
@@ -62,26 +90,18 @@ jobs: | |
- run: | | ||
git clone https://github.com/flutter/flutter.git | ||
cd flutter | ||
git checkout 4df8fdb7df | ||
git checkout 5663e02645 | ||
- run: echo ::add-path::`pwd`"/flutter/bin" | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'app' | ||
|
||
- run: | | ||
cd app | ||
flutter config --enable-macos-desktop | ||
flutter pub get | ||
flutter build macos --release | ||
cd build/macos/Build/Products/Release | ||
ditto -c -k --sequesterRsrc --keepParent flutter_uis.app macos-release.zip | ||
# - run: | | ||
# cd app | ||
# npm i | ||
# npm run upload macos ${{ secrets.ACCOUNT }} | ||
|
||
- uses: ncipollo/release-action@v1 | ||
with: | ||
artifacts: 'app/build/macOS/Build/Products/Release/macos-release.zip' | ||
|
@@ -95,27 +115,18 @@ jobs: | |
- run: | | ||
git clone https://github.com/flutter/flutter.git | ||
cd flutter | ||
git checkout 4df8fdb7df | ||
git checkout 5663e02645 | ||
- run: echo ::add-path::"$(pwd)\flutter\bin" | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
path: 'app' | ||
|
||
- run: | | ||
cd app | ||
flutter config --enable-windows-desktop | ||
flutter pub get | ||
flutter build windows --release | ||
cd build\windows\x64\Release | ||
Compress-Archive -Path Runner -DestinationPath windows-release.zip | ||
# Windows prints the secret variable in log taht's why It's disabled for now | ||
# - run: | | ||
# cd app | ||
# npm i | ||
# npm run upload windows ${{ secrets.ACCOUNT }} | ||
|
||
- name: Windows release build for github | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
|
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,77 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(runner LANGUAGES CXX) | ||
|
||
set(BINARY_NAME "flutter_uis") | ||
|
||
cmake_policy(SET CMP0063 NEW) | ||
|
||
set(CMAKE_INSTALL_RPATH "\$ORIGIN") | ||
|
||
# Configure build options. | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
set(CMAKE_BUILD_TYPE "Debug" CACHE | ||
STRING "Flutter build mode" FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
"Debug" "Profile" "Release") | ||
endif() | ||
|
||
# Compilation settings that should be applied to most targets. | ||
function(APPLY_STANDARD_SETTINGS TARGET) | ||
target_compile_features(${TARGET} PUBLIC cxx_std_14) | ||
target_compile_options(${TARGET} PRIVATE -Wall -Werror) | ||
target_compile_options(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:-O3>") | ||
target_compile_definitions(${TARGET} PRIVATE "$<$<NOT:$<CONFIG:Debug>>:NDEBUG>") | ||
endfunction() | ||
|
||
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") | ||
|
||
# Flutter library and tool build rules. | ||
add_subdirectory(${FLUTTER_MANAGED_DIR}) | ||
|
||
# Application build | ||
add_executable(${BINARY_NAME} | ||
"main.cc" | ||
"window_configuration.cc" | ||
"${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" | ||
) | ||
apply_standard_settings(${BINARY_NAME}) | ||
target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) | ||
add_dependencies(${BINARY_NAME} flutter_assemble) | ||
|
||
# Generated plugin build rules, which manage building the plugins and adding | ||
# them to the application. | ||
include(flutter/generated_plugins.cmake) | ||
|
||
|
||
# === Installation === | ||
# By default, "installing" just makes a relocatable bundle in the build | ||
# directory. | ||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) | ||
set(CMAKE_INSTALL_PREFIX "${PROJECT_BINARY_DIR}/bundle" CACHE PATH "..." FORCE) | ||
endif() | ||
|
||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") | ||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") | ||
|
||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" | ||
COMPONENT Runtime) | ||
|
||
file(GLOB FLUTTER_PLUGIN_DIRS "${PROJECT_BINARY_DIR}/plugins/*") | ||
|
||
INSTALL(CODE " | ||
include(BundleUtilities) | ||
fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/${BINARY_NAME}\" \"\" | ||
\"${FLUTTER_PLUGIN_DIRS};${FLUTTER_LIBRARY_DIR}\") | ||
" COMPONENT Runtime) | ||
|
||
INSTALL(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" | ||
COMPONENT Runtime) | ||
|
||
# Fully re-copy the assets directory on each build to avoid having stale files | ||
# from a previous install. | ||
set(FLUTTER_ASSET_DIR_NAME "flutter_assets") | ||
INSTALL(CODE " | ||
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") | ||
" COMPONENT Runtime) | ||
INSTALL(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" | ||
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
2 |
Oops, something went wrong.