forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add azure-pipelines.yml * Run gclient sync prior to each build * Create releases for Windows and macOS
- Loading branch information
Showing
1 changed file
with
105 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,105 @@ | ||
# 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: build | ||
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 | ||
fi | ||
displayName: Copy artifacts | ||
workingDirectory: $(buildroot)/out/linux_$(mode)_$(arch) | ||
failOnStderr: true | ||
- publish: $(Build.StagingDirectory) | ||
artifact: $(System.JobName) | ||
- 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 | ||
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 $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) | ||
artifact: release |