Skip to content

CI: updated ccache to version 4.9 #11

CI: updated ccache to version 4.9

CI: updated ccache to version 4.9 #11

Workflow file for this run

name: Windows Visual Studio
on:
- push
- pull_request
env:
CMAKE_VERSION: 3.22.2
jobs:
build:
name: ${{matrix.config.os}} - ${{matrix.config.generator_short}} - ${{matrix.config.toolset}} - ${{matrix.architecture}} - ${{matrix.build_type}}
runs-on: ${{matrix.config.os}}
strategy:
fail-fast: false
matrix:
config: [
{os: windows-2019, generator: "Visual Studio 16 2019", generator_short: VS2019, toolset: v142},
{os: windows-2019, generator: "Visual Studio 16 2019", generator_short: VS2019, toolset: ClangCL},
{os: windows-2022, generator: "Visual Studio 17 2022", generator_short: VS2022, toolset: v143},
{os: windows-2022, generator: "Visual Studio 17 2022", generator_short: VS2022, toolset: ClangCL}
]
architecture: [Win32, x64]
build_type: [Debug, Release]
steps:
- name: Checkout dynamic_bitset
uses: actions/checkout@v2
with:
submodules: recursive
path: dynamic_bitset
- name: Setup build environment
shell: cmake -P {0}
run: |
file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR=${{matrix.config.generator}}\n")
file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR_TOOLSET=${{matrix.config.toolset}}\n")
file(APPEND "$ENV{GITHUB_ENV}" "CMAKE_GENERATOR_PLATFORM=${{matrix.architecture}}\n")
- name: Setup CMake
id: cmake
uses: ./dynamic_bitset/.github/actions/setup_cmake
with:
cmake_version: ${{env.CMAKE_VERSION}}
used_env: ${{matrix.config.os}}
- name: Configure
shell: cmake -P {0}
run: |
file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
execute_process(
COMMAND ${{steps.cmake.outputs.cmake_binary}}
-S "${workspace}/dynamic_bitset"
-B "${workspace}/dynamic_bitset/build"
-D CMAKE_CONFIGURATION_TYPES=${{matrix.build_type}}
-D CMAKE_BUILD_TYPE=${{matrix.build_type}}
RESULT_VARIABLE result
)
if(NOT result EQUAL 0)
message(FATAL_ERROR "Bad exit status")
endif()
- name: Build
shell: cmake -P {0}
run: |
file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
include(ProcessorCount)
ProcessorCount(N)
execute_process(
COMMAND ${{steps.cmake.outputs.cmake_binary}}
--build "${workspace}/dynamic_bitset/build"
--config ${{matrix.build_type}}
--parallel ${N}
RESULT_VARIABLE result
)
if(NOT result EQUAL 0)
message(FATAL_ERROR "Bad exit status")
endif()
- name: Run tests
shell: cmake -P {0}
run: |
file(TO_CMAKE_PATH [=[${{github.workspace}}]=] workspace)
include(ProcessorCount)
ProcessorCount(N)
set(ENV{CTEST_OUTPUT_ON_FAILURE} "ON")
execute_process(
COMMAND ${{steps.cmake.outputs.ctest_binary}} --output-on-failure --parallel ${N}
WORKING_DIRECTORY "${workspace}/dynamic_bitset/build"
RESULT_VARIABLE result
)
if(NOT result EQUAL 0)
message(FATAL_ERROR "Running tests failed!")
endif()