|
12 | 12 |
|
13 | 13 | jobs:
|
14 | 14 | win64-native:
|
15 |
| - name: "x86_64: Windows, VS 2022" |
| 15 | + name: ${{ matrix.configuration.job_name }} |
16 | 16 | # See: https://github.com/actions/runner-images#available-images.
|
17 | 17 | runs-on: windows-2022
|
18 | 18 |
|
19 | 19 | strategy:
|
20 | 20 | fail-fast: false
|
21 | 21 | 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' |
23 | 34 |
|
24 | 35 | steps:
|
25 | 36 | - name: Checkout
|
26 | 37 | uses: actions/checkout@v3
|
27 | 38 |
|
28 | 39 | - 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 }} |
30 | 41 |
|
31 | 42 | - name: Build
|
32 | 43 | run: cmake --build build --config RelWithDebInfo -- /p:UseMultiToolTask=true /maxCpuCount
|
33 | 44 |
|
| 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 | +
|
34 | 51 | - name: Check
|
35 | 52 | run: |
|
36 | 53 | ctest -C RelWithDebInfo --test-dir build -j ([int]$env:NUMBER_OF_PROCESSORS + 1)
|
37 | 54 | build\src\RelWithDebInfo\bench_ecmult.exe
|
38 | 55 | build\src\RelWithDebInfo\bench_internal.exe
|
39 | 56 | build\src\RelWithDebInfo\bench.exe
|
40 | 57 |
|
| 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 | +
|
41 | 74 | sage:
|
42 | 75 | name: "SageMath prover"
|
43 | 76 | runs-on: ubuntu-latest
|
|
0 commit comments