Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/actions/run-lldb-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ inputs:
description: Path to the checked-out ds2 repository
required: true
arch:
description: Architecture to pass to dotest.py's --arch (e.g. x86_64, i686, aarch64)
description: >-
Architecture (e.g. x86_64, i686, aarch64), passed to dotest.py as
--triple <arch>-unknown-linux-gnu (dotest.py dropped --arch in favor
of --triple as of release/23.x)
required: true
platform:
description: >-
Expand Down Expand Up @@ -83,7 +86,7 @@ runs:
# lldb-dotest itself, not to grep.
"${{ inputs.python }}" "${{ inputs.lldb-dotest-path }}" \
--out-of-tree-debugserver \
--arch "${{ inputs.arch }}" \
--triple "${{ inputs.arch }}-unknown-linux-gnu" \
--platform-name "remote-${{ inputs.platform }}" \
--platform-url "connect://localhost:${{ inputs.listen-port }}" \
--platform-working-dir "${{ inputs.working-dir }}" \
Expand Down
79 changes: 78 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ concurrency:
cancel-in-progress: true

env:
LLVM_REF: ec450b19004a653f3db3ad50e88fbf6529a9d841
LLVM_REF: bb9934d4dfef9033ded36d26827dbb6d3ac1dd92 # release/23.x
Comment thread
compnerd marked this conversation as resolved.
SCCACHE_DIRECT: 'true'

jobs:
Expand Down Expand Up @@ -481,3 +481,80 @@ jobs:
uses: ./.github/workflows/test-android.yml
with:
llvm-ref: ${{ needs.vars.outputs.llvm-ref }}

test-windows:
needs: [vars, windows, windows_arm64, build-lldb-windows]
uses: ./.github/workflows/test-windows.yml
with:
llvm-ref: ${{ needs.vars.outputs.llvm-ref }}

build-lldb-windows:
name: Build LLDB (Windows ${{ matrix.runner-arch }})
runs-on: ${{ matrix.runner }}

strategy:
fail-fast: false
matrix:
include:
- runner: windows-latest
runner-arch: X64
- runner: windows-11-arm
runner-arch: ARM64

steps:
# windows-latest carries several hostedtoolcache Python versions side
# by side; CMake's find_package(Python3) picks the newest one it can
# see, which need not be the one the plain `python` on PATH resolves
# to (the interpreter test-windows later uses to run lldb-dotest).
# Capture that one now, before vsdevenv's PATH rewrite, and pin the
# lldb build to it so the compiled _lldb extension's Python ABI tag
# matches what actually imports it at test time.
- name: Locate default Python
id: python
run: echo "path=$((Get-Command python).Source)" >> $env:GITHUB_OUTPUT

- uses: compnerd/gha-setup-vsdevenv@v7

- name: Install Build Tools
run: choco install swig make

- name: Setup sccache
uses: hendrikmuhs/ccache-action@d62db5f07c26379fc4b4e0916f098a92573c3b03 # v1.2.23
with:
key: llvm-${{ runner.os }}-${{ matrix.runner-arch }}
variant: sccache

- name: Checkout llvm project
uses: actions/checkout@v7
with:
repository: llvm/llvm-project
ref: ${{ env.LLVM_REF }}
path: ${{ github.workspace }}/SourceCache/llvm

# Build clang, lld (required to link test inferiors on Windows) 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;lld;lldb' `
-D LLVM_TARGETS_TO_BUILD="host" `
-D LLDB_ENABLE_PYTHON=On `
-D Python3_EXECUTABLE="${{ steps.python.outputs.path }}" `
-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 `
--target lld `
--config Release

- uses: actions/upload-artifact@v7
with:
name: llvm-Windows-${{ matrix.runner-arch }}
path: ${{ github.workspace }}/BinaryCache/llvm

74 changes: 65 additions & 9 deletions .github/workflows/test-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,28 @@ jobs:
# Android
# -----------------------------------------------------------------------
#
# The emulator-runner action takes the whole test invocation as a single
# shell script string executed inside its own wrapper, so it can't invoke
# the run-lldb-tests composite action as a normal step the way the Linux
# jobs do -- the dotest invocation stays inlined here, same as before this
# file existed.
# The emulator-runner action runs the whole test invocation as one shell
# script, so it can't use the run-lldb-tests composite action like the
# Linux jobs do; the dotest invocation stays inlined here.
#
# Each job's "Wrap NDK compiler" step works around Android.rules always
# appending its own unversioned --target after the compiler wrapper's
# default, which wins as the last -target flag and drops the API level
# below what NDK r29's libc++ needs for pthread_cond_clockwait. CFLAGS_EXTRAS
# can't fix this reliably: many test Makefiles set their own, silently
# discarding ours. Appending the real target as the wrapper's own last
# argument can't be overridden that way.

test-android-x86_64:
runs-on: ubuntu-latest
name: Test Android x86_64
# Observed category durations run 5-14 minutes; this is roughly 2x the
# slowest, catching a hang well before GitHub's 360-minute job default.
timeout-minutes: 30

env:
# API level test inferiors compile against.
TEST_INFERIOR_API_LEVEL: 28

strategy:
fail-fast: false
Expand Down Expand Up @@ -87,6 +100,24 @@ jobs:
disable-animations: false
script: echo "Generated AVD snapshot for caching."

# See the top-of-file comment for why this is needed. Android.rules
# derives NDK_ROOT (and from it, the sysroot) purely from --compiler's
# own directory nesting (dirname($CC)/../../../../..), so the wrapper
# has to live 5 levels deep exactly like the real NDK, with a symlink
# standing in for the parts Android.rules reads directly from disk.
- name: Wrap NDK compiler
run: |
wrap_bin="$RUNNER_TEMP/android-clang-wrapper/toolchains/llvm/prebuilt/linux-x86_64/bin"
mkdir -p "$wrap_bin"
ln -s "$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot" "$wrap_bin/../sysroot"
wrapper="$wrap_bin/x86_64-linux-android$TEST_INFERIOR_API_LEVEL-clang"
{
echo '#!/usr/bin/env bash'
echo 'exec "$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/$(basename "$0")" "$@" -target x86_64-linux-android'"$TEST_INFERIOR_API_LEVEL"
} > "$wrapper"
cp "$wrapper" "$wrapper++"
chmod +x "$wrapper" "$wrapper++"

- name: Run lldb tests against ds2 on Android emulator
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -112,11 +143,11 @@ jobs:

${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest
--out-of-tree-debugserver
--arch x86_64
--triple x86_64-none-linux-android
--platform-name remote-android
--platform-url connect://localhost:5432
--platform-working-dir /data/local/tmp
--compiler=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android28-clang
--compiler=$RUNNER_TEMP/android-clang-wrapper/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android$TEST_INFERIOR_API_LEVEL-clang
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/android-x86_64.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/android-x86_64.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded
Expand All @@ -132,6 +163,13 @@ jobs:
test-android-arm64-v8a:
runs-on: ubuntu-latest
name: Test Android arm64-v8a sanity
# Observed duration is ~7 minutes; this is roughly 2x that, catching a
# hang well before GitHub's 360-minute job default.
timeout-minutes: 15

env:
# API level test inferiors compile against.
TEST_INFERIOR_API_LEVEL: 27

steps:
- uses: actions/download-artifact@v8
Expand Down Expand Up @@ -186,6 +224,24 @@ jobs:
disable-animations: false
script: echo "Generated AVD snapshot for caching."

# See the top-of-file comment for why this is needed. Android.rules
# derives NDK_ROOT (and from it, the sysroot) purely from --compiler's
# own directory nesting (dirname($CC)/../../../../..), so the wrapper
# has to live 5 levels deep exactly like the real NDK, with a symlink
# standing in for the parts Android.rules reads directly from disk.
- name: Wrap NDK compiler
run: |
wrap_bin="$RUNNER_TEMP/android-clang-wrapper/toolchains/llvm/prebuilt/linux-x86_64/bin"
mkdir -p "$wrap_bin"
ln -s "$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot" "$wrap_bin/../sysroot"
wrapper="$wrap_bin/aarch64-linux-android$TEST_INFERIOR_API_LEVEL-clang"
{
echo '#!/usr/bin/env bash'
echo 'exec "$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/$(basename "$0")" "$@" -target aarch64-linux-android'"$TEST_INFERIOR_API_LEVEL"
} > "$wrapper"
cp "$wrapper" "$wrapper++"
chmod +x "$wrapper" "$wrapper++"

- name: Run lldb tests against ds2 on Android emulator
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -206,11 +262,11 @@ jobs:

${{ github.workspace }}/BinaryCache/llvm/bin/lldb-dotest
--out-of-tree-debugserver
--arch aarch64
--triple aarch64-none-linux-android
--platform-name remote-android
--platform-url connect://localhost:5432
--platform-working-dir /data/local/tmp
--compiler=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android27-clang
--compiler=$RUNNER_TEMP/android-clang-wrapper/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android$TEST_INFERIOR_API_LEVEL-clang
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/ds2/android-aarch64.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/android-aarch64.excluded
--excluded ${{ github.workspace }}/SourceCache/ds2/Support/Testing/Excluded/upstream/non-debugserver-tests.excluded
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
test-linux-i686:
runs-on: ubuntu-latest
name: Test Linux i686
# Observed category durations run 3-8 minutes; this is roughly 2x the
# slowest, catching a hang well before GitHub's 360-minute job default.
timeout-minutes: 20

# test-category is the matrix's only key -- GitHub renders every matrix
# key/value pair in the check name (e.g. "Test Linux i686 (Python API)"),
Expand Down Expand Up @@ -89,6 +92,9 @@ jobs:
test-linux-x86_64:
runs-on: ubuntu-latest
name: Test Linux x86_64
# Observed category durations run 3-8 minutes; this is roughly 2x the
# slowest, catching a hang well before GitHub's 360-minute job default.
timeout-minutes: 20

strategy:
fail-fast: false
Expand Down Expand Up @@ -140,6 +146,9 @@ jobs:
test-linux-aarch64:
runs-on: ubuntu-24.04-arm
name: Test Linux aarch64
# Observed category durations run 2-5.5 minutes; this is roughly 2x the
# slowest, catching a hang well before GitHub's 360-minute job default.
timeout-minutes: 15

strategy:
fail-fast: false
Expand Down
Loading
Loading