Skip to content

Commit e60a608

Browse files
committed
Run C++ tests in CI
1 parent 3b56e32 commit e60a608

2 files changed

Lines changed: 34 additions & 6 deletions

File tree

.github/workflows/test.yaml

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,40 @@ jobs:
1111
runs-on: ubuntu-24.04
1212
strategy:
1313
matrix:
14-
compiler: [ clang-18, clang-17, clang-16, clang-15, clang-14, gcc-14, gcc-13, gcc-12, gcc-11 ]
15-
env:
16-
COMPILERS: ${{ matrix.compiler }}
14+
include:
15+
- packages: clang-18
16+
cc: clang-18
17+
cxx: clang++-18
18+
- packages: clang-17
19+
cc: clang-17
20+
cxx: clang++-17
21+
- packages: clang-16
22+
cc: clang-16
23+
cxx: clang++-16
24+
- packages: clang-15
25+
cc: clang-15
26+
cxx: clang++-15
27+
- packages: clang-14
28+
cc: clang-14
29+
cxx: clang++-14
30+
- packages: gcc-14 g++-14
31+
cc: gcc-14
32+
cxx: g++-14
33+
- packages: gcc-13 g++-13
34+
cc: gcc-13
35+
cxx: g++-13
36+
- packages: gcc-12 g++-12
37+
cc: gcc-12
38+
cxx: g++-12
39+
- packages: gcc-11 g++-11
40+
cc: gcc-11
41+
cxx: g++-11
1742
steps:
1843
- uses: actions/checkout@v4
19-
- name: Install packages
20-
run: sudo apt-get install -y wdiff $COMPILERS
44+
- name: Install dependencies
45+
run: sudo apt update && sudo apt install -y wdiff ${{ matrix.packages }}
2146
- name: Run tests
47+
env:
48+
C_COMPILERS: ${{ matrix.cc }}
49+
CXX_COMPILERS: ${{ matrix.cxx }}
2250
run: make tests

uprintf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,7 @@ static void _upf_parse_cu(const uint8_t *cu_base, const uint8_t *die, const uint
20642064
if (low_pc_die != NULL) cu.base_address = _upf_get_addr(&cu, low_pc_die, low_pc_attr.form);
20652065

20662066
cu.scope.ranges = _upf_get_die_ranges(&cu, low_pc_die, low_pc_attr, high_pc_die, high_pc_attr, ranges_die, ranges_attr);
2067-
_UPF_ASSERT(cu.scope.ranges.length > 0);
2067+
if (cu.scope.ranges.length == 0) return;
20682068

20692069
_upf_scope_stack_entry stack_entry = _UPF_ZERO_INIT;
20702070
stack_entry.scope = &cu.scope;

0 commit comments

Comments
 (0)