build: pass along the make program #482
Workflow file for this run
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: Build and Test | |
| on: | |
| pull_request: | |
| paths-ignore: | |
| - 'README.md' | |
| - 'Documentation/**' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| workflow_call: | |
| env: | |
| LLVM_REF: ec450b19004a653f3db3ad50e88fbf6529a9d841 | |
| SCCACHE_DIRECT: yes | |
| jobs: | |
| windows_tools: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: compnerd/gha-setup-vsdevenv@main | |
| - name: Install Build Tools | |
| run: choco install winflexbison3 | |
| - name: Configure | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/RegsGen2 ` | |
| -C ${{ github.workspace }}/cmake/caches/MSVCWarnings.cmake ` | |
| -G "Visual Studio 17 2022" ` | |
| -A x64 ` | |
| -S ${{ github.workspace }}/Tools/RegsGen2 | |
| - name: Build | |
| run: cmake --build ${{ github.workspace }}/BinaryCache/RegsGen2 --config Release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-regsgen2 | |
| path: | | |
| ${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe | |
| windows: | |
| needs: [windows_tools] | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| arch: ['Win32', 'x64'] # ['ARM', 'ARM64'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Build Tools | |
| run: choco install winflexbison3 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-regsgen2 | |
| path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release | |
| - name: Configure | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/ds2 ` | |
| -C ${{ github.workspace }}/cmake/caches/MSVCWarnings.cmake ` | |
| -G "Visual Studio 17 2022" ` | |
| -A ${{ matrix.arch }} ` | |
| -D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe ` | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-${{ matrix.arch }}-ds2 | |
| path: | | |
| ${{ github.workspace }}/BinaryCache/ds2/Release/ds2.exe | |
| bazel: | |
| runs-on: ubuntu-latest | |
| name: Bazel Build Check | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }}/SourceCache/ds2 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq --no-install-recommends bison flex ninja-build | |
| - run: | | |
| bazel build //... | |
| working-directory: ${{ github.workspace }}/SourceCache/ds2 | |
| mingw: | |
| needs: [windows_tools] | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { system: ucrt64, env: ucrt-x86_64 } | |
| - { system: clang64, env: clang-x86_64 } | |
| steps: | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.system }} | |
| install: >- | |
| flex | |
| bison | |
| mingw-w64-${{ matrix.env }}-cmake | |
| mingw-w64-${{ matrix.env }}-toolchain | |
| mingw-w64-${{ matrix.env }}-ninja | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-regsgen2 | |
| path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release | |
| - name: Configure | |
| run: | | |
| cmake -B $(cygpath -u '${{ github.workspace }}/BinaryCache/ds2') \ | |
| -C $(cygpath -u '${{ github.workspace }}/cmake/caches/GNUWarnings.cmake') \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -G Ninja \ | |
| -D DS2_REGSGEN2=$(cygpath -u '${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe') \ | |
| -S $(cygpath -u '${{ github.workspace }}') | |
| - name: Build | |
| run: cmake --build $(cygpath -u '${{ github.workspace }}/BinaryCache/ds2') --config Release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: mingw-${{ matrix.system }}-ds2 | |
| path: | | |
| ${{ github.workspace }}/BinaryCache/ds2/ds2.exe | |
| macos: | |
| # The macos-latest runner image runs on an M1 ARM CPU which is not currently | |
| # supported by ds2. Build on macos-13, which is x86_64-based, until Darwin | |
| # on ARM support is implemented. | |
| runs-on: macos-13 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@master | |
| - name: Configure | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/ds2 \ | |
| -C ${{ github.workspace }}/cmake/caches/ClangWarnings.cmake \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -G Ninja \ | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: macOS-x86_64-ds2 | |
| path: | | |
| ${{ github.workspace }}/BinaryCache/ds2/ds2 | |
| linux: | |
| runs-on: ubuntu-latest | |
| name: Linux (${{ matrix.processor }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - processor: x86_64 | |
| compiler_packages: | |
| c_compiler: gcc | |
| cxx_compiler: g++ | |
| cflags: | |
| cxxflags: | |
| - processor: i686 | |
| compiler_packages: gcc-multilib g++-multilib | |
| c_compiler: gcc | |
| cxx_compiler: g++ | |
| cflags: "-m32" | |
| cxxflags: "-m32" | |
| - processor: arm | |
| compiler_packages: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi | |
| c_compiler: arm-linux-gnueabi-gcc | |
| cxx_compiler: arm-linux-gnueabi-g++ | |
| cflags: | |
| cxxflags: | |
| - processor: aarch64 | |
| compiler_packages: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
| c_compiler: aarch64-linux-gnu-gcc | |
| cxx_compiler: aarch64-linux-gnu-g++ | |
| cflags: | |
| cxxflags: | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }}/SourceCache/ds2 | |
| - run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq --no-install-recommends bison flex ninja-build ${{ matrix.compiler_packages }} | |
| - name: Configure | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/ds2 \ | |
| -S ${{ github.workspace }}/SourceCache/ds2 \ | |
| -C ${{ github.workspace }}/SourceCache/ds2/cmake/caches/GNUWarnings.cmake \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -D CMAKE_SYSTEM_NAME=Linux \ | |
| -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.processor }} \ | |
| -D CMAKE_C_COMPILER=${{ matrix.c_compiler }} \ | |
| -D CMAKE_CXX_COMPILER=${{ matrix.cxx_compiler }} \ | |
| -D CMAKE_C_FLAGS=${{ matrix.cflags }} \ | |
| -D CMAKE_CXX_FLAGS=${{ matrix.cxxflags }} \ | |
| -G Ninja | |
| - name: Build | |
| run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release | |
| # Tar the output to preserve permissions. | |
| - name: tar output | |
| run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.processor }}-ds2 | |
| path: ${{ github.workspace }}/BinaryCache/ds2.tar | |
| freebsd: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| processor: [ x86_64 ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }}/SourceCache/ds2 | |
| - uses: vmactions/freebsd-vm@v1 | |
| name: Build on FreeBSD VM | |
| with: | |
| prepare: | | |
| pkg install -y cmake bison flex ninja | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/ds2 \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -D CMAKE_SYSTEM_NAME=FreeBSD \ | |
| -D CMAKE_SYSTEM_PROCESSOR=${{ matrix.processor }} \ | |
| -G Ninja \ | |
| -S ${{ github.workspace }}/SourceCache/ds2 | |
| cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release | |
| # Tar the output to preserve permissions. | |
| - name: tar output | |
| run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: freebsd-${{ matrix.processor }}-ds2 | |
| path: ${{ github.workspace }}/BinaryCache/ds2.tar | |
| # Cross-compile for Android on a Windows host. | |
| android-windows-ndk: | |
| needs: [windows_tools] | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| abi: ['x86_64', 'x86', 'arm64-v8a', 'armeabi-v7a'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: seanmiddleditch/gha-setup-ninja@master | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-regsgen2 | |
| path: ${{ github.workspace }}/BinaryCache/RegsGen2/Release | |
| - name: Install Build Tools | |
| run: choco install winflexbison3 | |
| # cmake finds the Android NDK from ANDROID_NDK in the environment, which | |
| # is pre-installed and configured in the Windows runner image. | |
| - name: Configure | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/ds2 ` | |
| -D CMAKE_BUILD_TYPE=Release ` | |
| -D CMAKE_SYSTEM_NAME=Android ` | |
| -D CMAKE_ANDROID_ARCH_ABI=${{ matrix.abi }} ` | |
| -D DS2_REGSGEN2=${{ github.workspace }}/BinaryCache/RegsGen2/Release/regsgen2.exe ` | |
| -G Ninja | |
| - name: Build | |
| run: cmake --build ${{ github.workspace }}/BinaryCache/ds2 --config Release | |
| # Tar the output to preserve permissions. | |
| - name: tar output | |
| run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/ds2.tar ds2 | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-${{ matrix.abi }}-ds2 | |
| path: ${{ github.workspace }}/BinaryCache/ds2.tar | |
| build-lldb-linux: | |
| name: Build LLDB | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| runner: [ubuntu-latest, ubuntu-24.04-arm] | |
| steps: | |
| - name: Install LZMA libraries | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq --no-install-recommends lzma-dev liblzma-dev | |
| - if: ${{ !contains(matrix.runner, 'arm') }} | |
| uses: seanmiddleditch/gha-setup-ninja@v5 | |
| - if: contains(matrix.runner, 'arm') | |
| uses: seanmiddleditch/gha-setup-ninja@v5 | |
| with: | |
| # TODO(andrurogerz): seanmiddleditch/gha-setup-ninja does not properly | |
| # detect Linux on arm64 and always installs the x86_64 ninja package. | |
| # For now, we can fix this by overriding the platform string to force | |
| # the downloading the proper package. We also require a newer ninja | |
| # version since aarch64 packages were not released until v1.12.0 and | |
| # the default gha-setup-ninja installs is v1.11.1. | |
| platform: linux-aarch64 | |
| version: 1.12.1 # latest sccache version | |
| - name: Setup sccache | |
| uses: hendrikmuhs/ccache-action@433beb5b585c67c13415f39d5ba7e485b1920710 | |
| with: | |
| key: llvm-${{ runner.os }}-${{ runner.arch }} | |
| variant: sccache | |
| - name: Checkout llvm project | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: llvm/llvm-project | |
| ref: ${{ env.LLVM_REF }} | |
| path: ${{ github.workspace }}/SourceCache/llvm | |
| # Build clang and a Python-enabled lldb binary to execute the lldb tests | |
| - name: Configure lldb build | |
| run: | | |
| cmake -B ${{ github.workspace }}/BinaryCache/llvm \ | |
| -S ${{ github.workspace }}/SourceCache/llvm/llvm \ | |
| -D LLVM_ENABLE_PROJECTS='clang;lldb' \ | |
| -D LLVM_TARGETS_TO_BUILD="host" \ | |
| -D LLDB_ENABLE_PYTHON=On \ | |
| -D LLDB_ENABLE_LZMA=On \ | |
| -D CMAKE_C_COMPILER_LAUNCHER=sccache \ | |
| -D CMAKE_CXX_COMPILER_LAUNCHER=sccache \ | |
| -D CMAKE_BUILD_TYPE=Release \ | |
| -G Ninja | |
| - name: Build llvm | |
| run: | | |
| cmake --build ${{ github.workspace }}/BinaryCache/llvm \ | |
| --target tools/lldb/test/API/lldb-api-test-deps \ | |
| --config Release | |
| # Tar the build output to preserve permissions. | |
| - name: tar output | |
| run: tar -C ${{ github.workspace }}/BinaryCache -cvf ${{ github.workspace }}/BinaryCache/llvm.tar llvm | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: llvm-${{ runner.os }}-${{ runner.arch }} | |
| path: ${{ github.workspace }}/BinaryCache/llvm.tar | |
| test-linux: | |
| needs: [linux, build-lldb-linux] | |
| runs-on: ${{ matrix.runner }} | |
| name: Test Linux ${{ matrix.arch }} ${{ matrix.test-category }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - test-category: misc | |
| runner: ubuntu-latest | |
| arch: i686 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/api | |
| SourceCache/llvm/lldb/test/API/lang | |
| SourceCache/llvm/lldb/test/API/linux | |
| SourceCache/llvm/lldb/test/API/tools | |
| SourceCache/llvm/lldb/test/API/sanity | |
| SourceCache/llvm/lldb/test/API/types | |
| - test-category: misc | |
| runner: ubuntu-latest | |
| arch: x86_64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/api | |
| SourceCache/llvm/lldb/test/API/lang | |
| SourceCache/llvm/lldb/test/API/linux | |
| SourceCache/llvm/lldb/test/API/tools | |
| SourceCache/llvm/lldb/test/API/sanity | |
| SourceCache/llvm/lldb/test/API/types | |
| - test-category: misc | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/api | |
| SourceCache/llvm/lldb/test/API/lang | |
| SourceCache/llvm/lldb/test/API/linux | |
| SourceCache/llvm/lldb/test/API/tools | |
| SourceCache/llvm/lldb/test/API/sanity | |
| SourceCache/llvm/lldb/test/API/types | |
| - test-category: commands | |
| runner: ubuntu-latest | |
| arch: x86_64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/commands | |
| - test-category: commands | |
| runner: ubuntu-latest | |
| arch: i686 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/commands | |
| - test-category: commands | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/commands | |
| - test-category: Python API | |
| runner: ubuntu-latest | |
| arch: x86_64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/python_api | |
| - test-category: Python API | |
| runner: ubuntu-latest | |
| arch: i686 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/python_api | |
| - test-category: Python API | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/python_api | |
| - test-category: functionalities | |
| runner: ubuntu-latest | |
| arch: x86_64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/functionalities | |
| - test-category: functionalities | |
| runner: ubuntu-latest | |
| arch: i686 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/functionalities | |
| - test-category: functionalities | |
| runner: ubuntu-24.04-arm | |
| arch: aarch64 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/functionalities | |
| steps: | |
| - if: matrix.arch == 'i686' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -qq --no-install-recommends gcc-multilib g++-multilib | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: llvm-${{ runner.os }}-${{ runner.arch }} | |
| path: ${{ github.workspace }}/BinaryCache | |
| - name: untar llvm artifacts | |
| run: | | |
| tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/llvm.tar | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: linux-${{ matrix.arch }}-ds2 | |
| path: ${{ github.workspace }}/BinaryCache | |
| - name: untar ds2 artifacts | |
| run: | | |
| tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/ds2.tar | |
| - name: Checkout llvm project | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: llvm/llvm-project | |
| ref: ${{ env.LLVM_REF }} | |
| path: ${{ github.workspace }}/SourceCache/llvm | |
| - name: Checkout ds2 | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }}/SourceCache/ds2 | |
| - run: | | |
| mkdir -p ${{ github.workspace }}/temp | |
| ${{ github.workspace }}/BinaryCache/ds2/ds2 platform --server --daemonize --listen localhost:5432 | |
| ${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest 1>/dev/null \ | |
| --out-of-tree-debugserver \ | |
| --arch ${{ matrix.arch }} \ | |
| --platform-name remote-linux \ | |
| --platform-url connect://localhost:5432 \ | |
| --platform-working-dir ${{ github.workspace }}/temp \ | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/linux-${{ matrix.arch }}.excluded \ | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/linux-${{ matrix.arch }}.excluded \ | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded \ | |
| -v \ | |
| ${{ matrix.test-subdirs }} | |
| test-android-x86: | |
| needs: [android-windows-ndk, build-lldb-linux] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - test-category: misc | |
| arch: x86_64 | |
| llvm-arch: x86_64 | |
| android-api-level: 28 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/android | |
| SourceCache/llvm/lldb/test/API/api | |
| SourceCache/llvm/lldb/test/API/lang | |
| SourceCache/llvm/lldb/test/API/linux | |
| SourceCache/llvm/lldb/test/API/tools | |
| SourceCache/llvm/lldb/test/API/sanity | |
| SourceCache/llvm/lldb/test/API/types | |
| - test-category: commands | |
| arch: x86_64 | |
| llvm-arch: x86_64 | |
| android-api-level: 28 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/commands | |
| - test-category: Python API | |
| arch: x86_64 | |
| llvm-arch: x86_64 | |
| android-api-level: 28 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/python_api | |
| - test-category: functionalities | |
| arch: x86_64 | |
| llvm-arch: x86_64 | |
| android-api-level: 28 | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/functionalities | |
| # Run a small sub-set of tests on arm64. The emulator is very slow | |
| # so it is not practical to run more tests until we can run on an | |
| # arm64 runner with virtualization. | |
| - test-category: sanity | |
| arch: arm64-v8a | |
| llvm-arch: aarch64 | |
| # Android emulator supports ARM on x86 only on API < 28 | |
| android-api-level: 27 | |
| # This is the most recent build of the emulator that supports | |
| # booting arm64 images. | |
| emulator-build: 12234392 | |
| emulator-options: -qemu -machine virt -cpu max | |
| test-subdirs: >- | |
| SourceCache/llvm/lldb/test/API/android | |
| SourceCache/llvm/lldb/test/API/api | |
| SourceCache/llvm/lldb/test/API/linux | |
| SourceCache/llvm/lldb/test/API/sanity | |
| name: Test Android ${{ matrix.arch}} ${{ matrix.test-category }} | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: llvm-${{ runner.os }}-${{ runner.arch }} | |
| path: ${{ github.workspace }}/BinaryCache | |
| - name: untar llvm artifacts | |
| run: | | |
| tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/llvm.tar | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: android-${{ matrix.arch }}-ds2 | |
| path: ${{ github.workspace }}/BinaryCache | |
| - name: untar ds2 artifacts | |
| run: | | |
| tar -C ${{ github.workspace }}/BinaryCache -xvf ${{ github.workspace }}/BinaryCache/ds2.tar | |
| - name: Checkout llvm project | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: llvm/llvm-project | |
| ref: ${{ env.LLVM_REF }} | |
| path: ${{ github.workspace }}/SourceCache/llvm | |
| - name: Checkout ds2 | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }}/SourceCache/ds2 | |
| # Cache the contents of $HOME/.android which contains emulators, | |
| # snapshots, and adb state. | |
| - name: Setup AVD cache | |
| uses: actions/cache@v4 | |
| id: avd-cache | |
| with: | |
| path: ~/.android/** | |
| key: avd-${{ runner.os }}-${{ matrix.arch }}-${{ matrix.android-api-level }} | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: Create AVD and generate snapshot for caching | |
| if: steps.avd-cache.outputs.cache-hit != 'true' | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| emulator-build: ${{ matrix.emulator-build }} | |
| api-level: ${{ matrix.android-api-level }} | |
| arch: ${{ matrix.arch }} | |
| force-avd-creation: false | |
| emulator-options: -no-window -noaudio -no-boot-anim -camera-back none -gpu swiftshader_indirect ${{ matrix.emulator-options }} | |
| disable-animations: false | |
| script: echo "Generated AVD snapshot for caching." | |
| - name: Run lldb tests against ds2 on Android emulator | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| emulator-build: ${{ matrix.emulator-build }} | |
| api-level: ${{ matrix.android-api-level }} | |
| arch: ${{ matrix.arch }} | |
| force-avd-creation: false | |
| # NOTE: -no-snapshot will not load or save state and the emulator will | |
| # cold boot. Ideally, we would specify -no-snapshot-save instead so it | |
| # would load the snapshot created in the caching step (but not save a | |
| # new one). However, doing that causes the emulator to hang during | |
| # shutdown. We're still saving time by reusing the device created in | |
| # the caching step and not wiping userdata on boot. | |
| emulator-options: -no-snapshot -no-window -noaudio -no-boot-anim -camera-back none -gpu swiftshader_indirect ${{ matrix.emulator-options }} | |
| disable-animations: true | |
| script: > | |
| $ANDROID_SDK_ROOT/platform-tools/adb forward tcp:5432 tcp:5432 | |
| $ANDROID_SDK_ROOT/platform-tools/adb push "${{ github.workspace }}/BinaryCache/ds2/ds2" /data/local/tmp | |
| $ANDROID_SDK_ROOT/platform-tools/adb shell "chmod +x /data/local/tmp/ds2" | |
| $ANDROID_SDK_ROOT/platform-tools/adb shell "/data/local/tmp/ds2 platform --server --daemonize --listen localhost:5432" | |
| ${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest 1>/dev/null | |
| --out-of-tree-debugserver | |
| --arch ${{ matrix.llvm-arch }} | |
| --platform-name remote-android | |
| --platform-url connect://localhost:5432 | |
| --platform-working-dir /data/local/tmp | |
| --compiler=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/${{ matrix.llvm-arch }}-linux-android${{ matrix.android-api-level }}-clang | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/android-${{ matrix.llvm-arch }}.excluded | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/android-${{ matrix.llvm-arch }}.excluded | |
| --excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded | |
| -v | |
| ${{ matrix.test-subdirs }} |