From 9512c165d34c67995b44acd8f927e741d3aa588f Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Thu, 31 Dec 2020 16:53:25 +0900 Subject: [PATCH 1/3] Add azure-pipelines.yml --- azure-pipelines.yml | 91 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000000..b491f7b2a8fcf --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,91 @@ +# Azure Pipelines YAML pipeline. +# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema +name: ninja + +trigger: +- flutter-*-tizen +pr: +- flutter-*-tizen + +jobs: +- job: Linux + strategy: + matrix: + tizen-arm-release: + arch: arm + mode: release + targetTriple: armv7l-tizen-linux-gnueabi + tizen-arm-debug: + arch: arm + mode: debug + targetTriple: armv7l-tizen-linux-gnueabi + tizen-x86-debug: + arch: x86 + mode: debug + targetTriple: i586-tizen-linux-gnueabi + pool: + name: Default + demands: agent.os -equals Linux + timeoutInMinutes: 30 + cancelTimeoutInMinutes: 1 + variables: + - name: buildroot + value: $(Pipeline.Workspace)/src + steps: + - checkout: self + clean: false + path: src/flutter + - bash: | + flutter/tools/gn \ + --target-os linux \ + --linux-cpu $(arch) \ + --target-toolchain `pwd`/tizen_tools/toolchains \ + --target-sysroot `pwd`/tizen_tools/sysroot/$(arch) \ + --target-triple $(targetTriple) \ + --runtime-mode $(mode) \ + --embedder-for-target \ + --build-tizen-shell + ninja -C out/linux_$(mode)_$(arch) + displayName: Build + workingDirectory: $(buildroot) + failOnStderr: true + - bash: | + OUTDIR=$(Build.StagingDirectory) + cp libflutter_linux_tizen.so $OUTDIR/libflutter.so + if [ "$(System.JobName)" = "tizen-arm-release" ]; then + cp icudtl.dat $OUTDIR + mkdir $OUTDIR/linux-x64 + cp clang_x64/gen_snapshot $OUTDIR/linux-x64 + fi + displayName: Copy artifacts + workingDirectory: $(buildroot)/out/linux_$(mode)_$(arch) + failOnStderr: true + - publish: $(Build.StagingDirectory) + artifact: $(System.JobName) +- job: Release + dependsOn: Linux + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) + pool: + name: Default + demands: agent.os -equals Linux + steps: + - checkout: self + path: src/flutter + - download: current + - bash: | + mkdir -p common/client_wrapper + mv $(Pipeline.Workspace)/tizen-* . + mv tizen-*/icudtl.dat common + PLATFORM=$(Pipeline.Workspace)/src/flutter/shell/platform + cp $PLATFORM/common/cpp/client_wrapper/*.{h,cc} common/client_wrapper + rm common/client_wrapper/{*_unittests.*,engine_method_result.cc} + cp -r $PLATFORM/common/cpp/public common + cp -r $PLATFORM/common/cpp/client_wrapper/include common/client_wrapper + cp $PLATFORM/tizen/public/*.h common/public + cp $PLATFORM/tizen/LICENSE . + zip -r linux-x64.zip * + displayName: Create a release + workingDirectory: $(Build.StagingDirectory) + failOnStderr: true + - publish: $(Build.StagingDirectory)/linux-x64.zip + artifact: Release From 3e7a79a088c13d840995b7c1a97dab8b8b386eec Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Sun, 3 Jan 2021 04:02:17 +0900 Subject: [PATCH 2/3] Run gclient sync prior to each build --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b491f7b2a8fcf..4c761eba5d487 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -33,9 +33,11 @@ jobs: value: $(Pipeline.Workspace)/src steps: - checkout: self - clean: false path: src/flutter - bash: | + git reset --hard HEAD + gclient sync -D + sed -i 's/"-Wno-non-c-typedef-for-linkage",//g' build/config/compiler/BUILD.gn flutter/tools/gn \ --target-os linux \ --linux-cpu $(arch) \ From f51d6825979229a9b83757f837e138caa6be7717 Mon Sep 17 00:00:00 2001 From: Swift Kim Date: Tue, 5 Jan 2021 10:32:09 +0900 Subject: [PATCH 3/3] Create releases for Windows and macOS --- azure-pipelines.yml | 48 ++++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4c761eba5d487..5418d8cfb5997 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -8,7 +8,7 @@ pr: - flutter-*-tizen jobs: -- job: Linux +- job: build strategy: matrix: tizen-arm-release: @@ -56,38 +56,50 @@ jobs: cp libflutter_linux_tizen.so $OUTDIR/libflutter.so if [ "$(System.JobName)" = "tizen-arm-release" ]; then cp icudtl.dat $OUTDIR - mkdir $OUTDIR/linux-x64 - cp clang_x64/gen_snapshot $OUTDIR/linux-x64 fi displayName: Copy artifacts workingDirectory: $(buildroot)/out/linux_$(mode)_$(arch) failOnStderr: true - publish: $(Build.StagingDirectory) artifact: $(System.JobName) -- job: Release - dependsOn: Linux +- job: release + dependsOn: build condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) pool: name: Default demands: agent.os -equals Linux + workspace: + clean: outputs + variables: + - name: upstreamVersion + value: 4654fc6cf6416daae78eac2c211ad84c46e21625 steps: - checkout: self path: src/flutter - download: current - bash: | mkdir -p common/client_wrapper - mv $(Pipeline.Workspace)/tizen-* . - mv tizen-*/icudtl.dat common - PLATFORM=$(Pipeline.Workspace)/src/flutter/shell/platform - cp $PLATFORM/common/cpp/client_wrapper/*.{h,cc} common/client_wrapper + ROOT=$(Pipeline.Workspace)/src/flutter/shell/platform + cp $ROOT/common/cpp/client_wrapper/*.{h,cc} common/client_wrapper rm common/client_wrapper/{*_unittests.*,engine_method_result.cc} - cp -r $PLATFORM/common/cpp/public common - cp -r $PLATFORM/common/cpp/client_wrapper/include common/client_wrapper - cp $PLATFORM/tizen/public/*.h common/public - cp $PLATFORM/tizen/LICENSE . - zip -r linux-x64.zip * - displayName: Create a release - workingDirectory: $(Build.StagingDirectory) + cp -r $ROOT/common/cpp/public common + cp -r $ROOT/common/cpp/client_wrapper/include common/client_wrapper + cp $ROOT/tizen/public/*.h common/public + cp $ROOT/tizen/LICENSE . + displayName: Copy peripherals + workingDirectory: $(Build.BinariesDirectory) + failOnStderr: true + - bash: | + mv $(Pipeline.Workspace)/tizen-* . + mv tizen-arm-release/icudtl.dat common + for platform in linux windows darwin; do + curl -o tmp.zip https://storage.googleapis.com/flutter_infra/flutter/$(upstreamVersion)/android-arm-release/$platform-x64.zip 2> /dev/null + unzip tmp.zip -d tizen-arm-release/$platform-x64 && rm tmp.zip + zip -r $(Build.StagingDirectory)/$platform-x64.zip * + rm -r tizen-arm-release/$platform-x64 + done + displayName: Create releases + workingDirectory: $(Build.BinariesDirectory) failOnStderr: true - - publish: $(Build.StagingDirectory)/linux-x64.zip - artifact: Release + - publish: $(Build.StagingDirectory) + artifact: release