ANGLE #287
This file contains hidden or 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: ANGLE | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| arch: ["arm64", "arm64-fastdebug"] # "x86_64", "arm32", | |
| fail-fast: false | |
| name: "Build for Android ${{matrix.arch}}" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 1 | |
| # ---------- 缓存 depot_tools ---------- | |
| - name: Cache depot_tools | |
| id: cache-depot-tools | |
| uses: actions/cache@main | |
| with: | |
| path: | | |
| depot_tools | |
| .gclient | |
| tools/flex-bison | |
| third_party/llvm-build | |
| third_party/rust-toolchain | |
| tools/flex-bison | |
| key: depot-tools-${{ runner.os }}-${{ hashFiles('.gclient') }} | |
| restore-keys: | | |
| depot-tools-${{ runner.os }}- | |
| - name: Setup depot_tools | |
| if: steps.cache-depot-tools.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| sudo rm -rf /usr/share/dotnet | |
| sudo rm -rf /opt/ghc | |
| sudo rm -rf /usr/local/share/boost | |
| sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
| sudo rm -rf JAVA_HOME_8_X64 | |
| sudo rm -rf /usr/share/miniconda | |
| sudo rm -rf /usr/local/share/vcpkg | |
| sudo rm -rf /usr/local/lib/android/sdk/ndk/27.3.13750724 | |
| git clone --depth 1 https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
| - name: Run gclient sync | |
| shell: bash | |
| run: | | |
| export PATH=`pwd`/depot_tools:$PATH | |
| if [ ! -f .gclient ]; then | |
| vpython3 scripts/bootstrap.py | |
| fi | |
| COMMIT_COUNT=$(git ls-remote origin | wc -l) | |
| echo "ANGLE_COMMIT_COUNT=$COMMIT_COUNT" >> $GITHUB_ENV | |
| echo "DEPOT_TOOLS_COMMIT=$(git -C depot_tools rev-parse HEAD)" >> $GITHUB_ENV | |
| echo $PATH | |
| gclient sync --no-history --shallow --reset --force | |
| - name: ccache | |
| uses: hendrikmuhs/ccache-action@main | |
| with: | |
| key: angle-ccache | |
| max-size: 8G | |
| - name: Build ANGLE | |
| shell: bash | |
| run: | | |
| COMMIT_COUNT=$(git ls-remote origin | wc -l) | |
| echo "ANGLE_COMMIT_COUNT=$COMMIT_COUNT" >> $GITHUB_ENV | |
| echo "DEPOT_TOOLS_COMMIT=$(git -C depot_tools rev-parse HEAD)" >> $GITHUB_ENV | |
| export PATH=`pwd`/depot_tools:$PATH | |
| export NDK_CCACHE="ccache" | |
| echo $PATH | |
| gn gen out/Android-${{matrix.arch}} --threads=$(nproc) | |
| gn args out/Android-${{ matrix.arch }} --list --short | |
| autoninja -C out/Android-${{matrix.arch}} -j $(nproc) | |
| - name: Dump logs on failure | |
| if: failure() | |
| shell: bash | |
| run: | | |
| find out/Android-${{matrix.arch}} -name "siso_output" -exec cat {} \; | |
| chmod +x ./out/Android-${{matrix.arch}}/siso_failed_commands.sh | |
| ./out/Android-${{matrix.arch}}/siso_failed_commands.sh | |
| - name: Upload angle | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: angle-${{matrix.arch}}-${{ github.run_number }} | |
| path: out/Android-${{matrix.arch}}/*.so | |
| # - name: Upload libc++ | |
| # uses: actions/upload-artifact@main | |
| # with: | |
| # name: libc++-${{matrix.arch}}-${{ github.run_number }} | |
| # path: | | |
| # **/gen/third_party/libc++ | |
| # **/obj/buildtools/third_party/libc++abi |