Fix typo #74
This file contains hidden or 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
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/flutter-tizen/build-engine:latest | |
credentials: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
matrix: | |
arch: [arm, arm64, x86, x64] | |
mode: [debug, release, profile] | |
include: | |
- arch: arm | |
triple: arm-linux-gnueabi | |
- arch: arm64 | |
triple: aarch64-linux-gnu | |
- arch: x86 | |
triple: i686-linux-gnu | |
- arch: x64 | |
triple: x86_64-linux-gnu | |
exclude: | |
- arch: x86 | |
mode: release | |
- arch: x86 | |
mode: profile | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: flutter | |
fetch-depth: 1 | |
- uses: actions/cache@v4 | |
with: | |
path: /tizen_tools/sysroot | |
key: sysroot | |
- name: Install depot_tools | |
run: | | |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
echo "$PWD/depot_tools" >> $GITHUB_PATH | |
export PATH="$PWD/depot_tools:$PATH" | |
# Install ninja | |
apt install ninja-build | |
- name: Run gclient sync | |
run: | | |
cd flutter | |
gclient config --unmanaged https://github.com/flutter-tizen/flutter | |
sed -i "s/'flutter'/'.'/g" ./.gclient | |
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS | |
gclient sync -v --no-history --shallow | |
- name: Generate sysroot | |
run: flutter/engine/src/flutter/ci/tizen/generate_sysroot.py --out /tizen_tools/sysroot | |
- name: Build | |
if: ${{ matrix.arch != 'x64' }} | |
run: | | |
cd flutter | |
# Ignore unsupported linker option. | |
sed -i "/-Wl,--undefined-version/d" engine/src/build/config/compiler/BUILD.gn | |
engine/src/flutter/tools/gn \ | |
--target-os linux \ | |
--linux-cpu ${{ matrix.arch }} \ | |
--no-goma \ | |
--target-toolchain /tizen_tools/toolchains \ | |
--target-sysroot /tizen_tools/sysroot/${{ matrix.arch }} \ | |
--target-triple ${{ matrix.triple }} \ | |
--runtime-mode ${{ matrix.mode }} \ | |
--enable-fontconfig \ | |
--disable-desktop-embeddings \ | |
--target-dir build | |
cd engine/src | |
ninja -C out/build flutter_engine_library | |
cp -f flutter/third_party/icu/flutter/icudtl.dat out/build | |
- name: Build(x64) | |
if: ${{ matrix.arch == 'x64' }} | |
run: | | |
cd flutter | |
engine/src/flutter/tools/gn \ | |
--target-os linux \ | |
--linux-cpu ${{ matrix.arch }} \ | |
--no-goma \ | |
--target-triple ${{ matrix.triple }} \ | |
--runtime-mode ${{ matrix.mode }} \ | |
--enable-fontconfig \ | |
--disable-desktop-embeddings \ | |
--target-dir build | |
cd engine/src | |
ninja -C out/build flutter_engine_library | |
cp -f flutter/third_party/icu/flutter/icudtl.dat out/build | |
- name: Build gen_snapshot | |
if: ${{ matrix.mode != 'debug' && matrix.arch != 'x64'}} | |
run: | | |
cd flutter | |
ninja -C engine/src/out/build clang_x64/gen_snapshot | |
- name: Build gen_snapshot(x64) | |
if: ${{ matrix.mode != 'debug' && matrix.arch == 'x64'}} | |
run: | | |
cd flutter | |
ninja -C engine/src/out/build gen_snapshot | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }} | |
path: | | |
flutter/engine/src/out/build/libflutter_engine.so | |
flutter/engine/src/out/build/icudtl.dat | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v4 | |
if: ${{ github.event_name == 'push' }} | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_symbols | |
path: flutter/engine/src/out/build/so.unstripped/libflutter_engine.so | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v4 | |
if: ${{ matrix.mode != 'debug' && matrix.arch != 'x64'}} | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 | |
path: flutter/engine/src/out/build/clang_x64/gen_snapshot | |
if-no-files-found: error | |
- uses: actions/upload-artifact@v4 | |
if: ${{ matrix.mode != 'debug' && matrix.arch == 'x64'}} | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_linux-x64 | |
path: flutter/engine/src/out/build/gen_snapshot | |
if-no-files-found: error | |
windows-build: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
arch: [arm, arm64] | |
mode: [release, profile] | |
steps: | |
- name: Run git checkout | |
run: | | |
mkdir C:\workspace\flutter | |
cd C:\workspace\flutter | |
git config --global core.autocrlf false | |
git config --global core.filemode false | |
git config --global core.fscache true | |
git config --global core.preloadindex true | |
git config --global depot-tools.allowGlobalGitConfig true | |
git init --quiet | |
git remote add origin https://github.com/${{ github.repository }} | |
git fetch --depth 1 origin ${{ github.sha }} | |
git checkout FETCH_HEAD | |
- name: Environment setup | |
run: | | |
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -Force | |
echo "DEPOT_TOOLS_WIN_TOOLCHAIN=0" >> $Env:GITHUB_ENV | |
echo "GYP_MSVS_OVERRIDE_PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise" >> $Env:GITHUB_ENV | |
echo "WINDOWSSDKDIR=C:\Program Files (x86)\Windows Kits\10" >> $Env:GITHUB_ENV | |
- name: Install depot_tools | |
run: | | |
Invoke-WebRequest -Uri https://storage.googleapis.com/chrome-infra/depot_tools.zip -OutFile depot_tools.zip | |
7z x -y -o"C:\workspace\depot_tools" .\depot_tools.zip | |
echo "C:\workspace\depot_tools" >> $Env:GITHUB_PATH | |
- name: Run gclient sync | |
working-directory: C:\workspace\flutter | |
shell: powershell | |
run: | | |
gclient config --unmanaged https://github.com/flutter-tizen/flutter | |
(Get-Content ".gclient") | ForEach-Object { $_ -replace "'flutter'","'.'" } | Set-Content ".gclient" | |
# TODO(jsuya) : pipes deprecated in python 3.13. (https://dart-review.googlesource.com/c/sdk/+/307620) | |
(Get-Content "engine/src/build/vs_toolchain.py") | ForEach-Object { $_ -replace 'import pipes','' } | Set-Content "engine/src/build/vs_toolchain.py" | |
# TODO(jsuya) : Temporary fix to Microsoft STL compiler compatibility checks(https://github.com/flutter-tizen/flutter-tizen/pull/635#issuecomment-2990206946) | |
(Get-Content "engine/src/build/config/compiler/BUILD.gn") | ForEach-Object { $_; if ($_.Trim() -eq '"__STD_C",') { ' "_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH",' } } | Set-Content "engine/src/build/config/compiler/BUILD.gn" | |
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS | |
gclient sync -v --no-history --shallow | |
- name: Build | |
working-directory: C:\workspace\flutter\engine\src | |
run: | | |
python3 .\flutter\tools\gn ` | |
--linux ` | |
--linux-cpu=${{ matrix.arch }} ` | |
--runtime-mode=${{ matrix.mode }} ` | |
--no-goma ` | |
--target-dir build | |
ninja -C .\out\build gen_snapshot | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_windows-x64 | |
path: C:\workspace\flutter\engine\src\out\build\gen_snapshot.exe | |
if-no-files-found: error | |
macos-build: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
arch: [arm, arm64] | |
mode: [release, profile] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: flutter | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- 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: | | |
cd flutter | |
gclient config --unmanaged https://github.com/flutter-tizen/flutter | |
sed -i '' "s/'flutter'/'.'/g" .gclient | |
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS | |
gclient sync -v --no-history --shallow | |
- name: Build | |
run: | | |
cd flutter | |
# Change host_toolchain to mac/clang_arm64. | |
sed -i "" "s|//build/toolchain/linux:clang_$host_cpu|//build/toolchain/mac:clang_$host_cpu|g" engine/src/build/config/BUILDCONFIG.gn | |
# Pass dummy values to prevent using the default (Linux) toolchain. | |
engine/src/flutter/tools/gn \ | |
--linux \ | |
--linux-cpu=${{ matrix.arch }} \ | |
--no-goma \ | |
--target-toolchain _ \ | |
--target-sysroot _ \ | |
--target-triple _ \ | |
--runtime-mode=${{ matrix.mode }} \ | |
--disable-desktop-embeddings \ | |
--target-dir build | |
cd engine/src | |
ninja -C out/build clang_arm64/gen_snapshot | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_darwin-arm64 | |
path: flutter/engine/src/out/build/clang_arm64/gen_snapshot | |
if-no-files-found: error | |
macos-intel-build: | |
runs-on: macos-13 | |
strategy: | |
matrix: | |
arch: [arm, arm64] | |
mode: [release, profile] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
path: flutter | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- 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: | | |
cd flutter | |
gclient config --unmanaged https://github.com/flutter-tizen/flutter | |
sed -i '' "s/'flutter'/'.'/g" .gclient | |
gclient setdep --var=download_dart_sdk=False --var=download_android_deps=False --var=download_fuchsia_deps=False --deps-file=DEPS | |
gclient sync -v --no-history --shallow | |
- name: Build | |
run: | | |
cd flutter | |
# Change host_toolchain to mac/clang_x64. | |
sed -i "" "s|//build/toolchain/linux:clang_$host_cpu|//build/toolchain/mac:clang_$host_cpu|g" engine/src/build/config/BUILDCONFIG.gn | |
# Pass dummy values to prevent using the default (Linux) toolchain. | |
engine/src/flutter/tools/gn \ | |
--linux \ | |
--linux-cpu=${{ matrix.arch }} \ | |
--no-goma \ | |
--target-toolchain _ \ | |
--target-sysroot _ \ | |
--target-triple _ \ | |
--runtime-mode=${{ matrix.mode }} \ | |
--disable-desktop-embeddings \ | |
--target-dir build | |
cd engine/src | |
ninja -C out/build clang_x64/gen_snapshot | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: tizen-${{ matrix.arch }}-${{ matrix.mode }}_darwin-x64 | |
path: flutter/engine/src/out/build/clang_x64/gen_snapshot | |
if-no-files-found: error | |
release: | |
needs: [build] | |
if: ${{ github.event_name == 'push' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
- name: Create archives | |
run: | | |
for name in tizen-*; do | |
7z a $name.zip ./$name/* | |
done | |
- name: Set variables | |
run: | | |
echo "SHORT_SHA=$(git rev-parse --short $GITHUB_SHA)" >> $GITHUB_ENV | |
echo "VERSION=$(echo "${{ github.ref_name }}" | cut -d'-' -f2)" >> $GITHUB_ENV | |
- uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ env.VERSION }} (${{ 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 }} |