|
| 1 | + |
| 2 | + |
| 3 | +name: Build Flutter Engine |
| 4 | + |
| 5 | +on: |
| 6 | + push: |
| 7 | + branches: |
| 8 | + - experimental |
| 9 | + |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + runs-on: macos-latest |
| 14 | + strategy: |
| 15 | + fail-fast: false |
| 16 | + matrix: |
| 17 | + include: |
| 18 | + - mode: '--unoptimized --runtime-mode=debug' |
| 19 | + prefix: host_debug_unopt |
| 20 | + - mode: '--unoptimized --runtime-mode=release' |
| 21 | + prefix: host_release_unopt |
| 22 | + - mode: '--unoptimized --runtime-mode=profile' |
| 23 | + prefix: host_profile_unopt |
| 24 | + # - mode: '--ios --unoptimized --runtime-mode=release' |
| 25 | + # prefix: ios_release_unopt |
| 26 | + # - mode: '--ios --unoptimized --runtime-mode=debug' |
| 27 | + # prefix: ios_debug_unopt |
| 28 | + # - mode: '--ios --unoptimized --runtime-mode=profile' |
| 29 | + # prefix: ios_profile_unopt |
| 30 | + - mode: '--ios --runtime-mode=release' |
| 31 | + prefix: ios_release |
| 32 | + - mode: '--ios --runtime-mode=debug' |
| 33 | + prefix: ios_debug |
| 34 | + - mode: '--ios --runtime-mode=profile' |
| 35 | + prefix: ios_profile |
| 36 | + |
| 37 | + steps: |
| 38 | + |
| 39 | + - name: Setup depot_tools |
| 40 | + shell: bash |
| 41 | + run: | |
| 42 | + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 43 | +
|
| 44 | + echo "${{ github.workspace}}/depot_tools" >> $GITHUB_PATH |
| 45 | +
|
| 46 | + - name: Checkout source |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + mkdir -p engine |
| 50 | + cat > engine/.gclient <<- EOF |
| 51 | + solutions = [ |
| 52 | + { |
| 53 | + "managed": False, |
| 54 | + "name": "src/flutter", |
| 55 | + "url": "https://github.com/abaltatech/flutter-engine.git", |
| 56 | + "custom_deps": {}, |
| 57 | + "deps_file": "DEPS", |
| 58 | + "safesync_url": "", |
| 59 | + }, |
| 60 | + ] |
| 61 | + EOF |
| 62 | +
|
| 63 | + - name: Setup environment |
| 64 | + shell: bash |
| 65 | + working-directory: engine |
| 66 | + run: | |
| 67 | + gclient sync |
| 68 | +
|
| 69 | + # TODO: fix github.ref checkout |
| 70 | + - name: Fetch source |
| 71 | + shell: bash |
| 72 | + working-directory: engine/src/flutter |
| 73 | + run: | |
| 74 | + git checkout experimental |
| 75 | + # git checkout ${{ github.ref }} |
| 76 | +
|
| 77 | + - name: Re-fetch dependencies |
| 78 | + shell: bash |
| 79 | + working-directory: engine |
| 80 | + run: | |
| 81 | + gclient sync |
| 82 | +
|
| 83 | + - name: Generate build files |
| 84 | + shell: bash |
| 85 | + working-directory: engine/src |
| 86 | + run: | |
| 87 | + ./flutter/tools/gn ${{ matrix.mode }} |
| 88 | +
|
| 89 | + - name: Build |
| 90 | + shell: bash |
| 91 | + working-directory: engine/src |
| 92 | + run: | |
| 93 | + find out -mindepth 1 -maxdepth 1 -type d | xargs -n 1 sh -c 'ninja -C $0 || exit 255' |
| 94 | +
|
| 95 | + - uses: actions/upload-artifact@v4 |
| 96 | + with: |
| 97 | + name: ${{ matrix.prefix }} |
| 98 | + path: | |
| 99 | + engine/src/out/*/*.xcframework |
| 100 | + engine/src/out/*/gen_snapshot* |
0 commit comments