Skip to content

Commit

Permalink
Support x86 build (#18)
Browse files Browse the repository at this point in the history
* Support x86 build

* Update DEPS file

* Update CI configuration to support x86 build
  • Loading branch information
swift-kim authored and GitHub Enterprise committed Oct 8, 2020
1 parent 075d0a7 commit e45fefe
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 52 deletions.
34 changes: 21 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,50 @@
version: 2
jobs:
build_tizen_arm:
build_tizen:
working_directory: /home/circleci/engine/src
docker:
- image: art.sec.samsung.net/f-project_docker/engine_build_docker/flutter_engine:latest
environment:
ART_REPO_NAME: f-project_generic/engine
ART_DEPLOY_PATH: flutter/tizen/arm
ART_DEPLOY_PATH: flutter/tizen
ART_USERNAME: mh.byun
ART_APIKEY: AKCp5fTttyfJ82EJXUkbjqpoBRZGh2ovZFD9DDZAhBYn1h26Jrbxm3mnrE1egphaaAUyNTrWq
no_proxy: 10.252.240.232,10.113.164.251,10.113.164.242
steps:
- run: curl -sL https://art.sec.samsung.net/artifactory/tools/CircleCI/scripts/set_proxy_setting.sh | sh
- checkout:
path: /home/circleci/engine/src/flutter
- run: gclient sync -D
- run: ./flutter/tools/gn --unopt --target-os linux --linux-cpu arm --target-toolchain /home/circleci/engine/src/third_party/tizen_tools/toolchains --target-sysroot /home/circleci/engine/src/third_party/tizen_tools/sysroot/armel --target-triple armv7l-tizen-linux-gnueabi --runtime-mode debug --embedder-for-target --build-tizen-shell
- run: ninja -C out/linux_debug_unopt_arm/

- run: gclient sync -D
- run: sed -i 's/"-Wno-non-c-typedef-for-linkage",//g' build/config/compiler/BUILD.gn

- run: ./flutter/tools/gn --target-os linux --linux-cpu arm --target-toolchain `pwd`/third_party/tizen_tools/toolchains --target-sysroot `pwd`/third_party/tizen_tools/sysroot/arm --target-triple armv7l-tizen-linux-gnueabi --runtime-mode debug --embedder-for-target --build-tizen-shell
- run: ninja -C out/linux_debug_arm
- store_artifacts:
path: /home/circleci/engine/src/out/linux_debug_unopt_arm/libflutter_linux_tizen.so
- run: ./flutter/tools/gn --unopt --target-os linux --linux-cpu arm --target-toolchain /home/circleci/engine/src/third_party/tizen_tools/toolchains --target-sysroot /home/circleci/engine/src/third_party/tizen_tools/sysroot/armel --target-triple armv7l-tizen-linux-gnueabi --runtime-mode release --embedder-for-target --build-tizen-shell
- run: ninja -C out/linux_release_unopt_arm/
path: /home/circleci/engine/src/out/linux_debug_arm/libflutter_linux_tizen.so

- run: ./flutter/tools/gn --target-os linux --linux-cpu arm --target-toolchain `pwd`/third_party/tizen_tools/toolchains --target-sysroot `pwd`/third_party/tizen_tools/sysroot/arm --target-triple armv7l-tizen-linux-gnueabi --runtime-mode release --embedder-for-target --build-tizen-shell
- run: ninja -C out/linux_release_arm
- store_artifacts:
path: /home/circleci/engine/src/out/linux_release_unopt_arm/libflutter_linux_tizen.so
path: /home/circleci/engine/src/out/linux_release_arm/libflutter_linux_tizen.so

- run: ./flutter/tools/gn --target-os linux --linux-cpu x86 --target-toolchain `pwd`/third_party/tizen_tools/toolchains --target-sysroot `pwd`/third_party/tizen_tools/sysroot/x86 --target-triple i586-tizen-linux-gnueabi --runtime-mode debug --embedder-for-target --build-tizen-shell
- run: ninja -C out/linux_debug_x86
- store_artifacts:
path: /home/circleci/engine/src/out/linux_debug_x86/libflutter_linux_tizen.so

# - run: curl -XGET https://art.sec.samsung.net/artifactory/tools/art/jfrog -L -k > /home/circleci/engine/src/jfrog && chmod u+x /home/circleci/engine/src/jfrog
# - run:
# name: Push so to artifactory
# command: |-
# /home/circleci/engine/src/jfrog rt config --url https://art.sec.samsung.net/artifactory --user ${ART_USERNAME} --password ${ART_APIKEY} --interactive=false
# cd /home/circleci/engine/src/out/linux_debug_unopt_arm
# cd /home/circleci/engine/src/out/linux_debug_arm
# /home/circleci/engine/src/jfrog rt u ./libflutter_linux_tizen.so ${ART_REPO_NAME}/${ART_DEPLOY_PATH}/debug/ --build-name=${CIRCLE_REPOSITORY_URL} --build-number=${CIRCLE_SHA1} --flat=false
# cd /home/circleci/engine/src/out/linux_release_unopt_arm
# cd /home/circleci/engine/src/out/linux_release_arm
# /home/circleci/engine/src/jfrog rt u ./libflutter_linux_tizen.so ${ART_REPO_NAME}/${ART_DEPLOY_PATH}/release/ --build-name=${CIRCLE_REPOSITORY_URL} --build-number=${CIRCLE_SHA1} --flat=false
# /home/circleci/engine/src/jfrog rt bag ${CIRCLE_REPOSITORY_URL} ${CIRCLE_SHA1} $(eval "echo ${CIRCLE_WORKING_DIRECTORY}")
# /home/circleci/engine/src/jfrog rt bp ${CIRCLE_REPOSITORY_URL} ${CIRCLE_SHA1}
workflows:
version: 2
build_All:
jobs:
- build_tizen_arm
- build_tizen
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ allowed_hosts = [

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'a6c0959d1ac8cdfe6f9ff87892bc4905a73699fe',
'src/third_party/tizen_tools' :'git@github.sec.samsung.net:f-project/tizen_tools.git' + '@' + 'dcd6fbaaa68da4225ab1482e60e6e6ee157664b6',
'src/third_party/tizen_tools' :'git@github.sec.samsung.net:f-project/tizen_tools.git' + '@' + '132783e77ce422a3b26f5369c5c85382cad1808e',

# Fuchsia compatibility
#
Expand Down
65 changes: 27 additions & 38 deletions shell/platform/tizen/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ config("relative_flutter_tizen_headers") {

config("flutter_tizen_native_headers") {
include_dirs = [
"//third_party/tizen_tools/sysroot/armel/usr/include",
"//third_party/tizen_tools/sysroot/armel/usr/include/base",
"//third_party/tizen_tools/sysroot/armel/usr/include/dlog",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-wl2-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/efl-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eo-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/eina-1/eina",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-input-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/ecore-imf-evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/evas-1",
"//third_party/tizen_tools/sysroot/armel/usr/include/emile-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/base",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/dlog",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-evas-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-imf-evas-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-input-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/ecore-wl2-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/efl-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eina-1/eina",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/emile-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/eo-1",
"//third_party/tizen_tools/sysroot/$target_cpu/usr/include/evas-1",
]
}

Expand All @@ -50,29 +50,18 @@ source_set("flutter_tizen_headers") {

source_set("flutter_tizen") {
sources = [
"tizen_event_loop.cc",
"tizen_event_loop.h",
"flutter_tizen.cc",
"key_event_channel.cc",
"key_event_channel.h",
"lifecycle_channel.cc",
"localization_channel.cc",
"text_input_plugin.cc",
"tizen_embedder_engine.cc",
"tizen_embedder_engine.h",
"tizen_event_loop.cc",
"tizen_surface.cc",
"tizen_surface.h",
"tizen_surface_gl.cc",
"tizen_surface_gl.h",
"tizen_surface_software.cc",
"tizen_surface_software.h",
"tizen_vsync_waiter.cc",
"tizen_vsync_waiter.h",
"touch_event_channel.cc",
"touch_event_channel.h",
"text_input_plugin.h",
"text_input_plugin.cc",
"lifecycle_channel.h",
"lifecycle_channel.cc",
"localization_channel.h",
"localization_channel.cc",
]

defines = [ "USE_RAPID_JSON" ]
Expand All @@ -91,25 +80,25 @@ source_set("flutter_tizen") {
"//third_party/rapidjson",
]

lib_dirs = [ "//third_party/tizen_tools/sysroot/armel/usr/lib" ]
lib_dirs = [ "//third_party/tizen_tools/sysroot/$target_cpu/usr/lib" ]

cflags_cc = [
"-Wno-newline-eof",
"-Wno-macro-redefined",
"-Wno-unused-const-variable"
]
libs = [
"base-utils-i18n",
"dlog",
"EGL",
"ecore_wl2",
"wayland-client",
"GLESv2",
"tdm-client",
"ecore",
"ecore_imf",
"ecore_input",
"ecore_wl2",
"EGL",
"evas",
"ecore_imf",
"base-utils-i18n"
"GLESv2",
"tdm-client",
"wayland-client",
]
}

Expand Down

0 comments on commit e45fefe

Please sign in to comment.