mirror of
https://github.com/microsoft/GSL.git
synced 2025-02-17 15:23:50 -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
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
cmake_configure_only:
|
build_cmd:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
default: 'make'
|
||||||
|
test_cmd:
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: string
|
||||||
default: false
|
default: 'make test'
|
||||||
|
shell:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: 'bash'
|
||||||
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Create build directory
|
- name: Create build directory
|
||||||
run: mkdir build
|
run: mkdir build
|
||||||
shell: bash
|
shell: ${{ inputs.shell }}
|
||||||
|
|
||||||
- name: Configure CMake
|
- name: Configure CMake
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: |
|
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 }} ..
|
||||||
cmake \
|
shell: ${{ inputs.shell }}
|
||||||
-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
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
if: ${{inputs.cmake_configure_only == false}}
|
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: make
|
run: ${{ inputs.build_cmd }}
|
||||||
shell: bash
|
shell: ${{ inputs.shell }}
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
if: ${{inputs.cmake_configure_only == false}}
|
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: make test
|
run: ${{ inputs.test_cmd }}
|
||||||
shell: bash
|
shell: ${{ inputs.shell }}
|
||||||
|
|
||||||
|
17
.github/workflows/compilers.yml
vendored
17
.github/workflows/compilers.yml
vendored
@ -89,23 +89,16 @@ jobs:
|
|||||||
runs-on: ${{ matrix.image }}
|
runs-on: ${{ matrix.image }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: microsoft/setup-msbuild@v2
|
||||||
|
|
||||||
- name: Run CMake (configure only)
|
- name: Run CMake (configure, build, test)
|
||||||
uses: ./.github/workflows/cmake
|
uses: ./.github/workflows/cmake
|
||||||
with:
|
with:
|
||||||
cmake_generator: ${{ matrix.generator }}
|
cmake_generator: ${{ matrix.generator }}
|
||||||
cmake_build_type: ${{ matrix.build_type }}
|
cmake_build_type: ${{ matrix.build_type }}
|
||||||
cmake_configure_only: true
|
|
||||||
gsl_cxx_standard: ${{ matrix.cxx_version }}
|
gsl_cxx_standard: ${{ matrix.cxx_version }}
|
||||||
extra_cmake_args: ${{ matrix.extra_args }}
|
extra_cmake_args: ${{ matrix.extra_args }}
|
||||||
|
build_cmd: msbuild GSL.sln
|
||||||
- uses: microsoft/setup-msbuild@v2
|
test_cmd: ctest . --output-on-failure --no-compress-output
|
||||||
|
shell: pwsh
|
||||||
- name: build
|
|
||||||
working-directory: build
|
|
||||||
run: msbuild GSL.sln
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
working-directory: build
|
|
||||||
run: ctest . --output-on-failure --no-compress-output
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user