Add initial build workflow for ios #3
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
name: Build Flutter Engine | |
on: | |
push: | |
branches: | |
- experimental | |
jobs: | |
build: | |
runs-on: macos-latest | |
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 | |
ls -la src/ | |
# - name: Fetch source | |
# shell: bash | |
# working-directory: engine/src/flutter | |
# run: | | |
# git pull origin main | |
# - 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 --unoptimized | |
./flutter/tools/gn --ios --unoptimized | |
# final list: | |
# ./flutter/tools/gn --unoptimized --runtime-mode=debug | |
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=debug | |
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=profile | |
# ./flutter/tools/gn --ios --unoptimized --runtime-mode=release | |
# ./flutter/tools/gn --ios --runtime-mode=debug | |
# ./flutter/tools/gn --ios --runtime-mode=profile | |
# ./flutter/tools/gn --ios --runtime-mode=release | |
- name: Build | |
shell: bash | |
working-directory: engine/src | |
run: | | |
ninja -C out/ios_debug_unopt | |
ninja -C out/host_debug_unopt | |
# find . -mindepth 1 -maxdepth 1 -type d | xargs -n 1 sh -c 'ninja -C $0 || exit 255' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: gen_snaphot | |
path: engine/src/out/*/gen_* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: framework | |
path: engine/src/out/*/*.xcframework |