Skip to content

Commit

Permalink
Build release tag + software
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinvarbanov committed Oct 7, 2024
1 parent 3633501 commit b1d7749
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 7 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@


name: Build Flutter Engine

on:
push:
branches:
- experimental


jobs:
build:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
include:
- mode: '--unoptimized --runtime-mode=debug'
prefix: host_debug_unopt
- mode: '--unoptimized --runtime-mode=release'
prefix: host_release_unopt
- mode: '--unoptimized --runtime-mode=profile'
prefix: host_profile_unopt
# - mode: '--ios --unoptimized --runtime-mode=release'
# prefix: ios_release_unopt
# - mode: '--ios --unoptimized --runtime-mode=debug'
# prefix: ios_debug_unopt
# - mode: '--ios --unoptimized --runtime-mode=profile'
# prefix: ios_profile_unopt
- mode: '--ios --runtime-mode=release'
prefix: ios_release
- mode: '--ios --runtime-mode=debug'
prefix: ios_debug
- mode: '--ios --runtime-mode=profile'
prefix: ios_profile

steps:

- name: Setup depot_tools
shell: bash
run: |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
echo "${{ github.workspace}}/depot_tools" >> $GITHUB_PATH
- name: Checkout source
shell: bash
run: |
mkdir -p engine
cat > engine/.gclient <<- EOF
solutions = [
{
"managed": False,
"name": "src/flutter",
"url": "https://github.com/abaltatech/flutter-engine.git",
"custom_deps": {},
"deps_file": "DEPS",
"safesync_url": "",
},
]
EOF
- name: Setup environment
shell: bash
working-directory: engine
run: |
gclient sync
# TODO: fix github.ref checkout
- name: Fetch source
shell: bash
working-directory: engine/src/flutter
run: |
git checkout experimental
# git checkout ${{ github.ref }}
- name: Re-fetch dependencies
shell: bash
working-directory: engine
run: |
gclient sync
- name: Generate build files
shell: bash
working-directory: engine/src
run: |
./flutter/tools/gn ${{ matrix.mode }}
- name: Build
shell: bash
working-directory: engine/src
run: |
find out -mindepth 1 -maxdepth 1 -type d | xargs -n 1 sh -c 'ninja -C $0 || exit 255'
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.prefix }}
path: |
engine/src/out/*/*.xcframework
engine/src/out/*/gen_snapshot*
7 changes: 0 additions & 7 deletions shell/platform/darwin/ios/rendering_api_selection.mm
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,9 @@ bool ShouldUseMetalRenderer() {
}

IOSRenderingAPI GetRenderingAPIForProcess(bool force_software) {
#if TARGET_OS_SIMULATOR
if (force_software) {
return IOSRenderingAPI::kSoftware;
}
#else
if (force_software) {
FML_LOG(WARNING) << "The --enable-software-rendering is only supported on Simulator targets "
"and will be ignored.";
}
#endif // TARGET_OS_SIMULATOR

static bool should_use_metal = ShouldUseMetalRenderer();
if (should_use_metal) {
Expand Down

0 comments on commit b1d7749

Please sign in to comment.