diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ebbff66d..0860c814 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ on: jobs: tests: - name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.version }}-python-${{ matrix.python-version }}-${{ matrix.castxml-epic }} + name: ${{ matrix.os }} ${{ matrix.compiler }}${{ matrix.clang-version }} ${{ matrix.cppstd }} Python ${{ matrix.python-version }} Epic ${{ matrix.castxml-epic }} runs-on: ${{ matrix.os }} strategy: @@ -16,87 +16,116 @@ jobs: include: # UBUNTU 22.04 - CASTXML EPIC 0 - os: ubuntu-22.04 - compiler: gcc - version: "11" + compiler: clang++ + clang-version: 13 + python-version: "3.13" + castxml-epic: 0 + cppstd: "-std=c++98" + + - os: ubuntu-22.04 + compiler: clang++ + clang-version: 14 + python-version: "3.13" + castxml-epic: 0 + cppstd: "-std=c++98" + + - os: ubuntu-22.04 + compiler: clang++ + clang-version: 15 python-version: "3.13" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" - os: ubuntu-22.04 - compiler: gcc - version: "11" + compiler: clang++ + clang-version: 15 python-version: "3.13" - castxml: "castxml" castxml-epic: 1 cppstd: "-std=c++98" # UBUNTU 24.04 - CASTXML EPIC 0 - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.9" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.10" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.11" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.12" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.13" - castxml: "castxml" castxml-epic: 0 cppstd: "-std=c++98" + # UBUNTU 24.04 - CASTXML EPIC 0 - c++XX + - os: ubuntu-24.04 + compiler: clang++ + clang-version: 16 + python-version: "3.13" + castxml-epic: 0 + cppstd: "-std=c++11" + + - os: ubuntu-24.04 + compiler: clang++ + clang-version: 16 + python-version: "3.13" + castxml-epic: 0 + cppstd: "-std=c++14" + + - os: ubuntu-24.04 + compiler: clang++ + clang-version: 16 + python-version: "3.13" + castxml-epic: 0 + cppstd: "-std=c++17" + # UBUNTU 24.04 - CASTXML EPIC 1 - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.13" - castxml: "castxml" castxml-epic: 1 cppstd: "-std=c++98" - os: ubuntu-24.04 - compiler: gcc - version: "13" + compiler: clang++ + clang-version: 16 python-version: "3.13" - castxml: "castxml" castxml-epic: 1 cppstd: "-std=c++11" # MACOS - os: macos-13 - compiler: xcode - version: "default" + compiler: clang++ + python-version: "3.13" + castxml-epic: 0 + + - os: macos-14 + compiler: clang++ python-version: "3.13" - castxml: "castxml" castxml-epic: 0 - cppstd: "-std=c++98" steps: - uses: actions/checkout@v4 @@ -116,12 +145,19 @@ jobs: - name: Run pycodestyle run: pycodestyle . --exclude=docs + - name: Write xml_generator.cfg + if: contains(matrix.os, 'ubuntu') + run: | + echo "[xml_generator]" > tests/xml_generator.cfg + echo "compiler_path=/usr/bin/${{ matrix.compiler }}-${{ matrix.clang-version }}" >> tests/xml_generator.cfg + echo "ccflags=${{ matrix.cppstd }}" >> tests/xml_generator.cfg + - name: Setup castxml for Linux - if: contains(matrix.os, 'ubuntu') && matrix.castxml == 'castxml' + if: contains(matrix.os, 'ubuntu') run: | wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/bdbb67a10c5f8d1b738cd19cb074f409d4803e8077cb8c1072ef4eaf738fa871a73643f9c8282d58cae28d188df842c82ad6620b6d590b0396a0172a27438dce/download | tar zxf - -C ~/ - name: Setup castxml for Mac - if: matrix.os == 'macos-13' + if: contains(matrix.os, 'macos') run: | wget -q -O - https://data.kitware.com/api/v1/file/hashsum/sha512/5d937e938f7b882a3a3e7941e68f8312d0898aaf2082e00003dd362b1ba70b98b0a08706a1be28e71652a6a0f1e66f89768b5eaa20e5a100592d5b3deefec3f0/download | tar zxf - -C ~/ - name: Run tests diff --git a/src/pygccxml/parser/config.py b/src/pygccxml/parser/config.py index 4fe4a6a0..e1a1cfc6 100644 --- a/src/pygccxml/parser/config.py +++ b/src/pygccxml/parser/config.py @@ -374,7 +374,7 @@ def load_xml_generator_configuration(configuration, **defaults): An example configuration file skeleton can be found `here `_. + tests/xml_generator.cfg>`_. """ parser = configuration diff --git a/tests/xml_generator.cfg b/tests/xml_generator.cfg new file mode 100644 index 00000000..cb00818e --- /dev/null +++ b/tests/xml_generator.cfg @@ -0,0 +1,17 @@ +[xml_generator] +# Specify which xml generator you want to use "castxml" or "gccxml" +# "castxml is the default" +xml_generator= +# Path to castxml or gccxml executable file +xml_generator_path= +# Set the path to the compiler (for example "/usr/bin/gcc") for CastXML +compiler_path= +# Gccxml working directory - optional, could be set to your source code directory +working_directory= +# Additional include directories, as list of paths ["path1/file1.h", "path2/file2.h", ...] +include_paths= +# You can explicitly set what compiler it should emulate (for GCCXML) +# Valid options are: g++, msvc6, msvc7, msvc71, msvc8, cl. +compiler= +# Keep xml files after errors (useful for debugging) +keep_xml=