2020-11-03 18:46:03 +00:00
|
|
|
name: windows
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2020-11-04 00:01:26 +00:00
|
|
|
on: [push, pull_request]
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2022-05-30 00:58:11 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-11-03 18:45:16 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-11-03 20:16:15 +00:00
|
|
|
runs-on: ${{matrix.os}}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-07-03 09:27:27 +00:00
|
|
|
# windows-2019 has MSVC 2019 installed;
|
|
|
|
# windows-2022 has MSVC 2022 installed:
|
2022-03-16 01:16:13 +00:00
|
|
|
# https://github.com/actions/virtual-environments.
|
2022-07-04 15:39:30 +00:00
|
|
|
os: [windows-2019]
|
2020-11-03 20:16:15 +00:00
|
|
|
platform: [Win32, x64]
|
2022-07-28 18:05:04 +00:00
|
|
|
toolset: [v140, v141, v142]
|
|
|
|
standard: [14, 17, 20]
|
|
|
|
shared: ["", -DBUILD_SHARED_LIBS=ON]
|
2020-11-03 20:16:15 +00:00
|
|
|
build_type: [Debug, Release]
|
2022-07-28 18:05:04 +00:00
|
|
|
exclude:
|
|
|
|
- { toolset: v140, standard: 17 }
|
|
|
|
- { toolset: v140, standard: 20 }
|
|
|
|
- { toolset: v141, standard: 14 }
|
|
|
|
- { toolset: v141, standard: 20 }
|
|
|
|
- { toolset: v142, standard: 14 }
|
|
|
|
- { platform: Win32, toolset: v140 }
|
|
|
|
- { platform: Win32, toolset: v141 }
|
|
|
|
- { platform: Win32, standard: 14 }
|
|
|
|
- { platform: Win32, standard: 20 }
|
|
|
|
- { platform: x64, toolset: v140, shared: -DBUILD_SHARED_LIBS=ON }
|
|
|
|
- { platform: x64, toolset: v141, shared: -DBUILD_SHARED_LIBS=ON }
|
|
|
|
- { platform: x64, standard: 14, shared: -DBUILD_SHARED_LIBS=ON }
|
|
|
|
- { platform: x64, standard: 20, shared: -DBUILD_SHARED_LIBS=ON }
|
2020-11-12 13:51:00 +00:00
|
|
|
include:
|
2022-07-04 15:39:30 +00:00
|
|
|
- os: windows-2022
|
|
|
|
platform: x64
|
2022-07-28 18:05:04 +00:00
|
|
|
toolset: v143
|
2022-07-04 15:39:30 +00:00
|
|
|
build_type: Debug
|
|
|
|
standard: 20
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
steps:
|
2024-06-02 13:22:27 +00:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2020-11-03 18:45:16 +00:00
|
|
|
|
2022-12-22 15:25:12 +00:00
|
|
|
- name: Set timezone
|
|
|
|
run: tzutil /s "Ekaterinburg Standard Time"
|
|
|
|
|
2020-11-03 18:45:16 +00:00
|
|
|
- name: Create Build Environment
|
|
|
|
run: cmake -E make_directory ${{runner.workspace}}/build
|
|
|
|
|
2020-11-03 22:02:07 +00:00
|
|
|
- name: Configure
|
2020-11-03 20:16:15 +00:00
|
|
|
# Use a bash shell for $GITHUB_WORKSPACE.
|
2020-11-03 18:45:16 +00:00
|
|
|
shell: bash
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2020-11-03 20:16:15 +00:00
|
|
|
run: |
|
2022-07-28 18:05:04 +00:00
|
|
|
cmake -A ${{matrix.platform}} -T ${{matrix.toolset}} \
|
2020-11-19 14:04:16 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=${{matrix.standard}} \
|
2022-07-28 18:05:04 +00:00
|
|
|
${{matrix.shared}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
|
2020-11-19 14:04:16 +00:00
|
|
|
$GITHUB_WORKSPACE
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2021-06-03 05:00:00 +00:00
|
|
|
run: |
|
|
|
|
$threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
|
|
|
|
cmake --build . --config ${{matrix.build_type}} --parallel $threads
|
2020-11-03 18:45:16 +00:00
|
|
|
|
|
|
|
- name: Test
|
|
|
|
working-directory: ${{runner.workspace}}/build
|
2021-05-24 14:23:56 +00:00
|
|
|
run: ctest -C ${{matrix.build_type}} -V
|
2021-05-06 16:20:46 +00:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: True
|
2022-08-09 10:44:37 +00:00
|
|
|
|
|
|
|
mingw:
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-09-11 15:08:53 +00:00
|
|
|
sys: [ mingw64, ucrt64 ]
|
2022-08-09 10:44:37 +00:00
|
|
|
steps:
|
2022-12-22 15:25:12 +00:00
|
|
|
- name: Set timezone
|
|
|
|
run: tzutil /s "Ekaterinburg Standard Time"
|
|
|
|
shell: cmd
|
2024-08-01 15:32:46 +00:00
|
|
|
- uses: msys2/setup-msys2@5df0ca6cbf14efcd08f8d5bd5e049a3cc8e07fd2 # v2.24.0
|
2022-08-09 10:44:37 +00:00
|
|
|
with:
|
|
|
|
release: false
|
|
|
|
msystem: ${{matrix.sys}}
|
|
|
|
pacboy: cc:p cmake:p ninja:p lld:p
|
2024-06-02 13:22:27 +00:00
|
|
|
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
|
2022-08-09 10:44:37 +00:00
|
|
|
- name: Configure
|
|
|
|
run: cmake -B ../build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
env: { LDFLAGS: -fuse-ld=lld }
|
|
|
|
- name: Build
|
|
|
|
run: cmake --build ../build
|
|
|
|
- name: Test
|
|
|
|
run: ctest -j `nproc` --test-dir ../build
|
2022-11-13 10:17:57 +00:00
|
|
|
env:
|
|
|
|
CTEST_OUTPUT_ON_FAILURE: True
|