ci.yml raw

   1  name: CI
   2  on:
   3    pull_request:
   4    push:
   5      branches:
   6        - '**'
   7      tags-ignore:
   8        - '**'
   9  
  10  concurrency:
  11    group: ${{ github.event_name != 'pull_request' && github.run_id || github.ref }}
  12    cancel-in-progress: true
  13  
  14  jobs:
  15    windows-native:
  16      name: ${{ matrix.configuration.job_name }}
  17      # See: https://github.com/actions/runner-images#available-images.
  18      runs-on: windows-2025
  19  
  20      strategy:
  21        fail-fast: false
  22        matrix:
  23          configuration:
  24            - job_name: 'x64 (MSVC): Windows (VS 2022)'
  25              build_configuration: 'Release'
  26            - job_name: 'x64 (MSVC): Windows (VS 2022, fields=32)'
  27              cmake_options: '-DMINISKETCH_FIELDS=32'
  28              build_configuration: 'Release'
  29            - job_name: 'x64 (MSVC): Windows (VS 2022, debug)'
  30              build_configuration: 'Debug'
  31              # TODO: Resolve the issue and re-enable benchmark.
  32              # See: https://github.com/bitcoin-core/minisketch/pull/96.
  33              skip_benchmark: true
  34            - job_name: 'x64 (MSVC): Windows (VS 2022, shared)'
  35              cmake_options: '-DBUILD_SHARED_LIBS=ON'
  36              build_configuration: 'Release'
  37            - job_name: 'x64 (clang-cl): Windows (VS 2022)'
  38              cmake_options: '-T ClangCL'
  39              build_configuration: 'Release'
  40              # TODO: Resolve the issue and re-enable benchmark.
  41              # See: https://github.com/bitcoin-core/minisketch/pull/96.
  42              skip_benchmark: true
  43  
  44      steps:
  45        - name: Checkout
  46          uses: actions/checkout@v4
  47  
  48        - name: Generate buildsystem
  49          env:
  50            CXXFLAGS: '/WX'
  51          run: cmake -B build -DMINISKETCH_BUILD_BENCHMARK=ON ${{ matrix.configuration.cmake_options }}
  52  
  53        - name: Build
  54          run: cmake --build build --config ${{ matrix.configuration.build_configuration }}
  55  
  56        - name: Binaries info
  57          shell: bash
  58          run: |
  59            cd build/bin/${{ matrix.configuration.build_configuration }}
  60            file * | grep "\.exe\|\.dll"
  61  
  62        - name: Check
  63          working-directory: build
  64          run: ctest --output-on-failure -j $env:NUMBER_OF_PROCESSORS -C ${{ matrix.configuration.build_configuration }}
  65  
  66        - name: Benchmark
  67          if: ${{ ! matrix.configuration.skip_benchmark }}
  68          working-directory: build
  69          run: bin\${{ matrix.configuration.build_configuration }}\bench.exe
  70