Skip to content

Commit 19e52d7

Browse files
committed
ci: introduce workflow to test debugger extension
The debugger extension test is run for both LLDB and GDB for GC64 and non-GC64 builds for arm64 and x86_64.
1 parent d697f24 commit 19e52d7

3 files changed

Lines changed: 86 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Setup environment for testing debugger extension on Linux
2+
3+
Action setups the environment on Linux runners (install requirements, setup the
4+
workflow environment, etc.) for testing the python debugger extension for
5+
various debuggers.
6+
7+
## How to use Github Action from Github workflow
8+
9+
Add the following code to the running steps before LuaJIT configuration:
10+
```
11+
- uses: ./.github/actions/setup-debuggers
12+
if: ${{ matrix.OS == 'Linux' }}
13+
```
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Setup CI environment for testing the debugger extension
2+
description: The Linux machine setup for tests of the debugger extension
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setup CI environment (Linux)
7+
uses: ./.github/actions/setup-linux
8+
- name: Install dependencies for the tests
9+
run: |
10+
apt -y update
11+
apt install -y python3 gdb lldb
12+
shell: bash

‎.github/workflows/debuggers.yml‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Debuggers
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- '**-notest'
7+
- 'upstream-**'
8+
tags-ignore:
9+
- '**'
10+
11+
concurrency:
12+
# An update of a developer branch cancels the previously
13+
# scheduled workflow run for this branch. However, the default
14+
# branch, and long-term branch (tarantool/release/2.11,
15+
# tarantool/release/2.10, etc) workflow runs are never canceled.
16+
#
17+
# We use a trick here: define the concurrency group as 'workflow
18+
# run ID' + # 'workflow run attempt' because it is a unique
19+
# combination for any run. So it effectively discards grouping.
20+
#
21+
# XXX: we cannot use `github.sha` as a unique identifier because
22+
# pushing a tag may cancel a run that works on a branch push
23+
# event.
24+
group: ${{ startsWith(github.ref, 'refs/heads/tarantool/')
25+
&& format('{0}-{1}', github.run_id, github.run_attempt)
26+
|| format('{0}-{1}', github.workflow, github.ref) }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
test-debuggers:
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
ARCH: [ARM64, x86_64]
35+
GC64: [ON, OFF]
36+
exclude:
37+
- ARCH: ARM64
38+
GC64: OFF
39+
runs-on: [self-hosted, regular, Linux, '${{ matrix.ARCH }}']
40+
name: >
41+
LuaJIT
42+
(${{ matrix.ARCH }})
43+
GC64:${{ matrix.GC64 }}
44+
steps:
45+
- uses: actions/checkout@v4
46+
with:
47+
fetch-depth: 0
48+
submodules: recursive
49+
- name: setup debuggers
50+
uses: ./.github/actions/setup-debuggers
51+
- name: configure
52+
run: >
53+
cmake -S . -B ${{ env.BUILDDIR }}
54+
-DCMAKE_BUILD_TYPE=Debug
55+
-DLUAJIT_ENABLE_GC64=${{ matrix.GC64 }}
56+
- name: build
57+
run: cmake --build . --parallel
58+
working-directory: ${{ env.BUILDDIR }}
59+
- name: test
60+
run: cmake --build . --parallel --target tarantool-debugger-tests
61+
working-directory: ${{ env.BUILDDIR }}

0 commit comments

Comments
 (0)