Skip to content

Commit ca52fc7

Browse files
authored
Add azure-pipelines.yml (#20)
* Add azure-pipelines.yml * Run gclient sync prior to each build * Create releases for Windows and macOS
1 parent 7c4743e commit ca52fc7

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

azure-pipelines.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Azure Pipelines YAML pipeline.
2+
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
3+
name: ninja
4+
5+
trigger:
6+
- flutter-*-tizen
7+
pr:
8+
- flutter-*-tizen
9+
10+
jobs:
11+
- job: build
12+
strategy:
13+
matrix:
14+
tizen-arm-release:
15+
arch: arm
16+
mode: release
17+
targetTriple: armv7l-tizen-linux-gnueabi
18+
tizen-arm-debug:
19+
arch: arm
20+
mode: debug
21+
targetTriple: armv7l-tizen-linux-gnueabi
22+
tizen-x86-debug:
23+
arch: x86
24+
mode: debug
25+
targetTriple: i586-tizen-linux-gnueabi
26+
pool:
27+
name: Default
28+
demands: agent.os -equals Linux
29+
timeoutInMinutes: 30
30+
cancelTimeoutInMinutes: 1
31+
variables:
32+
- name: buildroot
33+
value: $(Pipeline.Workspace)/src
34+
steps:
35+
- checkout: self
36+
path: src/flutter
37+
- bash: |
38+
git reset --hard HEAD
39+
gclient sync -D
40+
sed -i 's/"-Wno-non-c-typedef-for-linkage",//g' build/config/compiler/BUILD.gn
41+
flutter/tools/gn \
42+
--target-os linux \
43+
--linux-cpu $(arch) \
44+
--target-toolchain `pwd`/tizen_tools/toolchains \
45+
--target-sysroot `pwd`/tizen_tools/sysroot/$(arch) \
46+
--target-triple $(targetTriple) \
47+
--runtime-mode $(mode) \
48+
--embedder-for-target \
49+
--build-tizen-shell
50+
ninja -C out/linux_$(mode)_$(arch)
51+
displayName: Build
52+
workingDirectory: $(buildroot)
53+
failOnStderr: true
54+
- bash: |
55+
OUTDIR=$(Build.StagingDirectory)
56+
cp libflutter_linux_tizen.so $OUTDIR/libflutter.so
57+
if [ "$(System.JobName)" = "tizen-arm-release" ]; then
58+
cp icudtl.dat $OUTDIR
59+
fi
60+
displayName: Copy artifacts
61+
workingDirectory: $(buildroot)/out/linux_$(mode)_$(arch)
62+
failOnStderr: true
63+
- publish: $(Build.StagingDirectory)
64+
artifact: $(System.JobName)
65+
- job: release
66+
dependsOn: build
67+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
68+
pool:
69+
name: Default
70+
demands: agent.os -equals Linux
71+
workspace:
72+
clean: outputs
73+
variables:
74+
- name: upstreamVersion
75+
value: 4654fc6cf6416daae78eac2c211ad84c46e21625
76+
steps:
77+
- checkout: self
78+
path: src/flutter
79+
- download: current
80+
- bash: |
81+
mkdir -p common/client_wrapper
82+
ROOT=$(Pipeline.Workspace)/src/flutter/shell/platform
83+
cp $ROOT/common/cpp/client_wrapper/*.{h,cc} common/client_wrapper
84+
rm common/client_wrapper/{*_unittests.*,engine_method_result.cc}
85+
cp -r $ROOT/common/cpp/public common
86+
cp -r $ROOT/common/cpp/client_wrapper/include common/client_wrapper
87+
cp $ROOT/tizen/public/*.h common/public
88+
cp $ROOT/tizen/LICENSE .
89+
displayName: Copy peripherals
90+
workingDirectory: $(Build.BinariesDirectory)
91+
failOnStderr: true
92+
- bash: |
93+
mv $(Pipeline.Workspace)/tizen-* .
94+
mv tizen-arm-release/icudtl.dat common
95+
for platform in linux windows darwin; do
96+
curl -o tmp.zip https://storage.googleapis.com/flutter_infra/flutter/$(upstreamVersion)/android-arm-release/$platform-x64.zip 2> /dev/null
97+
unzip tmp.zip -d tizen-arm-release/$platform-x64 && rm tmp.zip
98+
zip -r $(Build.StagingDirectory)/$platform-x64.zip *
99+
rm -r tizen-arm-release/$platform-x64
100+
done
101+
displayName: Create releases
102+
workingDirectory: $(Build.BinariesDirectory)
103+
failOnStderr: true
104+
- publish: $(Build.StagingDirectory)
105+
artifact: release

0 commit comments

Comments
 (0)