Skip to content

Commit 3545dc2

Browse files
committed
ci, gha: Run all MSVC tests on Windows natively
1 parent 5d8fa82 commit 3545dc2

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/ci.yml

+36-3
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,65 @@ env:
1212

1313
jobs:
1414
win64-native:
15-
name: "x86_64: Windows, VS 2022"
15+
name: ${{ matrix.configuration.job_name }}
1616
# See: https://github.com/actions/runner-images#available-images.
1717
runs-on: windows-2022
1818

1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
lib_type: ['shared', 'static']
22+
configuration:
23+
- job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
24+
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=ON'
25+
- job_name: 'x64 (MSVC): Windows (VS 2022, static)'
26+
cmake_options: '-A x64 -DBUILD_SHARED_LIBS=OFF'
27+
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct)'
28+
cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
29+
- job_name: 'x64 (MSVC): Windows (VS 2022, int128_struct with __(u)mulh)'
30+
cmake_options: '-A x64 -DSECP256K1_TEST_OVERRIDE_WIDE_MULTIPLY=int128_struct'
31+
cpp_flags: '/DSECP256K1_MSVC_MULH_TEST_OVERRIDE'
32+
- job_name: 'x86 (MSVC): Windows (VS 2022)'
33+
cmake_options: '-A Win32'
2334

2435
steps:
2536
- name: Checkout
2637
uses: actions/checkout@v3
2738

2839
- name: Generate buildsystem
29-
run: cmake -E env CFLAGS="/WX" cmake -B build -A x64 -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=${{ matrix.lib_type == 'shared' && 'ON' || 'OFF' }}
40+
run: cmake -E env CFLAGS="/WX ${{ matrix.configuration.cpp_flags }}" cmake -B build -DSECP256K1_ENABLE_MODULE_RECOVERY=ON -DSECP256K1_BUILD_EXAMPLES=ON ${{ matrix.configuration.cmake_options }}
3041

3142
- name: Build
3243
run: cmake --build build --config RelWithDebInfo -- /p:UseMultiToolTask=true /maxCpuCount
3344

45+
- name: Binaries info
46+
# Use the bash shell included with Git for Windows.
47+
shell: bash
48+
run: |
49+
cd build/src/RelWithDebInfo && file *tests.exe bench*.exe libsecp256k1-*.dll || true
50+
3451
- name: Check
3552
run: |
3653
ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
3754
build\src\RelWithDebInfo\bench_ecmult.exe
3855
build\src\RelWithDebInfo\bench_internal.exe
3956
build\src\RelWithDebInfo\bench.exe
4057
58+
win64-native-headers:
59+
name: "x64 (MSVC): C++ (public headers)"
60+
# See: https://github.com/actions/runner-images#available-images.
61+
runs-on: windows-2022
62+
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v3
66+
67+
- name: Add cl.exe to PATH
68+
uses: ilammy/msvc-dev-cmd@v1
69+
70+
- name: C++ (public headers)
71+
run: |
72+
cl.exe -c -WX -TP include/*.h
73+
4174
sage:
4275
name: "SageMath prover"
4376
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)