|
| 1 | +name: Android CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + types: [ opened, reopened ] |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | +# This requires about 25GB to properly build. Please make sure the runner can provide that. |
| 12 | + runs-on: self-hosted |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + include: |
| 16 | + - os: android |
| 17 | + arch: arm64 |
| 18 | + - os: android |
| 19 | + arch: arm |
| 20 | + - os: android |
| 21 | + arch: x86 |
| 22 | + - os: android |
| 23 | + arch: x64 |
| 24 | + - os: ios |
| 25 | + arch: arm64 |
| 26 | + steps: |
| 27 | + - name: Checkout |
| 28 | + uses: actions/checkout@v4 |
| 29 | +# This bit always takes forever to finish cloning so lets just cache it |
| 30 | + - name: Cache third_party/llvm |
| 31 | + uses: actions/cache@v4 |
| 32 | + with: |
| 33 | + path: third_party/llvm |
| 34 | + key: ${{ matrix.os }}-third_party-llvm |
| 35 | + - name: Cache third_party/VK-GL-CTS |
| 36 | + uses: actions/cache@v4 |
| 37 | + with: |
| 38 | + path: third_party/VK-GL-CTS |
| 39 | + key: ${{ matrix.os }}-third_party-VK-GL-CTS |
| 40 | + - name: Cache third_party/SwiftShader |
| 41 | + uses: actions/cache@v4 |
| 42 | + with: |
| 43 | + path: third_party/SwiftShader |
| 44 | + key: ${{ matrix.os }}-third_party-SwiftShader |
| 45 | + - name: Cache third_party/dawn |
| 46 | + uses: actions/cache@v4 |
| 47 | + with: |
| 48 | + path: third_party/dawn |
| 49 | + key: ${{ matrix.os }}-third_party-dawn |
| 50 | + - name: Cache depot_tools |
| 51 | + uses: actions/cache@v4 |
| 52 | + with: |
| 53 | + path: depot_tools |
| 54 | + key: ${{ runner.os }}-depot-tools |
| 55 | +# This should only be rarely ran so its here so the cache priority still is somewhat biggest to smallest |
| 56 | + - name: Install depot_tools |
| 57 | + run: | |
| 58 | + if [ ! -d "depot_tools" ] ; then |
| 59 | + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git |
| 60 | + fi |
| 61 | + echo "$PWD/depot_tools" >> $GITHUB_PATH |
| 62 | + - name: Cache tools |
| 63 | + uses: actions/cache@v4 |
| 64 | + with: |
| 65 | + path: tools |
| 66 | + key: ${{ matrix.os }}-tools |
| 67 | + - name: Cache build |
| 68 | + uses: actions/cache@v4 |
| 69 | + with: |
| 70 | + path: build |
| 71 | + key: ${{ matrix.os }}-build |
| 72 | + |
| 73 | + - name: Fetch ANGLE and dependencies |
| 74 | + run: | |
| 75 | + gclient config --spec 'solutions = [ |
| 76 | + { |
| 77 | + "name": ".", |
| 78 | + "url": "https://chromium.googlesource.com/angle/angle.git", |
| 79 | + "deps_file": "DEPS", |
| 80 | + "managed": False, |
| 81 | + "custom_vars": {}, |
| 82 | + }, |
| 83 | + ] |
| 84 | + target_os = ["${{ matrix.os }}"]' |
| 85 | + gclient sync -Rf |
| 86 | + - name: Build ANGLE |
| 87 | + run: | |
| 88 | + gn gen out/${{ matrix.os }}-${{ matrix.arch }} |
| 89 | + autoninja -C out/${{ matrix.os }}-${{ matrix.arch }} |
| 90 | + - name: Upload build |
| 91 | + uses: actions/upload-artifact@v4 |
| 92 | + with: |
| 93 | + name: ANGLE-${{ matrix.os }}-${{ matrix.arch }} |
| 94 | + path: out/${{ matrix.os }}-${{ matrix.arch }} |
0 commit comments