Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add azure-pipelines.yml #20

Merged
merged 3 commits into from
Jan 6, 2021
Merged
Changes from 2 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
93 changes: 93 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# 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
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) \
--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