Repository navigation
90 lines (84 loc) · 3.66 KB
/
Copy pathwindows_release_2022.yml
File metadata and controls
90 lines (84 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright (c) 2020 Mikael Simberg
#
# SPDX-License-Identifier: BSL-1.0
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
name: Windows CI (Release, VS2022 toolset, mimalloc)
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-2022
steps:
- uses: actions/checkout@v7
- uses: lukka/get-cmake@v4.5.1
- name: Install dependencies
uses: ./.github/actions/setup-vcpkg
# this job builds HPX with mimalloc, which .github/vcpkg/vcpkg.json does
# not list, use the runner's vcpkg for it
- name: Install mimalloc
run: |
& "$env:VCPKG_INSTALLATION_ROOT\vcpkg.exe" install mimalloc:x64-windows
# make mimalloc.dll (and mimalloc-redirect.dll) visible to all later
# steps
"$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows\bin" |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Configure
shell: bash
run: |
mimalloc_root=$(cygpath -m "$VCPKG_INSTALLATION_ROOT/installed/x64-windows")
cmake . -Bbuild -G'Visual Studio 17 2022' \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE='C:/projects/vcpkg/scripts/buildsystems/vcpkg.cmake' \
-DHPX_WITH_MALLOC=mimalloc \
-Dmimalloc_DIR="${mimalloc_root}/share/mimalloc" \
-DHPX_WITH_FETCH_ASIO=ON \
-DHPX_WITH_EXAMPLES=ON \
-DHPX_WITH_TESTS=ON \
-DHPX_WITH_TESTS_UNIT=ON \
-DHPX_WITH_TESTS_EXAMPLES=ON \
-DHPX_WITH_SUPERVISION=ON \
-DHPX_WITH_DEPRECATION_WARNINGS=OFF \
-DHPX_WITH_TESTS_MAX_THREADS_PER_LOCALITY=2 \
-DHPX_WITH_CHECK_MODULE_DEPENDENCIES=On \
-DHPX_WITH_TASK_SIZE_DEFAULT_PARAMETERS=ON \
-DHPX_WITH_TESTS_COMMAND_LINE=--hpx:queuing=local-priority-fifo-double
- name: Build
shell: bash
run: |
cmake --build build --config Release \
--target ALL_BUILD \
-- -maxcpucount:2 -verbosity:minimal -nologo
cmake --build build --config Release \
--target chunk_size_iterator_test chunk_size_idx_iterator_test \
--target unwrap_nested_containers_7945_test \
-- -maxcpucount:2 -verbosity:minimal -nologo
# HPX_WITH_MALLOC used to be silently ignored on MSVC (the allocator was
# not linked), make sure the HPX core library really uses mimalloc
- name: Check that HPX uses mimalloc
run: |
$vs = "${env:ProgramFiles}\Microsoft Visual Studio\2022\*"
$dumpbin = Get-ChildItem `
"$vs\VC\Tools\MSVC\*\bin\Hostx64\x64\dumpbin.exe" |
Select-Object -First 1
$deps = & $dumpbin.FullName /dependents build\Release\bin\hpx_core.dll
if (-not ($deps -match '^\s*mimalloc\.dll\s*$')) {
$deps
throw "hpx_core.dll does not import mimalloc"
}
- name: Install
shell: bash
run: |
cmake --install build --config Release
- name: Test
run: |
$exclude_regex = & "$env:GITHUB_WORKSPACE/.github/ci-scripts/generate_ctest_exclude_regex.ps1" `
"$env:GITHUB_WORKSPACE/.github/workflows/tests.examples.targets"
cd build
ctest `
--output-on-failure `
--build-config Release `
--tests-regex 'tests\.examples|tests\.unit\.modules\.algorithms\.detail\.chunk_size_(idx_)?iterator|tests\.regressions\.modules\.pack_traversal\.unwrap_nested_containers_7945' `
--exclude-regex $exclude_regex