|
| 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 | + mode: |
| 18 | + - '--unoptimized --runtime-mode=debug' |
| 19 | + # - '--unoptimized --runtime-mode=profile' |
| 20 | + - '--unoptimized --runtime-mode=release' |
| 21 | + # - '--ios --unoptimized --runtime-mode=debug' |
| 22 | + # - '--ios --unoptimized --runtime-mode=profile' |
| 23 | + # - '--ios --unoptimized --runtime-mode=release' |
| 24 | + # - '--ios --runtime-mode=debug' |
| 25 | + # - '--ios --runtime-mode=profile' |
| 26 | + - '--ios --runtime-mode=release' |
| 27 | + steps: |
| 28 | + |
| 29 | + - name: Setup depot_tools |
| 30 | + shell: bash |
| 31 | + run: | |
| 32 | + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 33 | +
|
| 34 | + echo "${{ github.workspace}}/depot_tools" >> $GITHUB_PATH |
| 35 | +
|
| 36 | + - name: Checkout source |
| 37 | + shell: bash |
| 38 | + run: | |
| 39 | + mkdir -p engine |
| 40 | + cat > engine/.gclient <<- EOF |
| 41 | + solutions = [ |
| 42 | + { |
| 43 | + "managed": False, |
| 44 | + "name": "src/flutter", |
| 45 | + "url": "https://github.com/abaltatech/flutter-engine.git", |
| 46 | + "custom_deps": {}, |
| 47 | + "deps_file": "DEPS", |
| 48 | + "safesync_url": "", |
| 49 | + }, |
| 50 | + ] |
| 51 | + EOF |
| 52 | +
|
| 53 | + - name: Setup environment |
| 54 | + shell: bash |
| 55 | + working-directory: engine |
| 56 | + run: | |
| 57 | + gclient sync |
| 58 | +
|
| 59 | + # TODO: fix github.ref checkout |
| 60 | + - name: Fetch source |
| 61 | + shell: bash |
| 62 | + working-directory: engine/src/flutter |
| 63 | + run: | |
| 64 | + git checkout experimental |
| 65 | + # git checkout ${{ github.ref }} |
| 66 | +
|
| 67 | + - name: Re-fetch dependencies |
| 68 | + shell: bash |
| 69 | + working-directory: engine |
| 70 | + run: | |
| 71 | + gclient sync |
| 72 | +
|
| 73 | + - name: Generate build files |
| 74 | + shell: bash |
| 75 | + working-directory: engine/src |
| 76 | + run: | |
| 77 | + ./flutter/tools/gn ${{ matrix.mode }} |
| 78 | +
|
| 79 | + - name: Build |
| 80 | + shell: bash |
| 81 | + working-directory: engine/src |
| 82 | + run: | |
| 83 | + find out -mindepth 1 -maxdepth 1 -type d | xargs -n 1 sh -c 'ninja -C $0 || exit 255' |
| 84 | +
|
| 85 | + - uses: actions/upload-artifact@v4 |
| 86 | + with: |
| 87 | + name: engine |
| 88 | + path: | |
| 89 | + engine/src/out/*/*.xcframework |
| 90 | + engine/src/out/*/gen_snapshot* |
0 commit comments