From 39786b19e7f19f3b5868af2f43075752eacb822a Mon Sep 17 00:00:00 2001 From: Sander Mertens Date: Wed, 26 Jul 2023 20:59:59 -0700 Subject: [PATCH] Add additional compiler versions --- .github/workflows/ci.yml | 608 +++++++++--------- .../entities/iterate_components/src/main.cpp | 2 +- flecs.h | 4 + include/flecs/private/api_defines.h | 4 + 4 files changed, 297 insertions(+), 321 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89329c0fa..a264393ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,41 +58,45 @@ jobs: cd .. ./bake setup --local - - name: build flecs - run: bake/bake --strict + - name: build flecs (debug) + run: bake/bake --strict --cfg debug + + - name: build flecs (release) + run: bake/bake --strict --cfg release + + - name: build examples (debug) + run: bake/bake examples --strict --cfg debug + + - name: build examples (release) + run: bake/bake examples --strict --cfg debug - build-configs: + build: needs: build-linux - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.target.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: - compiler: - - cc: gcc-7 - cxx: g++-7 - - cc: gcc-8 - cxx: g++-8 - - cc: gcc-9 - cxx: g++-9 - - cc: gcc-10 - cxx: g++-10 - - cc: gcc-11 - cxx: g++-11 - - cc: clang-8 - cxx: clang++-8 - - cc: clang-9 - cxx: clang++-9 - - cc: clang-10 - cxx: clang++-10 - - cc: clang-11 - cxx: clang++-11 - - cc: clang-12 - cxx: clang++-12 + target: + - { os: ubuntu-20.04, cc: gcc-7, cxx: g++-7 } + - { os: ubuntu-20.04, cc: gcc-8, cxx: g++-8 } + - { os: ubuntu-20.04, cc: gcc-9, cxx: g++-9 } + - { os: ubuntu-20.04, cc: gcc-10, cxx: g++-10 } + - { os: ubuntu-20.04, cc: gcc-11, cxx: g++-11 } + - { os: ubuntu-latest, cc: gcc-12, cxx: g++-12 } + - { os: ubuntu-latest, cc: gcc-13, cxx: g++-13 } + - { os: ubuntu-20.04, cc: clang-8, cxx: clang++-8 } + - { os: ubuntu-20.04, cc: clang-9, cxx: clang++-9 } + - { os: ubuntu-20.04, cc: clang-10, cxx: clang++-10 } + - { os: ubuntu-20.04, cc: clang-11, cxx: clang++-11 } + - { os: ubuntu-20.04, cc: clang-12, cxx: clang++-12 } + - { os: ubuntu-latest, cc: clang-13, cxx: clang++-13 } + - { os: ubuntu-latest, cc: clang-14, cxx: clang++-14 } + - { os: ubuntu-latest, cc: clang-15, cxx: clang++-15 } env: - CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cxx }} + CC: ${{ matrix.target.cc }} + CXX: ${{ matrix.target.cxx }} steps: - uses: actions/checkout@v3 @@ -102,8 +106,8 @@ jobs: - name: install compiler run: | sudo apt-get update - sudo apt-get install -y ${{ matrix.compiler.cc }} - sudo apt-get install -y ${{ matrix.compiler.cxx }} + sudo apt-get install -y ${{ matrix.target.cc }} + sudo apt-get install -y ${{ matrix.target.cxx }} - name: install bake run: | @@ -124,46 +128,51 @@ jobs: bake examples/c --strict --cfg debug bake examples/cpp --strict --cfg debug bake examples/os_api --strict --cfg debug - bake examples/os_api/bake --strict --cfg debug - name: build examples (release) run: | bake examples/c --strict --cfg release bake examples/cpp --strict --cfg release bake examples/os_api --strict --cfg release - bake examples/os_api/bake --strict --cfg release - build-configs-windows: - needs: [build-windows] - runs-on: windows-latest + build-cmake: + needs: build-linux + runs-on: ${{ matrix.os }} timeout-minutes: 30 strategy: fail-fast: false + matrix: + os: [ ubuntu-latest, macOS-latest ] steps: - uses: actions/checkout@v3 - - uses: ilammy/msvc-dev-cmd@v1 - - name: install bake + + - name: create cmake build folders run: | - git clone https://github.com/SanderMertens/bake - cd bake\build-Windows - nmake - cd .. - ./bake setup --local + mkdir cmake_build + mkdir examples/c/cmake_build + mkdir examples/cpp/cmake_build - - name: build flecs (debug) - run: bake/bake --strict --cfg debug - - - name: build flecs (release) - run: bake/bake --strict --cfg release + - name: build flecs + working-directory: cmake_build + run: | + cmake .. + cmake --build . -j 4 - - name: build examples (debug) - run: bake/bake examples --strict --cfg debug + - name: build c examples + working-directory: examples/c/cmake_build + run: | + cmake .. + cmake --build . -j 4 - - name: build examples (release) - run: bake/bake examples --strict --cfg debug + - name: build c++ examples + working-directory: examples/cpp/cmake_build + run: | + cmake .. + cmake --build . -j 4 - build-configs-windows-cmake: + build-cmake-windows: + needs: build-windows runs-on: windows-latest timeout-minutes: 30 @@ -204,6 +213,208 @@ jobs: cmake ${{ matrix.toolset_option }} .. cmake --build . -j 4 + build-meson: + needs: build-linux + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + + - name: install meson + run: | + pip3 install meson + pip3 install ninja==1.10.2.4 + + - name: create build folder + run: meson meson_build + + - name: build flecs + working-directory: meson_build + run: | + meson compile + + build-custom: + needs: build-linux + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + compiler: [ gcc, clang ] + + steps: + - uses: actions/checkout@v3 + - name: Install bake + run: | + git clone https://github.com/SanderMertens/bake + make -C bake/build-$(uname) + bake/bake setup + + - name: FLECS_SOFT_ASSERT flag + run: | + bake rebuild --strict -D FLECS_SOFT_ASSERT + bake rebuild --strict --cfg release -D FLECS_SOFT_ASSERT + + - name: FLECS_KEEP_ASSERT flag + run: | + bake rebuild --strict -D FLECS_KEEP_ASSERT + bake rebuild --strict --cfg release -D FLECS_KEEP_ASSERT + + - name: no extensions + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD + + - name: FLECS_SYSTEM + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_SYSTEM + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_SYSTEM + + - name: FLECS_PIPELINE + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PIPELINE + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PIPELINE + + - name: FLECS_TIMER + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_TIMER + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_TIMER + + - name: FLECS_MODULE + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_MODULE + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_MODULE + + - name: FLECS_SNAPSHOT + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_SNAPSHOT + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_SNAPSHOT + + - name: FLECS_STATS + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_STATS + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_STATS + + - name: FLECS_PARSER + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PARSER + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PARSER + + - name: FLECS_PLECS + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PLECS + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PLECS + + - name: FLECS_META + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_META + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_META + + - name: FLECS_META_C + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_META_C + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_META_C + + - name: FLECS_EXPR + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_EXPR + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_EXPR + + - name: FLECS_JSON + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_JSON + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_JSON + + - name: FLECS_DOC + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_DOC + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_DOC + + - name: FLECS_COREDOC + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_COREDOC + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_COREDOC + + - name: FLECS_LOG + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_LOG + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_LOG + + - name: FLECS_APP + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_APP + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_APP + + - name: FLECS_OS_API_IMPL + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_OS_API_IMPL + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_OS_API_IMPL + + - name: FLECS_HTTP + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_HTTP + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_HTTP + + - name: FLECS_REST + run: | + bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_REST + bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_REST + + - name: FLECS_NO_LOG + run: | + bake rebuild --strict -D FLECS_NO_LOG + bake rebuild --strict --cfg release -D FLECS_NO_LOG + + - name: custom_build tests + run: | + bake rebuild test/custom_builds --strict + bake runall test/custom_builds + + build-amalgamated: + needs: build-linux + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + compiler: [ gcc, clang ] + + steps: + - uses: actions/checkout@v3 + - name: build flecs + run: ${{ matrix.compiler }} flecs.c --shared -fPIC -pedantic -Wall -Wextra -Wno-unused-parameter -Werror -Wshadow -Wconversion -Wno-missing-field-initializers + + build-scan-build: + needs: build-linux + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + fail-fast: false + + steps: + - uses: actions/checkout@v3 + - name: hack sources.list + run: | + sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|https://mirror.enzu.com/ubuntu//|g' /etc/apt/sources.list + sudo apt-get update + + - name: install clang-build + run: | + sudo apt-get install -y clang-tools + + - name: install bake + run: | + git clone https://github.com/SanderMertens/bake + make -C bake/build-$(uname) + bake/bake setup + + - name: run scan-build + run: | + scan-build --status-bugs bake + test-c-unix: needs: [build-linux, build-macos] runs-on: ${{ matrix.os }} @@ -244,37 +455,29 @@ jobs: test-cpp-unix: needs: [build-linux] - runs-on: ubuntu-20.04 + runs-on: ${{ matrix.target.os }} timeout-minutes: 30 strategy: fail-fast: false matrix: - compiler: - # Currently not supported for C++ API, as enum reflection doesn't work - # - cc: gcc-7 - # cxx: g++-7 - # - cc: gcc-8 - # cxx: g++-8 - - cc: gcc-9 - cxx: g++-9 - - cc: gcc-10 - cxx: g++-10 - - cc: gcc-11 - cxx: g++-11 - - cc: clang-8 - cxx: clang++-8 - - cc: clang-9 - cxx: clang++-9 - - cc: clang-10 - cxx: clang++-10 - - cc: clang-11 - cxx: clang++-11 - - cc: clang-12 - cxx: clang++-12 + target: + - { os: ubuntu-20.04, cc: gcc-9, cxx: g++-9 } + - { os: ubuntu-20.04, cc: gcc-10, cxx: g++-10 } + - { os: ubuntu-20.04, cc: gcc-11, cxx: g++-11 } + - { os: ubuntu-latest, cc: gcc-12, cxx: g++-12 } + - { os: ubuntu-latest, cc: gcc-13, cxx: g++-13 } + - { os: ubuntu-20.04, cc: clang-8, cxx: clang++-8 } + - { os: ubuntu-20.04, cc: clang-9, cxx: clang++-9 } + - { os: ubuntu-20.04, cc: clang-10, cxx: clang++-10 } + - { os: ubuntu-20.04, cc: clang-11, cxx: clang++-11 } + - { os: ubuntu-20.04, cc: clang-12, cxx: clang++-12 } + - { os: ubuntu-latest, cc: clang-13, cxx: clang++-13 } + - { os: ubuntu-latest, cc: clang-14, cxx: clang++-14 } + - { os: ubuntu-latest, cc: clang-15, cxx: clang++-15 } env: - CC: ${{ matrix.compiler.cc }} - CXX: ${{ matrix.compiler.cxx }} + CC: ${{ matrix.target.cc }} + CXX: ${{ matrix.target.cxx }} steps: - uses: actions/checkout@v3 @@ -284,13 +487,13 @@ jobs: - name: install compiler run: | sudo apt-get update - sudo apt-get install -y ${{ matrix.compiler.cc }} - sudo apt-get install -y ${{ matrix.compiler.cxx }} + sudo apt-get install -y ${{ matrix.target.cc }} + sudo apt-get install -y ${{ matrix.target.cxx }} - name: compiler version run: | - ${{ matrix.compiler.cc }} --version - ${{ matrix.compiler.cxx }} --version + ${{ matrix.target.cc }} --version + ${{ matrix.target.cxx }} --version - name: install bake run: | @@ -381,35 +584,7 @@ jobs: - name: test c++ run: bake/bake run test\cpp_api -- -j 8 - analyze-scan-build: - needs: build-linux - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v3 - - name: hack sources.list - run: | - sudo sed -i 's|http://azure.archive.ubuntu.com/ubuntu/|https://mirror.enzu.com/ubuntu//|g' /etc/apt/sources.list - sudo apt-get update - - - name: install clang-build - run: | - sudo apt-get install -y clang-tools - - - name: install bake - run: | - git clone https://github.com/SanderMertens/bake - make -C bake/build-$(uname) - bake/bake setup - - - name: run scan-build - run: | - scan-build --status-bugs bake - - analyze-sanitized-api: + test-sanitized-api: needs: [ build-linux ] runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -433,7 +608,7 @@ jobs: run: | bake run test/api --cfg sanitize -- -j 8 - analyze-sanitized-addons: + test-sanitized-addons: needs: [ build-linux ] runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -457,7 +632,7 @@ jobs: run: | bake run test/addons --cfg sanitize -- -j 8 - analyze-sanitized-meta: + test-sanitized-meta: needs: [ build-linux ] runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -481,7 +656,7 @@ jobs: run: | bake run test/meta --cfg sanitize -- -j 8 - analyze-sanitized-collections: + test-sanitized-collections: needs: [ build-linux ] runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -505,7 +680,7 @@ jobs: run: | bake run test/collections --cfg sanitize -- -j 8 - analyze-sanitized-cpp_api: + test-sanitized-cpp_api: needs: [ build-linux ] runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -528,210 +703,3 @@ jobs: - name: run tests run: | bake run test/cpp_api --cfg sanitize -- -j 8 - - buildsystem-cmake: - runs-on: ${{ matrix.os }} - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - os: [ ubuntu-latest, macOS-latest ] - - steps: - - uses: actions/checkout@v3 - - - name: create cmake build folders - run: | - mkdir cmake_build - mkdir examples/c/cmake_build - mkdir examples/cpp/cmake_build - - - name: build flecs - working-directory: cmake_build - run: | - cmake .. - cmake --build . -j 4 - - - name: build c examples - working-directory: examples/c/cmake_build - run: | - cmake .. - cmake --build . -j 4 - - - name: build c++ examples - working-directory: examples/cpp/cmake_build - run: | - cmake .. - cmake --build . -j 4 - - buildsystem-meson: - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - fail-fast: false - - steps: - - uses: actions/checkout@v3 - - - name: install meson - run: | - pip3 install meson - pip3 install ninja==1.10.2.4 - - - name: create build folder - run: meson meson_build - - - name: build flecs - working-directory: meson_build - run: | - meson compile - - flecs-custom-builds: - needs: build-linux - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - compiler: [ gcc, clang ] - - steps: - - uses: actions/checkout@v3 - - name: Install bake - run: | - git clone https://github.com/SanderMertens/bake - make -C bake/build-$(uname) - bake/bake setup - - - name: FLECS_SOFT_ASSERT flag - run: | - bake rebuild --strict -D FLECS_SOFT_ASSERT - bake rebuild --strict --cfg release -D FLECS_SOFT_ASSERT - - - name: FLECS_KEEP_ASSERT flag - run: | - bake rebuild --strict -D FLECS_KEEP_ASSERT - bake rebuild --strict --cfg release -D FLECS_KEEP_ASSERT - - - name: no extensions - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD - - - name: FLECS_SYSTEM - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_SYSTEM - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_SYSTEM - - - name: FLECS_PIPELINE - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PIPELINE - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PIPELINE - - - name: FLECS_TIMER - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_TIMER - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_TIMER - - - name: FLECS_MODULE - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_MODULE - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_MODULE - - - name: FLECS_SNAPSHOT - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_SNAPSHOT - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_SNAPSHOT - - - name: FLECS_STATS - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_STATS - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_STATS - - - name: FLECS_PARSER - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PARSER - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PARSER - - - name: FLECS_PLECS - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_PLECS - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_PLECS - - - name: FLECS_META - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_META - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_META - - - name: FLECS_META_C - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_META_C - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_META_C - - - name: FLECS_EXPR - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_EXPR - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_EXPR - - - name: FLECS_JSON - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_JSON - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_JSON - - - name: FLECS_DOC - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_DOC - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_DOC - - - name: FLECS_COREDOC - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_COREDOC - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_COREDOC - - - name: FLECS_LOG - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_LOG - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_LOG - - - name: FLECS_APP - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_APP - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_APP - - - name: FLECS_OS_API_IMPL - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_OS_API_IMPL - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_OS_API_IMPL - - - name: FLECS_HTTP - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_HTTP - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_HTTP - - - name: FLECS_REST - run: | - bake rebuild --strict -D FLECS_CUSTOM_BUILD -D FLECS_REST - bake rebuild --strict --cfg release -D FLECS_CUSTOM_BUILD -D FLECS_REST - - - name: FLECS_NO_LOG - run: | - bake rebuild --strict -D FLECS_NO_LOG - bake rebuild --strict --cfg release -D FLECS_NO_LOG - - - name: custom_build tests - run: | - bake rebuild test/custom_builds --strict - bake runall test/custom_builds - - flecs-amalgamated: - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - fail-fast: false - matrix: - compiler: [ gcc, clang ] - - steps: - - uses: actions/checkout@v3 - - name: build flecs - run: ${{ matrix.compiler }} flecs.c --shared -fPIC -pedantic -Wall -Wextra -Wno-unused-parameter -Werror -Wshadow -Wconversion -Wno-missing-field-initializers diff --git a/examples/cpp/entities/iterate_components/src/main.cpp b/examples/cpp/entities/iterate_components/src/main.cpp index d9007a5c6..afc8a4fda 100644 --- a/examples/cpp/entities/iterate_components/src/main.cpp +++ b/examples/cpp/entities/iterate_components/src/main.cpp @@ -22,7 +22,7 @@ void iterate_components(flecs::entity e) { std::cout << e.type().str() << "\n\n"; // 2. To get individual component ids, use entity::each - std::int32_t i = 0; + int32_t i = 0; e.each([&](flecs::id id) { std::cout << i++ << ": " << id.str() << "\n"; }); diff --git a/flecs.h b/flecs.h index b6be6d1e4..c4fd2a9d1 100644 --- a/flecs.h +++ b/flecs.h @@ -551,6 +551,10 @@ extern "C" { /* Useful, but not reliable enough. It can incorrectly flag macro's as unused * in standalone builds. */ #pragma clang diagnostic ignored "-Wunused-macros" +#if __clang_major__ == 13 +/* clang 13 can throw this warning for a define in ctype.h */ +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif #elif defined(ECS_TARGET_GNU) #ifndef __cplusplus #pragma GCC diagnostic ignored "-Wdeclaration-after-statement" diff --git a/include/flecs/private/api_defines.h b/include/flecs/private/api_defines.h index 9b8064373..54ae35b7d 100644 --- a/include/flecs/private/api_defines.h +++ b/include/flecs/private/api_defines.h @@ -95,6 +95,10 @@ /* Useful, but not reliable enough. It can incorrectly flag macro's as unused * in standalone builds. */ #pragma clang diagnostic ignored "-Wunused-macros" +#if __clang_major__ == 13 +/* clang 13 can throw this warning for a define in ctype.h */ +#pragma clang diagnostic ignored "-Wreserved-identifier" +#endif #elif defined(ECS_TARGET_GNU) #ifndef __cplusplus #pragma GCC diagnostic ignored "-Wdeclaration-after-statement"