mirror of
https://github.com/microsoft/GSL.git
synced 2024-11-25 01:01:58 -05:00
tests were not running for non-msbuild
This commit is contained in:
parent
8b1634e806
commit
d610d78829
41
.github/workflows/cmake/action.yml
vendored
41
.github/workflows/cmake/action.yml
vendored
@ -18,42 +18,39 @@ inputs:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
cmake_configure_only:
|
||||
build_cmd:
|
||||
required: true
|
||||
type: string
|
||||
default: 'make'
|
||||
test_cmd:
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
type: string
|
||||
default: 'make test'
|
||||
shell:
|
||||
required: false
|
||||
type: string
|
||||
default: 'bash'
|
||||
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Create build directory
|
||||
run: mkdir build
|
||||
shell: bash
|
||||
shell: ${{ inputs.shell }}
|
||||
|
||||
- name: Configure CMake
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake \
|
||||
-G "${{ inputs.cmake_generator }}" \
|
||||
-DCMAKE_BUILD_TYPE=${{ inputs.cmake_build_type }} \
|
||||
-DCMAKE_CXX_COMPILER=${{ inputs.cmake_cxx_compiler }} \
|
||||
-DGSL_CXX_STANDARD=${{ inputs.gsl_cxx_standard }} \
|
||||
-DCI_TESTING:BOOL=ON \
|
||||
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
|
||||
-Werror=dev \
|
||||
${{ inputs.extra_cmake_args }} \
|
||||
..
|
||||
shell: bash
|
||||
run: cmake -G "${{ inputs.cmake_generator }}" -DCMAKE_BUILD_TYPE=${{ inputs.cmake_build_type }} -DCMAKE_CXX_COMPILER=${{ inputs.cmake_cxx_compiler }} -DGSL_CXX_STANDARD=${{ inputs.gsl_cxx_standard }} -DCI_TESTING:BOOL=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -Werror=dev ${{ inputs.extra_cmake_args }} ..
|
||||
shell: ${{ inputs.shell }}
|
||||
|
||||
- name: Build
|
||||
if: ${{inputs.cmake_configure_only == false}}
|
||||
working-directory: build
|
||||
run: make
|
||||
shell: bash
|
||||
run: ${{ inputs.build_cmd }}
|
||||
shell: ${{ inputs.shell }}
|
||||
|
||||
- name: Test
|
||||
if: ${{inputs.cmake_configure_only == false}}
|
||||
working-directory: build
|
||||
run: make test
|
||||
shell: bash
|
||||
run: ${{ inputs.test_cmd }}
|
||||
shell: ${{ inputs.shell }}
|
||||
|
||||
|
17
.github/workflows/compilers.yml
vendored
17
.github/workflows/compilers.yml
vendored
@ -89,23 +89,16 @@ jobs:
|
||||
runs-on: ${{ matrix.image }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Run CMake (configure only)
|
||||
- name: Run CMake (configure, build, test)
|
||||
uses: ./.github/workflows/cmake
|
||||
with:
|
||||
cmake_generator: ${{ matrix.generator }}
|
||||
cmake_build_type: ${{ matrix.build_type }}
|
||||
cmake_configure_only: true
|
||||
gsl_cxx_standard: ${{ matrix.cxx_version }}
|
||||
extra_cmake_args: ${{ matrix.extra_args }}
|
||||
|
||||
- uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: build
|
||||
working-directory: build
|
||||
run: msbuild GSL.sln
|
||||
|
||||
- name: test
|
||||
working-directory: build
|
||||
run: ctest . --output-on-failure --no-compress-output
|
||||
build_cmd: msbuild GSL.sln
|
||||
test_cmd: ctest . --output-on-failure --no-compress-output
|
||||
shell: pwsh
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user