]> git.proxmox.com Git - ceph.git/blame - ceph/src/fmt/.github/workflows/windows.yml
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / fmt / .github / workflows / windows.yml
CommitLineData
20effc67
TL
1name: windows
2
3on: [push, pull_request]
4
1e59de90
TL
5permissions:
6 contents: read
7
20effc67
TL
8jobs:
9 build:
10 runs-on: ${{matrix.os}}
11 strategy:
12 matrix:
1e59de90
TL
13 # windows-2019 has MSVC 2019 installed;
14 # windows-2022 has MSVC 2022 installed:
15 # https://github.com/actions/virtual-environments.
16 os: [windows-2019]
20effc67 17 platform: [Win32, x64]
1e59de90
TL
18 toolset: [v140, v141, v142]
19 standard: [14, 17, 20]
20 shared: ["", -DBUILD_SHARED_LIBS=ON]
20effc67 21 build_type: [Debug, Release]
1e59de90
TL
22 exclude:
23 - { toolset: v140, standard: 17 }
24 - { toolset: v140, standard: 20 }
25 - { toolset: v141, standard: 14 }
26 - { toolset: v141, standard: 20 }
27 - { toolset: v142, standard: 14 }
28 - { platform: Win32, toolset: v140 }
29 - { platform: Win32, toolset: v141 }
30 - { platform: Win32, standard: 14 }
31 - { platform: Win32, standard: 20 }
32 - { platform: x64, toolset: v140, shared: -DBUILD_SHARED_LIBS=ON }
33 - { platform: x64, toolset: v141, shared: -DBUILD_SHARED_LIBS=ON }
34 - { platform: x64, standard: 14, shared: -DBUILD_SHARED_LIBS=ON }
35 - { platform: x64, standard: 20, shared: -DBUILD_SHARED_LIBS=ON }
20effc67 36 include:
1e59de90
TL
37 - os: windows-2022
38 platform: x64
39 toolset: v143
20effc67 40 build_type: Debug
20effc67 41 standard: 20
20effc67
TL
42
43 steps:
44 - uses: actions/checkout@v2
45
46 - name: Create Build Environment
47 run: cmake -E make_directory ${{runner.workspace}}/build
48
49 - name: Configure
50 # Use a bash shell for $GITHUB_WORKSPACE.
51 shell: bash
52 working-directory: ${{runner.workspace}}/build
53 run: |
1e59de90 54 cmake -A ${{matrix.platform}} -T ${{matrix.toolset}} \
20effc67 55 -DCMAKE_CXX_STANDARD=${{matrix.standard}} \
1e59de90 56 ${{matrix.shared}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
20effc67
TL
57 $GITHUB_WORKSPACE
58
59 - name: Build
60 working-directory: ${{runner.workspace}}/build
61 run: |
62 $threads = (Get-CimInstance Win32_ComputerSystem).NumberOfLogicalProcessors
63 cmake --build . --config ${{matrix.build_type}} --parallel $threads
64
65 - name: Test
66 working-directory: ${{runner.workspace}}/build
67 run: ctest -C ${{matrix.build_type}} -V
68 env:
69 CTEST_OUTPUT_ON_FAILURE: True
1e59de90
TL
70
71 mingw:
72 runs-on: windows-latest
73 defaults:
74 run:
75 shell: msys2 {0}
76 strategy:
77 matrix:
78 sys: [ mingw64, mingw32, ucrt64 ]
79 steps:
80 - uses: msys2/setup-msys2@v2
81 with:
82 release: false
83 msystem: ${{matrix.sys}}
84 pacboy: cc:p cmake:p ninja:p lld:p
85 - uses: actions/checkout@v2
86 - name: Configure
87 run: cmake -B ../build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Debug
88 env: { LDFLAGS: -fuse-ld=lld }
89 - name: Build
90 run: cmake --build ../build
91 - name: Test
92 run: ctest -j `nproc` --test-dir ../build