From 4e03e590c44205df5cd54181174f9f7766727258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Sun, 11 Dec 2022 17:32:29 +0100 Subject: [PATCH] Add an explicit generator to the matrix config of Github Actions to handle MinGW Makefiles --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cfff906..9a752c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,29 +13,43 @@ jobs: - { name: "Windows Latest MSVC", os: windows-latest, - build_type: "Debug", cc: "cl", cxx: "cl", + generator: "Visual Studio 17 2022", + build_type: "Debug", + cc: "cl", cxx: "cl", + extra_path: "", + } + - { + name: "Windows Latest MinGW", + os: windows-latest, + generator: "MinGW Makefiles", + build_type: "Debug", + cc: "gcc", cxx: "g++", + extra_path: "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw64\\bin", } - # TODO: this is not working, since CMake is using generator for latest Visual Studio - #- { - # name: "Windows Latest MinGW", - # os: windows-latest, - # build_type: "Debug", cc: "gcc", cxx: "g++" - # } - { name: "Ubuntu Latest GCC", os: ubuntu-latest, - build_type: "Debug", cc: "gcc", cxx: "g++" + generator: "Unix Makefiles", + build_type: "Debug", + cc: "gcc", cxx: "g++", + extra_path: "" } - { name: "macOS Latest Clang", os: macos-latest, - build_type: "Debug", cc: "clang", cxx: "clang++" + generator: "Unix Makefiles", + build_type: "Debug", + cc: "clang", cxx: "clang++", + extra_path: "" } steps: - uses: actions/checkout@v2 - name: submodule run: git submodule update --init --recursive + - name: extra_path + shell: bash + run: echo "${{matrix.config.extra_path}}" >> $GITHUB_PATH - name: configure shell: cmake -P {0} run: | @@ -45,7 +59,7 @@ jobs: run: | mkdir build cd build - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF .. + cmake -G "${{matrix.config.generator}}" -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{matrix.config.build_type}} -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON -DSQLITECPP_RUN_CPPCHECK=OFF -DSQLITECPP_RUN_CPPLINT=OFF .. - name: build run: cmake --build build --config ${{matrix.config.build_type}} - name: test