Skip to content

Commit cea1bf3

Browse files
committed
ci: test all c++ versions
1 parent e6f4b19 commit cea1bf3

File tree

3 files changed

+63
-2
lines changed

3 files changed

+63
-2
lines changed

.github/workflows/tests.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
tests:
10-
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}-python-${{ matrix.python-version }}-${{ matrix.castxml-epic }}
10+
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cppstd }}-${{ matrix.version }}-python-${{ matrix.python-version }}-${{ matrix.castxml-epic }}
1111
runs-on: ${{ matrix.os }}
1212

1313
strategy:
@@ -72,6 +72,47 @@ jobs:
7272
castxml-epic: 0
7373
cppstd: "-std=c++98"
7474

75+
# UBUNTU 24.04 - CASTXML EPIC 0 - c++XX
76+
- os: ubuntu-24.04
77+
compiler: gcc
78+
version: "13"
79+
python-version: "3.13"
80+
castxml: "castxml"
81+
castxml-epic: 0
82+
cppstd: "-std=c++11"
83+
84+
- os: ubuntu-24.04
85+
compiler: gcc
86+
version: "13"
87+
python-version: "3.13"
88+
castxml: "castxml"
89+
castxml-epic: 0
90+
cppstd: "-std=c++14"
91+
92+
- os: ubuntu-24.04
93+
compiler: gcc
94+
version: "13"
95+
python-version: "3.13"
96+
castxml: "castxml"
97+
castxml-epic: 0
98+
cppstd: "-std=c++17"
99+
100+
- os: ubuntu-24.04
101+
compiler: gcc
102+
version: "13"
103+
python-version: "3.13"
104+
castxml: "castxml"
105+
castxml-epic: 0
106+
cppstd: "-std=c++20"
107+
108+
- os: ubuntu-24.04
109+
compiler: gcc
110+
version: "13"
111+
python-version: "3.13"
112+
castxml: "castxml"
113+
castxml-epic: 0
114+
cppstd: "-std=c++23"
115+
75116
# UBUNTU 24.04 - CASTXML EPIC 1
76117
- os: ubuntu-24.04
77118
compiler: gcc
@@ -116,6 +157,9 @@ jobs:
116157
- name: Run pycodestyle
117158
run: pycodestyle . --exclude=docs
118159

160+
- name: Write ccflags to conf file
161+
run: echo "ccflags=${{ matrix.cppstd }}" >> tests/xml_generator.cfg
162+
119163
- name: Setup castxml for Linux
120164
if: contains(matrix.os, 'ubuntu') && matrix.castxml == 'castxml'
121165
run: |

src/pygccxml/parser/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def load_xml_generator_configuration(configuration, **defaults):
374374
375375
An example configuration file skeleton can be found
376376
`here <https://github.com/gccxml/pygccxml/blob/develop/
377-
unittests/xml_generator.cfg>`_.
377+
tests/xml_generator.cfg>`_.
378378
379379
"""
380380
parser = configuration

tests/xml_generator.cfg

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[xml_generator]
2+
# Specify which xml generator you want to use "castxml" or "gccxml"
3+
# "castxml is the default"
4+
xml_generator=
5+
# Path to castxml or gccxml executable file
6+
xml_generator_path=
7+
# Set the path to the compiler (for example "/usr/bin/gcc") for CastXML
8+
compiler_path=
9+
# Gccxml working directory - optional, could be set to your source code directory
10+
working_directory=
11+
# Additional include directories, as list of paths ["path1/file1.h", "path2/file2.h", ...]
12+
include_paths=
13+
# You can explicitly set what compiler it should emulate (for GCCXML)
14+
# Valid options are: g++, msvc6, msvc7, msvc71, msvc8, cl.
15+
compiler=
16+
# Keep xml files after errors (useful for debugging)
17+
keep_xml=

0 commit comments

Comments
 (0)