Skip to content

Commit 0855ca9

Browse files
committed
x64 test
1 parent 38b37a7 commit 0855ca9

File tree

4 files changed

+63
-13
lines changed

4 files changed

+63
-13
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
arch: [arm, arm64, x86]
15+
arch: [arm, arm64, x86, x64]
1616
mode: [debug, release, profile]
1717
include:
1818
- arch: arm
@@ -21,11 +21,8 @@ jobs:
2121
triple: aarch64-linux-gnu
2222
- arch: x86
2323
triple: i686-linux-gnu
24-
exclude:
25-
- arch: x86
26-
mode: release
27-
- arch: x86
28-
mode: profile
24+
- arch: x64
25+
triple: x86_64-linux-gnu
2926

3027
steps:
3128
- uses: actions/checkout@v4
@@ -58,6 +55,7 @@ jobs:
5855
run: flutter/engine/src/flutter/ci/tizen/generate_sysroot.py --out /tizen_tools/sysroot
5956

6057
- name: Build
58+
if: ${{ matrix.arch != x64 }}
6159
run: |
6260
cd flutter
6361
# Ignore unsupported linker option.
@@ -78,12 +76,37 @@ jobs:
7876
ninja -C out/build flutter_engine_library
7977
cp -f flutter/third_party/icu/flutter/icudtl.dat out/build
8078
79+
- name: Build(x64)
80+
if: ${{ matrix.arch == x64 }}
81+
run: |
82+
cd flutter
83+
84+
flutter/tools/gn \
85+
--target-os linux \
86+
--linux-cpu ${{ matrix.arch }} \
87+
--no-goma \
88+
--target-triple ${{ matrix.triple }} \
89+
--runtime-mode ${{ matrix.mode }} \
90+
--enable-fontconfig \
91+
--disable-desktop-embeddings \
92+
--target-dir build
93+
94+
cd engine/src
95+
ninja -C out/build flutter_engine_library
96+
cp -f flutter/third_party/icu/flutter/icudtl.dat out/build
97+
8198
- name: Build gen_snapshot
82-
if: ${{ matrix.mode != 'debug' }}
99+
if: ${{ matrix.mode != 'debug' && matrix.arch != x64}}
83100
run: |
84101
cd flutter
85102
ninja -C engine/src/out/build clang_x64/gen_snapshot
86103
104+
- name: Build gen_snapshot(x64)
105+
if: ${{ matrix.mode != 'debug' && matrix.arch == x64}}
106+
run: |
107+
cd flutter
108+
ninja -C engine/src/out/build gen_snapshot
109+
87110
- uses: actions/upload-artifact@v4
88111
with:
89112
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}
@@ -106,6 +129,20 @@ jobs:
106129
path: flutter/engine/src/out/build/clang_x64/gen_snapshot
107130
if-no-files-found: error
108131

132+
- uses: actions/upload-artifact@v4
133+
if: ${{ matrix.mode != 'debug' && matrix.arch != x64}}
134+
with:
135+
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64
136+
path: flutter/engine/src/out/build/clang_x64/gen_snapshot
137+
if-no-files-found: error
138+
139+
- uses: actions/upload-artifact@v4
140+
if: ${{ matrix.mode != 'debug' && matrix.arch == x64}}
141+
with:
142+
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64
143+
path: flutter/engine/src/out/build/gen_snapshot
144+
if-no-files-found: error
145+
109146
windows-build:
110147
runs-on: windows-latest
111148

engine/src/flutter/ci/tizen/build_llvm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ for name in ar readelf nm strip; do
4343
ln -sf llvm-$name arm-linux-gnueabi-$name
4444
ln -sf llvm-$name aarch64-linux-gnu-$name
4545
ln -sf llvm-$name i686-linux-gnu-$name
46+
ln -sf llvm-$name x86_64-linux-gnu-$name
4647
done

engine/src/flutter/ci/tizen/generate_sysroot.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,26 @@
3232

3333

3434
def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
35+
target = 'standard'
36+
3537
if arch == 'arm':
3638
tizen_arch = 'armv7l'
3739
elif arch == 'arm64':
3840
tizen_arch = 'aarch64'
3941
elif arch == 'x86':
4042
tizen_arch = 'i686'
43+
target = 'emulator'
44+
elif arch == 'x64':
45+
tizen_arch = 'x86_64'
46+
target = 'emulator'
4147
else:
4248
sys.exit('Unknown arch: ' + arch)
4349

4450
base_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Base/latest/repos/standard/packages'.format(
4551
api_version, api_version
4652
)
47-
unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/standard/packages'.format(
48-
api_version, api_version
53+
unified_repo = 'http://download.tizen.org/snapshots/TIZEN/Tizen-{}/Tizen-{}-Unified/latest/repos/{}/packages'.format(
54+
api_version, api_version, target
4955
)
5056

5157
# Retrieve html documents.
@@ -91,11 +97,11 @@ def generate_sysroot(sysroot: Path, api_version: float, arch: str, quiet=False):
9197
if not asm.exists():
9298
os.symlink('asm-' + arch, asm)
9399
pkgconfig = sysroot / 'usr' / 'lib' / 'pkgconfig'
94-
if arch == 'arm64' and not pkgconfig.exists():
100+
if (arch == 'arm64' or arch == 'x64') and not pkgconfig.exists():
95101
os.symlink('../lib64/pkgconfig', pkgconfig)
96102

97103
# Copy objects required by the linker, such as crtbeginS.o and libgcc.a.
98-
if arch == 'arm64':
104+
if arch == 'arm64' or arch == 'x64':
99105
libpath = sysroot / 'usr' / 'lib64'
100106
else:
101107
libpath = sysroot / 'usr' / 'lib'
@@ -135,7 +141,13 @@ def main():
135141
outpath = Path(__file__).parent / 'sysroot'
136142
outpath.mkdir(exist_ok=True)
137143

138-
for arch in ['arm', 'arm64', 'x86']:
144+
arches = ['arm', 'arm64', 'x86']
145+
if args.api_version >= 10.0:
146+
arches = ['arm', 'arm64', 'x64']
147+
elif args.api_version >= 8.0:
148+
arches = ['arm', 'arm64', 'x86', 'x64']
149+
150+
for arch in arches:
139151
sysroot = outpath / arch
140152
if args.force and sysroot.is_dir():
141153
shutil.rmtree(sysroot)

engine/src/flutter/testing/testing.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ is_aot_test =
1414
# * is_mac: arm64 builds can run x64 binaries.
1515
# * is_fuchsia: build unittests for testing on device.
1616
declare_args() {
17-
enable_unittests = current_toolchain == host_toolchain || is_fuchsia || is_mac
17+
enable_unittests = false # current_toolchain == host_toolchain || is_fuchsia || is_mac
1818
}
1919

2020
# Creates a translation unit that defines the flutter::testing::GetFixturesPath

0 commit comments

Comments
 (0)