-
Notifications
You must be signed in to change notification settings - Fork 7
162 lines (133 loc) · 4.72 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
api-version: ['6.0', '6.5']
arch: [arm, arm64, x86]
include:
- arch: arm
triple: arm-linux-gnueabi
- arch: arm64
triple: aarch64-linux-gnu
- arch: x86
triple: i686-linux-gnu
steps:
- uses: actions/checkout@v4
with:
path: src
- uses: actions/cache@v4
with:
path: src/sysroot*
key: sysroot-${{ matrix.api-version }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang-12 rpm2cpio cpio binutils-${{ matrix.triple }}
- name: Install depot_tools
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "$PWD/depot_tools" >> $GITHUB_PATH
- name: Run gclient sync
run: |
gclient config --name=src --unmanaged https://github.com/${{ github.repository }}
gclient sync -v --no-history --shallow
- name: Generate Tizen 6.0 sysroot
if: ${{ matrix.api-version == '6.0' }}
run: src/tools/generate_sysroot.py --out src/sysroot-6.0
- name: Generate Tizen 6.5 sysroot
if: ${{ matrix.api-version == '6.5' }}
run: src/tools/generate_sysroot.py --api-version 6.5 --out src/sysroot-6.5
- name: Build for Tizen 6.0
if: ${{ matrix.api-version == '6.0' }}
run: |
src/tools/gn \
--target-cpu ${{ matrix.arch }} \
--target-toolchain /usr/lib/llvm-12 \
--target-sysroot src/sysroot-6.0/${{ matrix.arch }} \
--target-dir build
ninja -C src/out/build
- name: Build for Tizen 6.5
if: ${{ matrix.api-version == '6.5' }}
run: |
src/tools/gn \
--target-cpu ${{ matrix.arch }} \
--target-toolchain /usr/lib/llvm-12 \
--target-sysroot src/sysroot-6.5/${{ matrix.arch }} \
--api-version 6.5 \
--target-dir build
ninja -C src/out/build
- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}
path: src/out/build/libflutter_tizen*.so
if-no-files-found: error
- uses: actions/upload-artifact@v4
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_unittests
path: src/out/build/flutter_tizen_unittests
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: ${{ github.event_name == 'push' }}
with:
name: tizen-${{ matrix.api-version }}-${{ matrix.arch }}_symbols
path: src/out/build/so.unstripped/libflutter_tizen*.so
if-no-files-found: error
- uses: actions/upload-artifact@v4
if: ${{ matrix.arch == 'arm' && matrix.api-version == '6.0' }}
with:
name: tizen-common
path: |
src/out/build/cpp_client_wrapper
src/out/build/icu
src/out/build/public
if-no-files-found: error
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
with:
platforms: arm
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: tizen-6.0-arm_unittests
- name: Download engine
run: |
python3 tools/download_engine.py
cp engine/arm/libflutter_engine.so .
rm -rf engine
- name: Run tests
run: |
chmod +x flutter_tizen_unittests
docker run --rm -t -v $PWD:/root ghcr.io/flutter-tizen/tizen-headed-armv7l /root/flutter_tizen_unittests
release:
needs: test
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Create archives
run: |
rm -r *_unittests
for name in tizen-*; do
7z a $name.zip ./$name/*
done
- name: Set variable
run: echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV
- uses: softprops/action-gh-release@v2
with:
name: tizen-embedder-${{ env.SHORT_SHA }}
tag_name: ${{ env.SHORT_SHA }}
target_commitish: ${{ github.sha }}
files: tizen-*.zip
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}