From a127748f18e48e8cf7ecbf6f0c9e57068a19fda9 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 9 Sep 2023 13:54:51 +0800 Subject: [PATCH] CI: drop redundant Build step "Build Tests" is strictly a superset of "Build". in addition to the library, the former builds the tests also. both these steps share the same set of command line arguments. by removing "Build" step, we don't lose anything regarding the test coverage and information for further investigation if the build fails. Signed-off-by: Kefu Chai --- .github/workflows/build.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14d8364..ea824c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,6 @@ jobs: generator: "MinGW Makefiles" env: YAML_BUILD_SHARED_LIBS: ${{ matrix.build == 'shared' && 'ON' || 'OFF' }} - YAML_CPP_BUILD_TESTS: 'ON' CMAKE_GENERATOR: >- ${{format(matrix.generator != 'Default Generator' && '-G "{0}"' || '', matrix.generator)}} runs-on: ${{ matrix.os }} @@ -34,16 +33,10 @@ jobs: - name: Get number of CPU cores uses: SimenB/github-actions-cpu-cores@v1 - - name: Build - shell: bash - run: | - cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} - cd build && cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} - - name: Build Tests shell: bash run: | - cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} -DYAML_CPP_BUILD_TESTS=${{ env.YAML_CPP_BUILD_TESTS }} + cmake ${{ env.CMAKE_GENERATOR }} -S "${{ github.workspace }}" -B build -DCMAKE_CXX_STANDARD=${{ matrix.cxx_standard }} -DYAML_BUILD_SHARED_LIBS=${{ env.YAML_BUILD_SHARED_LIBS }} -DYAML_CPP_BUILD_TESTS=ON cd build && cmake --build . --parallel ${{ steps.cpu-cores.outputs.count }} - name: Run Tests